diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index f2a545b685ad..ef0d2aee3562 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,29 +5,29 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.45.4" + "@azure-tools/typespec-java": "/mnt/vss/_work/1/s/typespec-azure/packages/typespec-java/emitter/azure-tools-typespec-java-0.45.4.tgz" }, "devDependencies": { - "@azure-tools/openai-typespec": "1.20.0", "@azure-tools/typespec-autorest": "0.69.1", "@azure-tools/typespec-azure-core": "0.69.0", "@azure-tools/typespec-azure-resource-manager": "0.69.1", "@azure-tools/typespec-azure-rulesets": "0.69.1", "@azure-tools/typespec-client-generator-core": "0.69.0", - "@azure-tools/typespec-liftr-base": "0.14.0", "@typespec/compiler": "1.13.0", + "@typespec/events": "0.83.0", "@typespec/http": "1.13.0", "@typespec/openapi": "1.13.0", - "@typespec/openapi3": "1.13.0", "@typespec/rest": "0.83.0", + "@typespec/sse": "0.83.0", + "@typespec/streams": "0.83.0", "@typespec/versioning": "0.83.0", "@typespec/xml": "0.83.0" } }, "node_modules/@autorest/codemodel": { "version": "4.20.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@autorest/codemodel/-/codemodel-4.20.1.tgz", - "integrity": "sha1-dEziYirn0vNQrVs4RwvGm3Q/ETg=", + "resolved": "https://registry.npmjs.org/@autorest/codemodel/-/codemodel-4.20.1.tgz", + "integrity": "sha512-MdI4G0EdQ8yOxGzgT1rCOXxXkCrUQLjVykOvdAyByIgHbnpRop1UzUQuuKmXO8gQPSy7xwYhnfVSgETbHIJZgg==", "license": "MIT", "dependencies": { "@azure-tools/codegen": "~2.10.1", @@ -39,8 +39,8 @@ }, "node_modules/@autorest/codemodel/node_modules/js-yaml": { "version": "4.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha1-hUwpJGdwW2mUduGi3swMijRYgGs=", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -51,8 +51,8 @@ }, "node_modules/@azure-tools/async-io": { "version": "3.0.254", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/async-io/-/async-io-3.0.254.tgz", - "integrity": "sha1-PPgY3taol5fucBsul1v5pLlVrqA=", + "resolved": "https://registry.npmjs.org/@azure-tools/async-io/-/async-io-3.0.254.tgz", + "integrity": "sha512-X1C7XdyCuo50ch9FzKtTvmK18FgDxxf1Bbt3cSoknQqeDaRegHSSCO+zByq2YA4NvUzKXeZ1engh29IDxZXgpQ==", "license": "MIT", "dependencies": { "@azure-tools/tasks": "~3.0.255", @@ -64,8 +64,8 @@ }, "node_modules/@azure-tools/codegen": { "version": "2.10.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/codegen/-/codegen-2.10.1.tgz", - "integrity": "sha1-mQSnZrDRWex2Hm298hT13VHbJhI=", + "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.10.1.tgz", + "integrity": "sha512-fZfREKjQnBTscjObgK4LuyZNFaofoCNQDNz0jl1i8fYNwCM5EOF9BXwtEtobuEyCpPUNDxQ/KKO65eWzirqk4w==", "license": "MIT", "dependencies": { "@azure-tools/async-io": "~3.0.0", @@ -78,8 +78,8 @@ }, "node_modules/@azure-tools/codegen/node_modules/js-yaml": { "version": "4.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha1-hUwpJGdwW2mUduGi3swMijRYgGs=", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -88,20 +88,10 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@azure-tools/openai-typespec": { - "version": "1.20.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/openai-typespec/-/openai-typespec-1.20.0.tgz", - "integrity": "sha1-pcUlfx0cFVyYqgX84nCj0VkbdJk=", - "license": "MIT", - "peerDependencies": { - "@typespec/http": "^1.11.0", - "@typespec/openapi": "^1.11.0" - } - }, "node_modules/@azure-tools/tasks": { "version": "3.0.255", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/tasks/-/tasks-3.0.255.tgz", - "integrity": "sha1-0Uwdh2AmxCy74admEZ22cZO5Fj8=", + "resolved": "https://registry.npmjs.org/@azure-tools/tasks/-/tasks-3.0.255.tgz", + "integrity": "sha512-GjALNLz7kWMEdRVbaN5g0cJHNAr3XVTbP0611Mv2UzMgGL6FOhNZJK+oPHJKLDR8EEDZNnkwPlyi7B+INXUSQA==", "license": "MIT", "engines": { "node": ">=10.12.0" @@ -109,8 +99,8 @@ }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.69.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-autorest/-/typespec-autorest-0.69.1.tgz", - "integrity": "sha1-Xqa9GjpEsawclmX/6IwzKVIRu3Y=", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.69.1.tgz", + "integrity": "sha512-nbAsTagr4pyBO0ajlRnE5TW4tAXrYKFYSoWD+8bevXpe23bkVIJkDUJCZPSgWE7CBf3kxfw53lAb70a50oJmRA==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -134,8 +124,8 @@ }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.69.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.69.0.tgz", - "integrity": "sha1-nUUoo+wXvMDKjoSwpsmBUbNA4OU=", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.69.0.tgz", + "integrity": "sha512-UNdPb/DgMvXqwWk9hb54QOAumCJ6u6GGy+bj3RIIT1Sht6FR9rIn8AQ/UQ7WtrhbJBoqvQo5dxtS565a9/VRZw==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -148,8 +138,8 @@ }, "node_modules/@azure-tools/typespec-azure-resource-manager": { "version": "0.69.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.69.1.tgz", - "integrity": "sha1-5hY5Jx4OaM0JQAL1iFiw/k8zZrk=", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.69.1.tgz", + "integrity": "sha512-NF7fqmPwaQbywcxGhH+v9qPYtIrPRR5MncXmeml6Kf9WLeqQj0rJt76KZCsZ8zwj58ZVbTNFPKcjsTQ00yQupA==", "license": "MIT", "dependencies": { "change-case": "^5.4.4", @@ -169,8 +159,8 @@ }, "node_modules/@azure-tools/typespec-azure-rulesets": { "version": "0.69.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.69.1.tgz", - "integrity": "sha1-UzoOjlCzaxQdDT+wUQy6+lOJp/A=", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.69.1.tgz", + "integrity": "sha512-vRvO8MoO4dwHdOKCFUB0IZkwf5AFGW92PP+48GKDYSNVFA7mwKVlbAlRa0rU6yURsUppAT6BPEurtau3FR+N0Q==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -184,8 +174,8 @@ }, "node_modules/@azure-tools/typespec-client-generator-core": { "version": "0.69.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.69.0.tgz", - "integrity": "sha1-kdLp4BhnAnNERX/fhhIuU9t4cgs=", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.69.0.tgz", + "integrity": "sha512-ro8zzOeiN/74r0wM19R77gzLtbfjIFgKgr1Rusii/vhCfJIoVC7IcqLxhbJl0RVkjyhRFKt4GCRAw4iurnrDnw==", "license": "MIT", "dependencies": { "change-case": "^5.4.4", @@ -210,11 +200,12 @@ }, "node_modules/@azure-tools/typespec-java": { "version": "0.45.4", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-java/-/typespec-java-0.45.4.tgz", - "integrity": "sha1-0xASoJMZEH8giMqgOGQJcOS6TCU=", + "resolved": "file:../../typespec-azure/packages/typespec-java/emitter/azure-tools-typespec-java-0.45.4.tgz", + "integrity": "sha512-y96yFFR0Uyttq1OX4FMX+euiVbr1eee5oHEXAakH5Uzpb8ViUGLuXDfEqczMo6Fvkt2HJUv5ftEMT9JuXRP4bw==", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", + "@azure-tools/codegen": "~2.10.1", "js-yaml": "~4.2.0", "lodash": "~4.18.1" }, @@ -222,31 +213,26 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/openai-typespec": "^1.20.0", "@azure-tools/typespec-autorest": ">=0.69.1 <1.0.0", "@azure-tools/typespec-azure-core": ">=0.69.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.69.1 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.69.1 <1.0.0", "@azure-tools/typespec-client-generator-core": ">=0.69.0 <1.0.0", - "@azure-tools/typespec-liftr-base": ">=0.14.0 <1.0.0", "@typespec/compiler": "^1.13.0", + "@typespec/events": ">=0.83.0 <1.0.0", "@typespec/http": "^1.13.0", "@typespec/openapi": "^1.13.0", - "@typespec/openapi3": "^1.13.0", "@typespec/rest": ">=0.83.0 <1.0.0", + "@typespec/sse": ">=0.83.0 <1.0.0", + "@typespec/streams": ">=0.83.0 <1.0.0", "@typespec/versioning": ">=0.83.0 <1.0.0", "@typespec/xml": ">=0.83.0 <1.0.0" } }, - "node_modules/@azure-tools/typespec-liftr-base": { - "version": "0.14.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-liftr-base/-/typespec-liftr-base-0.14.0.tgz", - "integrity": "sha1-vZWLRgDrWTvDqGM/7VyT5X82nU4=" - }, "node_modules/@babel/code-frame": { "version": "7.29.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@babel/code-frame/-/code-frame-7.29.7.tgz", - "integrity": "sha1-8vu/6ofESiFZDsUVt3iywm2IZuc=", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", @@ -259,8 +245,8 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.29.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha1-vYcITO0MeW7Ea9pJLeboPSnon8I=", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -268,8 +254,8 @@ }, "node_modules/@inquirer/ansi": { "version": "2.0.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/ansi/-/ansi-2.0.7.tgz", - "integrity": "sha1-ht4igQysPtQG7BD41mAWgVuCJrQ=", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.7.tgz", + "integrity": "sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" @@ -277,8 +263,8 @@ }, "node_modules/@inquirer/checkbox": { "version": "5.2.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/checkbox/-/checkbox-5.2.1.tgz", - "integrity": "sha1-fxSLMVOnds7iAgFbEPmphQaNGI0=", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.2.1.tgz", + "integrity": "sha512-b6xmA/VlTe0ZgDQHDui+Nav470u7u49nRd8/iuhOcQPO9Ch7lGuogydhi2VOmNlZ+zXcM8IcPuNSwQcdJaF/kw==", "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", @@ -300,8 +286,8 @@ }, "node_modules/@inquirer/confirm": { "version": "6.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/confirm/-/confirm-6.1.1.tgz", - "integrity": "sha1-nGp9ecYTKyr1f9t1dH8FYgTlU1Y=", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.1.1.tgz", + "integrity": "sha512-eb8DBZcz/2qHWQda4rk2JiQk5h9QV/cVHi1yjt0f69WFZMRFn0sJTye3EAP8icut8UDMjQPsaH5KbcOogefrFQ==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -321,8 +307,8 @@ }, "node_modules/@inquirer/core": { "version": "11.2.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/core/-/core-11.2.1.tgz", - "integrity": "sha1-VMzY99R4UhQLYGbL131jssKxaP0=", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.2.1.tgz", + "integrity": "sha512-Qd6GJT1yVyrZZCfN8W2qKF5ApmqryXRhRKCuip8h01x2w/esJQ2XIYc6f9abMIHgKQdBfFTSOdbHRLAhuM09UA==", "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", @@ -347,8 +333,8 @@ }, "node_modules/@inquirer/editor": { "version": "5.2.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/editor/-/editor-5.2.2.tgz", - "integrity": "sha1-fHPi/A571MQM/TihgK5bvSTTK5A=", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.2.2.tgz", + "integrity": "sha512-ZRVd/oD+sYsUd5zVm0NflqEzlqfYCyHNsqkHl2oWXEUHs12tCbcSFi+wVFEvD8+LGRaMUsVrE7qeo6lSG/S1Vg==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -369,8 +355,8 @@ }, "node_modules/@inquirer/expand": { "version": "5.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/expand/-/expand-5.1.1.tgz", - "integrity": "sha1-4q/qwkfZfdZO4YqoHpAr3R/g6nA=", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.1.1.tgz", + "integrity": "sha512-YmQpenjbFSHAK3sOd44puHh3V1KXXr+JiNpUztoSQ4drLh2rTVzTap/YtlAVu/5xavifIlBfNEzJ/neZJ1a/1g==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -390,8 +376,8 @@ }, "node_modules/@inquirer/external-editor": { "version": "3.0.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha1-1553JULPjTQGQunavToep/WjAQQ=", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-6thf5I8q7lZwzGLAxPaaGEREEkZ3nyePPDQ1oyobblxmEE8mqTLguScP7pDjUTAibiyb4hfXl+qjUEJ+di/aNA==", "license": "MIT", "dependencies": { "chardet": "^2.1.1", @@ -411,8 +397,8 @@ }, "node_modules/@inquirer/figures": { "version": "2.0.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/figures/-/figures-2.0.7.tgz", - "integrity": "sha1-9cxYQ3MqgTBNBqDbS1PMfb2hVUE=", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.7.tgz", + "integrity": "sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" @@ -420,8 +406,8 @@ }, "node_modules/@inquirer/input": { "version": "5.1.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/input/-/input-5.1.2.tgz", - "integrity": "sha1-kwXLFw38OlMj5erIhalF583dXEs=", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.1.2.tgz", + "integrity": "sha512-9K/DDBSQpOyZSkt6sOVP9Vo0TR7atX2kuILsUu0x3wVcVbe97lJwIJKMLdMw25tDYuXl/qp6erT0Xs1rfmcfZg==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -441,8 +427,8 @@ }, "node_modules/@inquirer/number": { "version": "4.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/number/-/number-4.1.1.tgz", - "integrity": "sha1-sTNmjY4OCZtBM6u5FSIVAeD/ddc=", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.1.1.tgz", + "integrity": "sha512-XF4IXAbPnGPgw0wsbC/i2tPcyfdZgDpUlhsqU0SfT4IRIGWha6Xm9VRgN5yYxJq+jnyXlfXI/nQ3ulfk0iEICA==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -462,8 +448,8 @@ }, "node_modules/@inquirer/password": { "version": "5.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/password/-/password-5.1.1.tgz", - "integrity": "sha1-8h77YU2pyQUJUmL1F4H9KnIfzqw=", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.1.1.tgz", + "integrity": "sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==", "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", @@ -484,8 +470,8 @@ }, "node_modules/@inquirer/prompts": { "version": "8.5.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/prompts/-/prompts-8.5.2.tgz", - "integrity": "sha1-CcATKtoru6lMkdNBEV4eQcs/FSU=", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.5.2.tgz", + "integrity": "sha512-IYR/3C/paEVVQYQvdDlFZVjRCJVYHHON0XXMH91KO9GSxs0TdKYWlUdvfQl2EfAHDxUaN3IBffkE/BDTh5nJ6g==", "license": "MIT", "dependencies": { "@inquirer/checkbox": "^5.2.1", @@ -513,8 +499,8 @@ }, "node_modules/@inquirer/rawlist": { "version": "5.3.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/rawlist/-/rawlist-5.3.1.tgz", - "integrity": "sha1-Zva45qqC1HOZxDO4JiEo58Gk+c4=", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.3.1.tgz", + "integrity": "sha512-QqdTqQddL3qPX/PPrjobpsO25NZ4dWXgTLenrR445L2ptLEYE6Z+PD5c5CNDJNx4ugRgELAIpSIJxZaO2jJ2Og==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -534,8 +520,8 @@ }, "node_modules/@inquirer/search": { "version": "4.2.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/search/-/search-4.2.1.tgz", - "integrity": "sha1-yPS3irP4Zv3wUD+sDNCMSmZhwR4=", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.2.1.tgz", + "integrity": "sha512-xJj8QWKRSrfKoBIITLZK61dD3zwo0Rz11fgDImku30/Oe81zMdIdGgrLY2h6RkJ+KZ/GhNYIRMKnH/62qBTA5g==", "license": "MIT", "dependencies": { "@inquirer/core": "^11.2.1", @@ -556,8 +542,8 @@ }, "node_modules/@inquirer/select": { "version": "5.2.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/select/-/select-5.2.1.tgz", - "integrity": "sha1-OgXnbljZ4bsJXpEsPnCTqgTNRgQ=", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.2.1.tgz", + "integrity": "sha512-FlDndEUww8m7BfukO2nJa25vhD+H5jxxCv4oGioKqzyWz3nPHhhw4LKdYRSlXuAx7DsdWia7iyaBPKKS95Evfw==", "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", @@ -579,8 +565,8 @@ }, "node_modules/@inquirer/type": { "version": "4.0.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@inquirer/type/-/type-4.0.7.tgz", - "integrity": "sha1-nG8NhX/mrVSaOpMjQ7ZOdqyzSxA=", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.7.tgz", + "integrity": "sha512-t28inv14nMQ1PhKpsJPY+kEs/c00qzeCOS2gTNRyTjG5d6qsVA2fItxW4hkvGZ5lvanGLdtCzVIx5dwdRpN1+g==", "license": "MIT", "engines": { "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" @@ -596,8 +582,8 @@ }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha1-LVmuOrSzj7QnC/oj0w+OLobH/jI=", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", "license": "ISC", "dependencies": { "minipass": "^7.0.4" @@ -606,87 +592,10 @@ "node": ">=18.0.0" } }, - "node_modules/@scalar/helpers": { - "version": "0.8.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@scalar/helpers/-/helpers-0.8.2.tgz", - "integrity": "sha1-YxxC/nYFdoNV6KyFG7Ap6nBjR5c=", - "license": "MIT", - "engines": { - "node": ">=22" - } - }, - "node_modules/@scalar/json-magic": { - "version": "0.12.16", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@scalar/json-magic/-/json-magic-0.12.16.tgz", - "integrity": "sha1-Z7BVYRIFNarpf7EXphbov07Mv+Y=", - "license": "MIT", - "dependencies": { - "@scalar/helpers": "0.8.2", - "pathe": "^2.0.3", - "yaml": "^2.8.3" - }, - "engines": { - "node": ">=22" - } - }, - "node_modules/@scalar/openapi-parser": { - "version": "0.28.7", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@scalar/openapi-parser/-/openapi-parser-0.28.7.tgz", - "integrity": "sha1-JBkWuL9wY1ifD15A9rx9GX/sLAk=", - "license": "MIT", - "dependencies": { - "@scalar/helpers": "0.8.2", - "@scalar/json-magic": "0.12.16", - "@scalar/openapi-types": "0.9.1", - "@scalar/openapi-upgrader": "0.2.9", - "ajv": "^8.17.1", - "ajv-draft-04": "^1.0.0", - "ajv-formats": "^3.0.1", - "jsonpointer": "^5.0.1", - "leven": "^4.0.0", - "yaml": "^2.8.3" - }, - "engines": { - "node": ">=22" - } - }, - "node_modules/@scalar/openapi-types": { - "version": "0.9.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@scalar/openapi-types/-/openapi-types-0.9.1.tgz", - "integrity": "sha1-EW7oh5Byy1qr2c7hz0MUYmjbkiY=", - "license": "MIT", - "engines": { - "node": ">=22" - } - }, - "node_modules/@scalar/openapi-upgrader": { - "version": "0.2.9", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@scalar/openapi-upgrader/-/openapi-upgrader-0.2.9.tgz", - "integrity": "sha1-7ZGjDb+tJEvXpKFwZIrGS4+w+VI=", - "license": "MIT", - "dependencies": { - "@scalar/openapi-types": "0.9.1" - }, - "engines": { - "node": ">=22" - } - }, - "node_modules/@typespec/asset-emitter": { - "version": "0.79.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/asset-emitter/-/asset-emitter-0.79.1.tgz", - "integrity": "sha1-ustlnxj/oOyPs7Wkf44wS8qKImo=", - "license": "MIT", - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.10.0" - } - }, "node_modules/@typespec/compiler": { "version": "1.13.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/compiler/-/compiler-1.13.0.tgz", - "integrity": "sha1-9rRSNTfToVgLNNYWCs7hO+AI6UA=", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.13.0.tgz", + "integrity": "sha512-DonoHiyAMx0UjSmssqTrFtya+v97wny1aHcTLU5QF2wFzLATtcwUU9hbPC+eXhepuTunMOCHf8yk3pEsH6PZYA==", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.0", @@ -716,10 +625,9 @@ }, "node_modules/@typespec/events": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/events/-/events-0.83.0.tgz", - "integrity": "sha1-muxeJanyHS+6QCQoU5T8pQg/nDA=", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.83.0.tgz", + "integrity": "sha512-3EP1EIjdLgwStgd2rGWaF/QqY7YRAt+DIYnnYG2VsdPwa8s2t6K6eJ9YJDXveeHImAkHs+cpFuwxnjKMl4hOyw==", "license": "MIT", - "peer": true, "engines": { "node": ">=22.0.0" }, @@ -729,8 +637,8 @@ }, "node_modules/@typespec/http": { "version": "1.13.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/http/-/http-1.13.0.tgz", - "integrity": "sha1-qQ89noV+3DME0HhJLscj0suz4Zs=", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.13.0.tgz", + "integrity": "sha512-tf8XFddU6g1MZSAVCLC/0Xa4fNfUO0CcHe6PWpmC3bvUojxMnpRcERI2DdoRJ+aycB9Q+Z8wN8bJO3up6u+sCw==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -747,8 +655,8 @@ }, "node_modules/@typespec/openapi": { "version": "1.13.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/openapi/-/openapi-1.13.0.tgz", - "integrity": "sha1-YmlA5T5uoIaeZ0hvfS/5czuDCkA=", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.13.0.tgz", + "integrity": "sha512-omPc9n+LM2WvjYwnIf31RCxmG17fFUOVLBRsWg4T1mbcsNCj4grnNP7Lwt+irIZCiKtmLKxq3ViE7jYixCkZ3g==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -758,59 +666,10 @@ "@typespec/http": "^1.13.0" } }, - "node_modules/@typespec/openapi3": { - "version": "1.13.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/openapi3/-/openapi3-1.13.0.tgz", - "integrity": "sha1-a/4+2NCZhysSM4hDwmLGzrL9jwA=", - "license": "MIT", - "dependencies": { - "@scalar/json-magic": "^0.12.15", - "@scalar/openapi-parser": "^0.28.6", - "@scalar/openapi-types": "^0.9.1", - "@typespec/asset-emitter": "^0.79.1", - "yaml": "^2.8.3" - }, - "bin": { - "tsp-openapi3": "cmd/tsp-openapi3.js" - }, - "engines": { - "node": ">=22.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "^1.13.0", - "@typespec/events": "^0.83.0", - "@typespec/http": "^1.13.0", - "@typespec/json-schema": "^1.13.0", - "@typespec/openapi": "^1.13.0", - "@typespec/sse": "^0.83.0", - "@typespec/streams": "^0.83.0", - "@typespec/versioning": "^0.83.0" - }, - "peerDependenciesMeta": { - "@typespec/events": { - "optional": true - }, - "@typespec/json-schema": { - "optional": true - }, - "@typespec/sse": { - "optional": true - }, - "@typespec/streams": { - "optional": true - }, - "@typespec/versioning": { - "optional": true - }, - "@typespec/xml": { - "optional": true - } - } - }, "node_modules/@typespec/rest": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/rest/-/rest-0.83.0.tgz", - "integrity": "sha1-VdO6JyTFMQjlEUciZ9kKaI22BkU=", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.83.0.tgz", + "integrity": "sha512-WMEwEe1kdaOdZ0c+ct5BVmTSBXkrPniUYDWCz3K52T4in2dNc7J6YGP6tL8bXgQz5B0CsP0VNO12N+UysQDsLw==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -822,10 +681,9 @@ }, "node_modules/@typespec/sse": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/sse/-/sse-0.83.0.tgz", - "integrity": "sha1-hNyNnk7rrJXC0Lfm4myUdYPL6Lg=", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.83.0.tgz", + "integrity": "sha512-04WNaju2rwBbcF5pG+HrKQtdcrmSGuTVziLHNA9XOqj1qM7Uon3+wo2g+ZZ3Z6tngfqQoTCPyDcRHqZtGRdNuw==", "license": "MIT", - "peer": true, "engines": { "node": ">=22.0.0" }, @@ -838,10 +696,9 @@ }, "node_modules/@typespec/streams": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/streams/-/streams-0.83.0.tgz", - "integrity": "sha1-WJdJb4yL+BgQl4Q+d7NS+6gEcbM=", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.83.0.tgz", + "integrity": "sha512-wbO6sdH1Uf+UwjxxsWdHQkjJ3wwiYsAKI+L66qnDYVXAFe02sUdMKd0mxH5o9ipGXE52MZ+yvZ52vHAD+g3RFQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=22.0.0" }, @@ -851,8 +708,8 @@ }, "node_modules/@typespec/versioning": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/versioning/-/versioning-0.83.0.tgz", - "integrity": "sha1-IE6Hk9aRF7JC93SQKMA5Ex/uCW8=", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.83.0.tgz", + "integrity": "sha512-nE66ta0ixpHB6FQpSzqnj8QnVfgFsxeK/4Xv+DxYx2nB/w18f6VjkF+hW+A/zs1tZIYvBZVbCNa/Rcr8zM6fhg==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -863,8 +720,8 @@ }, "node_modules/@typespec/xml": { "version": "0.83.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/xml/-/xml-0.83.0.tgz", - "integrity": "sha1-PMnR1zxpV2mLz/gUfU67AqJTGXk=", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.83.0.tgz", + "integrity": "sha512-2/dtAD8jGPkIdwpQ1G1P+5+qdMPeafQiIKCd8NdAnOo0w9OZ59Io52jINm9HdN8+FcbOrqK8+B2N9rlPRj7PqA==", "license": "MIT", "engines": { "node": ">=22.0.0" @@ -875,8 +732,8 @@ }, "node_modules/ajv": { "version": "8.20.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ajv/-/ajv-8.20.0.tgz", - "integrity": "sha1-MEs2Nq3Yi6fZNnYN1Q7OAG3qlfk=", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -889,41 +746,10 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv-draft-04": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", - "integrity": "sha1-O2R2GyaLoLnmaPC0G6U/zgrXf8g=", - "license": "MIT", - "peerDependencies": { - "ajv": "^8.5.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats": { - "version": "3.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ajv-formats/-/ajv-formats-3.0.1.tgz", - "integrity": "sha1-PV3HYryhdnnDwup+kK1rdTIwlXg=", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, "node_modules/ansi-regex": { "version": "6.2.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha1-YCFu6kZNhkWXzigyAAc4oFiWUME=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "license": "MIT", "engines": { "node": ">=12" @@ -934,8 +760,8 @@ }, "node_modules/ansi-styles": { "version": "6.2.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha1-wETV3MUhoHZBNHJZehrLHxA8QEE=", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", "engines": { "node": ">=12" @@ -946,26 +772,26 @@ }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, "node_modules/change-case": { "version": "5.4.4", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha1-DVK1B9j7jyBDQ0MjgdGm17/5egI=", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "license": "MIT" }, "node_modules/chardet": { - "version": "2.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/chardet/-/chardet-2.1.1.tgz", - "integrity": "sha1-XHVZNwSmQvce5TcX3yNAMeZTc8g=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.2.0.tgz", + "integrity": "sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==", "license": "MIT" }, "node_modules/chownr": { "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha1-mFXmTs0kCpzEJnzopKpdJKHaFeQ=", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", "license": "BlueOak-1.0.0", "engines": { "node": ">=18" @@ -973,8 +799,8 @@ }, "node_modules/cli-width": { "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/cli-width/-/cli-width-4.1.0.tgz", - "integrity": "sha1-QtqsQdPCVO84rYrAN2chMBc2kcU=", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", "license": "ISC", "engines": { "node": ">= 12" @@ -982,8 +808,8 @@ }, "node_modules/cliui": { "version": "9.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha1-b3iQ84b28feZU63B943sRvzC0pE=", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { "string-width": "^7.2.0", @@ -996,14 +822,14 @@ }, "node_modules/emoji-regex": { "version": "10.6.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha1-vz1uj3+P0ipl2XA0dbwBRzV6aw0=", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "license": "MIT" }, "node_modules/env-paths": { "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/env-paths/-/env-paths-4.0.0.tgz", - "integrity": "sha1-0LsfhKgdJUJYG/e36AhdBoOzkJc=", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-4.0.0.tgz", + "integrity": "sha512-pxP8eL2SwwaTRi/KHYwLYXinDs7gL3jxFcBYmEdYfZmZXbaVDvdppd0XBU8qVz03rDfKZMXg1omHCbsJjZrMsw==", "license": "MIT", "dependencies": { "is-safe-filename": "^0.1.0" @@ -1017,8 +843,8 @@ }, "node_modules/escalade": { "version": "3.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha1-ARo/aYVroYnf+n3I/M6Z0qh5A+U=", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" @@ -1026,20 +852,20 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, "node_modules/fast-string-truncated-width": { "version": "3.0.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", - "integrity": "sha1-I6/g2mfXUsoHJ1OPHmlndZcozkk=", + "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", "license": "MIT" }, "node_modules/fast-string-width": { "version": "3.0.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/fast-string-width/-/fast-string-width-3.0.2.tgz", - "integrity": "sha1-FturtJHOVYW17LZ1tlwWXXFojus=", + "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", "license": "MIT", "dependencies": { "fast-string-truncated-width": "^3.0.2" @@ -1047,8 +873,8 @@ }, "node_modules/fast-uri": { "version": "3.1.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha1-ivPU/J0+cbEVcswmc7UUp9GoyOw=", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", + "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", "funding": [ { "type": "github", @@ -1063,8 +889,8 @@ }, "node_modules/fast-wrap-ansi": { "version": "0.2.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz", - "integrity": "sha1-lelSoBRbzj9ZrVbhefhMSNQHKTU=", + "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz", + "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==", "license": "MIT", "dependencies": { "fast-string-width": "^3.0.2" @@ -1072,8 +898,8 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" @@ -1081,8 +907,8 @@ }, "node_modules/get-east-asian-width": { "version": "1.6.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", - "integrity": "sha1-IWkA+R3xGossGYw+HZPWwDWndrk=", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", "license": "MIT", "engines": { "node": ">=18" @@ -1093,14 +919,14 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha1-QYPk6L8Iu24Fu7L30uDI9xLKQOM=", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, "node_modules/iconv-lite": { "version": "0.7.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha1-0L3qw/ErSDW3NZwq2JxCKk0cxy4=", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1115,8 +941,8 @@ }, "node_modules/is-safe-filename": { "version": "0.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/is-safe-filename/-/is-safe-filename-0.1.1.tgz", - "integrity": "sha1-+yLurQl8YUxHqmdN5deaFkilPmY=", + "resolved": "https://registry.npmjs.org/is-safe-filename/-/is-safe-filename-0.1.1.tgz", + "integrity": "sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g==", "license": "MIT", "engines": { "node": ">=20" @@ -1127,8 +953,8 @@ }, "node_modules/is-unicode-supported": { "version": "2.1.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha1-CfCrDebTdE1I0mXruY9l0R8qmzo=", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "license": "MIT", "engines": { "node": ">=18" @@ -1139,14 +965,14 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, "node_modules/js-yaml": { "version": "4.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha1-K9noVoLdkb1GmvuAnYFgQ7PUlSQ=", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", + "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", "funding": [ { "type": "github", @@ -1167,41 +993,20 @@ }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, - "node_modules/jsonpointer": { - "version": "5.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/jsonpointer/-/jsonpointer-5.0.1.tgz", - "integrity": "sha1-IRDgrwkA/TdGe1kH7NE6eIShtVk=", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/leven": { - "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/leven/-/leven-4.1.0.tgz", - "integrity": "sha1-HjcVDhcR0YuxTjgKXHeZlSNacQ4=", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash": { "version": "4.18.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/lodash/-/lodash-4.18.1.tgz", - "integrity": "sha1-/ytmwfYybVlRPeJAe/iBQ5gSdxw=", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/minipass": { "version": "7.1.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha1-eTibTrG7LQA6m7qH1JLyvTe9xls=", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" @@ -1209,8 +1014,8 @@ }, "node_modules/minizlib": { "version": "3.1.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/minizlib/-/minizlib-3.1.0.tgz", - "integrity": "sha1-atdsOo8QInybUdHJrI4wsn9aJRw=", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", "license": "MIT", "dependencies": { "minipass": "^7.1.2" @@ -1221,8 +1026,8 @@ }, "node_modules/mustache": { "version": "4.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/mustache/-/mustache-4.2.0.tgz", - "integrity": "sha1-5YkjJNYKEuycKnM1ntylKXK/b2Q=", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "license": "MIT", "bin": { "mustache": "bin/mustache" @@ -1230,29 +1035,23 @@ }, "node_modules/mute-stream": { "version": "3.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/mute-stream/-/mute-stream-3.0.0.tgz", - "integrity": "sha1-zYAU3SrLcuHpG7Z8dPABnmILotE=", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz", + "integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==", "license": "ISC", "engines": { "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha1-PsvsVUIWhbcKnahyss/z4cvtFxY=", - "license": "MIT" - }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha1-PTIa8+q5ObCDyPkpodEs2oHCa2s=", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/pluralize": { "version": "8.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha1-Gm+hajjRKhkB4DIPoBcFHFOc47E=", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "license": "MIT", "engines": { "node": ">=4" @@ -1260,8 +1059,8 @@ }, "node_modules/prettier": { "version": "3.8.4", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/prettier/-/prettier-3.8.4.tgz", - "integrity": "sha1-8zTwE6wEqWZ28k2rwjwcSuG65BE=", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz", + "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -1275,8 +1074,8 @@ }, "node_modules/proper-lockfile": { "version": "2.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/proper-lockfile/-/proper-lockfile-2.0.1.tgz", - "integrity": "sha1-FZ+wYZPTIAP0s2kd0uwaY0qoDR0=", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-2.0.1.tgz", + "integrity": "sha512-rjaeGbsmhNDcDInmwi4MuI6mRwJu6zq8GjYCLuSuE7GF+4UjgzkL69sVKKJ2T2xH61kK7rXvGYpvaTu909oXaQ==", "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", @@ -1288,8 +1087,8 @@ }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -1297,8 +1096,8 @@ }, "node_modules/retry": { "version": "0.10.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==", "license": "MIT", "engines": { "node": "*" @@ -1306,14 +1105,14 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, "node_modules/semver": { - "version": "7.8.4", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/semver/-/semver-7.8.4.tgz", - "integrity": "sha1-xz7O664GFpNL6N/yin/XB1fI5pY=", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -1324,8 +1123,8 @@ }, "node_modules/signal-exit": { "version": "4.1.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha1-lSGIwcvVRgcOLdIND0HArgUwywQ=", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "license": "ISC", "engines": { "node": ">=14" @@ -1336,8 +1135,8 @@ }, "node_modules/string-width": { "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", @@ -1353,8 +1152,8 @@ }, "node_modules/strip-ansi": { "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha1-0iomlSKDamJ6+NBLXD/Sx/o+MuM=", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "license": "MIT", "dependencies": { "ansi-regex": "^6.2.2" @@ -1367,9 +1166,9 @@ } }, "node_modules/tar": { - "version": "7.5.16", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/tar/-/tar-7.5.16.tgz", - "integrity": "sha1-8R4GOv7UVU91gEnQgpCeN9a1PO0=", + "version": "7.5.17", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.17.tgz", + "integrity": "sha512-wPEBwzapC+2PaTYPH6e2L+cNOEE227S47wUYFqlegcs8zlLLmeb9Fcff1HVZY4Fwku/1Eyv38n7GYwB2aaS71g==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", @@ -1384,8 +1183,8 @@ }, "node_modules/temporal-polyfill": { "version": "0.3.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-polyfill/-/temporal-polyfill-0.3.2.tgz", - "integrity": "sha1-6w9P02x36sQ9bltShRvuNkgjS4E=", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.2.tgz", + "integrity": "sha512-TzHthD/heRK947GNiSu3Y5gSPpeUDH34+LESnfsq8bqpFhsB79HFBX8+Z834IVX68P3EUyRPZK5bL/1fh437Eg==", "license": "MIT", "dependencies": { "temporal-spec": "0.3.1" @@ -1393,14 +1192,14 @@ }, "node_modules/temporal-spec": { "version": "0.3.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-spec/-/temporal-spec-0.3.1.tgz", - "integrity": "sha1-CILPKVSqxoOiSEIItfXMc2a/3RQ=", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.1.tgz", + "integrity": "sha512-B4TUhezh9knfSIMwt7RVggApDRJZo73uZdj8AacL2mZ8RP5KtLianh2MXxL06GN9ESYiIsiuoLQhgVfwe55Yhw==", "license": "ISC" }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha1-9D36NftR52PRfNlNzKDJRY81q/k=", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -1408,8 +1207,8 @@ }, "node_modules/vscode-languageserver": { "version": "9.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", - "integrity": "sha1-UArvggl+uU35DQCGeLC2tfR0AVs=", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "license": "MIT", "dependencies": { "vscode-languageserver-protocol": "3.17.5" @@ -1420,8 +1219,8 @@ }, "node_modules/vscode-languageserver-protocol": { "version": "3.17.5", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha1-hkqLjzkINVcvThO9n4MT0OOsS+o=", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "license": "MIT", "dependencies": { "vscode-jsonrpc": "8.2.0", @@ -1430,20 +1229,20 @@ }, "node_modules/vscode-languageserver-textdocument": { "version": "1.0.12", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha1-RX7gQnGrOJmKCTxowjQvU/bkpjE=", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", "license": "MIT" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha1-MnNnbwzy6rQLP0TQhay7fwijnYo=", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "license": "MIT" }, "node_modules/wrap-ansi": { "version": "9.0.2", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha1-lWgy3qlJQwbm0gnrhxZDu4c9fJg=", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { "ansi-styles": "^6.2.1", @@ -1459,8 +1258,8 @@ }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "license": "ISC", "engines": { "node": ">=10" @@ -1468,8 +1267,8 @@ }, "node_modules/yallist": { "version": "5.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha1-AOLeRDY57Q14/YfeDSdGn7z/tTM=", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", "license": "BlueOak-1.0.0", "engines": { "node": ">=18" @@ -1477,8 +1276,8 @@ }, "node_modules/yaml": { "version": "2.9.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha1-eCdK/ZNZih391hMN9qVm3vy/mqQ=", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -1492,8 +1291,8 @@ }, "node_modules/yargs": { "version": "18.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha1-bIQlmAYnOnRrCfV5CHtoo8LSW9E=", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", "license": "MIT", "dependencies": { "cliui": "^9.0.1", @@ -1509,8 +1308,8 @@ }, "node_modules/yargs-parser": { "version": "22.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha1-h7gglAUbBWdxc0bs0A/RSASzV8g=", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "license": "ISC", "engines": { "node": "^20.19.0 || ^22.12.0 || >=23" diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 01dd32a4394e..41865205fea8 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,22 +1,22 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-java": "0.45.4" + "@azure-tools/typespec-java": "/mnt/vss/_work/1/s/typespec-azure/packages/typespec-java/emitter/azure-tools-typespec-java-0.45.4.tgz" }, "devDependencies": { - "@azure-tools/openai-typespec": "1.20.0", "@azure-tools/typespec-autorest": "0.69.1", "@azure-tools/typespec-azure-core": "0.69.0", "@azure-tools/typespec-azure-resource-manager": "0.69.1", "@azure-tools/typespec-azure-rulesets": "0.69.1", "@azure-tools/typespec-client-generator-core": "0.69.0", - "@azure-tools/typespec-liftr-base": "0.14.0", "@typespec/compiler": "1.13.0", + "@typespec/events": "0.83.0", "@typespec/http": "1.13.0", "@typespec/openapi": "1.13.0", "@typespec/rest": "0.83.0", + "@typespec/sse": "0.83.0", + "@typespec/streams": "0.83.0", "@typespec/versioning": "0.83.0", - "@typespec/xml": "0.83.0", - "@typespec/openapi3": "1.13.0" + "@typespec/xml": "0.83.0" } } \ No newline at end of file diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/ArizeAIObservabilityEvalManager.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/ArizeAIObservabilityEvalManager.java deleted file mode 100644 index 957557f8b87e..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/ArizeAIObservabilityEvalManager.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.ArizeAIObservabilityEvalMgmtClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.implementation.ArizeAIObservabilityEvalMgmtClientBuilder; -import com.azure.resourcemanager.arizeaiobservabilityeval.implementation.OperationsImpl; -import com.azure.resourcemanager.arizeaiobservabilityeval.implementation.OrganizationsImpl; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Operations; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Organizations; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to ArizeAIObservabilityEvalManager. - */ -public final class ArizeAIObservabilityEvalManager { - private Operations operations; - - private Organizations organizations; - - private final ArizeAIObservabilityEvalMgmtClient clientObject; - - private ArizeAIObservabilityEvalManager(HttpPipeline httpPipeline, AzureProfile profile, - Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new ArizeAIObservabilityEvalMgmtClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Arize AI Observability Eval service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Arize AI Observability Eval service API instance. - */ - public static ArizeAIObservabilityEvalManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of Arize AI Observability Eval service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Arize AI Observability Eval service API instance. - */ - public static ArizeAIObservabilityEvalManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ArizeAIObservabilityEvalManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create ArizeAIObservabilityEvalManager with optional - * configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new ArizeAIObservabilityEvalManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-arizeaiobservabilityeval.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of Arize AI Observability Eval service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Arize AI Observability Eval service API instance. - */ - public ArizeAIObservabilityEvalManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.arizeaiobservabilityeval") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new ArizeAIObservabilityEvalManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Organizations. It manages OrganizationResource. - * - * @return Resource collection API of Organizations. - */ - public Organizations organizations() { - if (this.organizations == null) { - this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this); - } - return organizations; - } - - /** - * Gets wrapped service client ArizeAIObservabilityEvalMgmtClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client ArizeAIObservabilityEvalMgmtClient. - */ - public ArizeAIObservabilityEvalMgmtClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/ArizeAIObservabilityEvalMgmtClient.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/ArizeAIObservabilityEvalMgmtClient.java deleted file mode 100644 index 441d3dd42889..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/ArizeAIObservabilityEvalMgmtClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for ArizeAIObservabilityEvalMgmtClient class. - */ -public interface ArizeAIObservabilityEvalMgmtClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - OrganizationsClient getOrganizations(); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OperationsClient.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OperationsClient.java deleted file mode 100644 index d13f5433f36a..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OrganizationsClient.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OrganizationsClient.java deleted file mode 100644 index 8a79ebb3f828..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/OrganizationsClient.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public interface OrganizationsClient { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OperationInner.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OperationInner.java deleted file mode 100644 index fbd253c8a691..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.ActionType; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OperationDisplay; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OrganizationResourceInner.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OrganizationResourceInner.java deleted file mode 100644 index 440c821ec890..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/OrganizationResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.ManagedServiceIdentity; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Concrete tracked resource types can be created by aliasing this type using a specific property type. - */ -@Fluent -public final class OrganizationResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private OrganizationProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OrganizationResourceInner class. - */ - public OrganizationResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withProperties(OrganizationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceInner. - */ - public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOrganizationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrganizationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrganizationResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOrganizationResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceInner; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/package-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/package-info.java deleted file mode 100644 index e9c0b9d2f7b1..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for ArizeAIObservabilityEval. - */ -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models; diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/package-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/package-info.java deleted file mode 100644 index 590bcae6965e..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for ArizeAIObservabilityEval. - */ -package com.azure.resourcemanager.arizeaiobservabilityeval.fluent; diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientBuilder.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientBuilder.java deleted file mode 100644 index cf87f7b6da1d..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the ArizeAIObservabilityEvalMgmtClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { ArizeAIObservabilityEvalMgmtClientImpl.class }) -public final class ArizeAIObservabilityEvalMgmtClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the ArizeAIObservabilityEvalMgmtClientBuilder. - */ - public ArizeAIObservabilityEvalMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of ArizeAIObservabilityEvalMgmtClientImpl with the provided parameters. - * - * @return an instance of ArizeAIObservabilityEvalMgmtClientImpl. - */ - public ArizeAIObservabilityEvalMgmtClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ArizeAIObservabilityEvalMgmtClientImpl client = new ArizeAIObservabilityEvalMgmtClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientImpl.java deleted file mode 100644 index 377c7ed22d27..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ArizeAIObservabilityEvalMgmtClientImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.ArizeAIObservabilityEvalMgmtClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OperationsClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OrganizationsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the ArizeAIObservabilityEvalMgmtClientImpl type. - */ -@ServiceClient(builder = ArizeAIObservabilityEvalMgmtClientBuilder.class) -public final class ArizeAIObservabilityEvalMgmtClientImpl implements ArizeAIObservabilityEvalMgmtClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The OrganizationsClient object to access its operations. - */ - private final OrganizationsClient organizations; - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - public OrganizationsClient getOrganizations() { - return this.organizations; - } - - /** - * Initializes an instance of ArizeAIObservabilityEvalMgmtClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - ArizeAIObservabilityEvalMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2024-10-01"; - this.operations = new OperationsClientImpl(this); - this.organizations = new OrganizationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ArizeAIObservabilityEvalMgmtClientImpl.class); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationImpl.java deleted file mode 100644 index 7018a7bbf7f0..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.ActionType; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Operation; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OperationDisplay; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsClientImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsClientImpl.java deleted file mode 100644 index 2fee43f893f2..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OperationsClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ArizeAIObservabilityEvalMgmtClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ArizeAIObservabilityEvalMgmtClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ArizeAIObservabilityEvalMgmtClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ArizeAIObservabilityEvalMgmtClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/ArizeAi.ObservabilityEval/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/ArizeAi.ObservabilityEval/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsImpl.java deleted file mode 100644 index d915d833e8f1..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OperationsImpl.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 com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OperationsClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Operation; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationResourceImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationResourceImpl.java deleted file mode 100644 index 8ce20d42c96a..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationResourceImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.ManagedServiceIdentity; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationProperties; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationResource; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationResourceUpdate; -import java.util.Collections; -import java.util.Map; - -public final class OrganizationResourceImpl - implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update { - private OrganizationResourceInner innerObject; - - private final com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OrganizationProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OrganizationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationname; - - private OrganizationResourceUpdate updateProperties; - - public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public OrganizationResource create() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), Context.NONE); - return this; - } - - public OrganizationResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), context); - return this; - } - - OrganizationResourceImpl(String name, - com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager) { - this.innerObject = new OrganizationResourceInner(); - this.serviceManager = serviceManager; - this.organizationname = name; - } - - public OrganizationResourceImpl update() { - this.updateProperties = new OrganizationResourceUpdate(); - return this; - } - - public OrganizationResource apply() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, context) - .getValue(); - return this; - } - - OrganizationResourceImpl(OrganizationResourceInner innerObject, - com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationname = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - } - - public OrganizationResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, context) - .getValue(); - return this; - } - - public OrganizationResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OrganizationResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OrganizationResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsClientImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsClientImpl.java deleted file mode 100644 index 13ebceb61906..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsClientImpl.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OrganizationsClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.implementation.models.OrganizationResourceListResult; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public final class OrganizationsClientImpl implements OrganizationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OrganizationsService service; - - /** - * The service client containing this operation class. - */ - private final ArizeAIObservabilityEvalMgmtClientImpl client; - - /** - * Initializes an instance of OrganizationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OrganizationsClientImpl(ArizeAIObservabilityEvalMgmtClientImpl client) { - this.service - = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ArizeAIObservabilityEvalMgmtClientOrganizations to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ArizeAIObservabilityEvalMgmtClientOrganizations") - public interface OrganizationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String organizationname) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponseAsync(resourceGroupName, organizationname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationname, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationname, resource); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationname, resource, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationname, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource).getFinalResult(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource, context).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, organizationname, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponse(resourceGroupName, organizationname, properties, Context.NONE).getValue(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String organizationname) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationname) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationname); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname) { - Response response = deleteWithResponse(resourceGroupName, organizationname); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, - Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationname, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationname) { - return beginDeleteAsync(resourceGroupName, organizationname).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname) { - beginDelete(resourceGroupName, organizationname).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname, Context context) { - beginDelete(resourceGroupName, organizationname, context).getFinalResult(); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsImpl.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsImpl.java deleted file mode 100644 index 74e5f4bd65f3..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/OrganizationsImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.OrganizationsClient; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.OrganizationResource; -import com.azure.resourcemanager.arizeaiobservabilityeval.models.Organizations; - -public final class OrganizationsImpl implements Organizations { - private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); - - private final OrganizationsClient innerClient; - - private final com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager; - - public OrganizationsImpl(OrganizationsClient innerClient, - com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OrganizationResourceImpl(inner.getValue(), this.manager())); - } - - public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname) { - OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationname); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String organizationname) { - this.serviceClient().delete(resourceGroupName, organizationname); - } - - public void delete(String resourceGroupName, String organizationname, Context context) { - this.serviceClient().delete(resourceGroupName, organizationname, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public OrganizationResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, context); - } - - private OrganizationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.arizeaiobservabilityeval.ArizeAIObservabilityEvalManager manager() { - return this.serviceManager; - } - - public OrganizationResourceImpl define(String name) { - return new OrganizationResourceImpl(name, this.manager()); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ResourceManagerUtils.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ResourceManagerUtils.java deleted file mode 100644 index 9b8200de4cc3..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OperationListResult.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OperationListResult.java deleted file mode 100644 index 360fe4cd1ea6..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OrganizationResourceListResult.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OrganizationResourceListResult.java deleted file mode 100644 index 721cbb13ca8b..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/models/OrganizationResourceListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OrganizationResource list operation. - */ -@Immutable -public final class OrganizationResourceListResult implements JsonSerializable { - /* - * The OrganizationResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OrganizationResourceListResult class. - */ - private OrganizationResourceListResult() { - } - - /** - * Get the value property: The OrganizationResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceListResult. - */ - public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceListResult deserializedOrganizationResourceListResult - = new OrganizationResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1)); - deserializedOrganizationResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOrganizationResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceListResult; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/package-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/package-info.java deleted file mode 100644 index 61f7578bfdb8..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/implementation/package-info.java +++ /dev/null @@ -1,8 +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 ArizeAIObservabilityEval. - */ -package com.azure.resourcemanager.arizeaiobservabilityeval.implementation; diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ActionType.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ActionType.java deleted file mode 100644 index fd3b4ede098b..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentity.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentity.java deleted file mode 100644 index 79203e56aa99..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentityType.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentityType.java deleted file mode 100644 index bb8e36bbe9d2..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceDetails.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceDetails.java deleted file mode 100644 index 8b1d791ccaf1..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceSubscriptionStatus.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index 0de7b7a3614a..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OfferDetails.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OfferDetails.java deleted file mode 100644 index 22e723116428..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operation.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operation.java deleted file mode 100644 index 685a05b039ec..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OperationDisplay.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OperationDisplay.java deleted file mode 100644 index 6bb8a2e50729..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operations.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operations.java deleted file mode 100644 index 7725ec30d91f..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationProperties.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationProperties.java deleted file mode 100644 index 71bb310a4019..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationProperties.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Organization. - */ -@Fluent -public final class OrganizationProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * partner properties - */ - private PartnerProperties partnerProperties; - - /* - * Single sign-on properties - */ - private SingleSignOnPropertiesV2 singleSignOnProperties; - - /** - * Creates an instance of OrganizationProperties class. - */ - public OrganizationProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: partner properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: partner properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * Get the singleSignOnProperties property: Single sign-on properties. - * - * @return the singleSignOnProperties value. - */ - public SingleSignOnPropertiesV2 singleSignOnProperties() { - return this.singleSignOnProperties; - } - - /** - * Set the singleSignOnProperties property: Single sign-on properties. - * - * @param singleSignOnProperties the singleSignOnProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withSingleSignOnProperties(SingleSignOnPropertiesV2 singleSignOnProperties) { - this.singleSignOnProperties = singleSignOnProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationProperties. - */ - public static OrganizationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationProperties deserializedOrganizationProperties = new OrganizationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedOrganizationProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedOrganizationProperties.user = UserDetails.fromJson(reader); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOrganizationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("singleSignOnProperties".equals(fieldName)) { - deserializedOrganizationProperties.singleSignOnProperties - = SingleSignOnPropertiesV2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationProperties; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResource.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResource.java deleted file mode 100644 index b5772e374eea..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResource.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of OrganizationResource. - */ -public interface OrganizationResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OrganizationProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models.OrganizationResourceInner object. - * - * @return the inner object. - */ - OrganizationResourceInner innerModel(); - - /** - * The entirety of the OrganizationResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The OrganizationResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OrganizationResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OrganizationResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the OrganizationResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the OrganizationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - OrganizationResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OrganizationResource create(Context context); - } - - /** - * The stage of the OrganizationResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the OrganizationResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(OrganizationProperties properties); - } - - /** - * The stage of the OrganizationResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the OrganizationResource resource. - * - * @return the stage of resource update. - */ - OrganizationResource.Update update(); - - /** - * The template for OrganizationResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OrganizationResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OrganizationResource apply(Context context); - } - - /** - * The OrganizationResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OrganizationResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the OrganizationResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OrganizationResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OrganizationResource refresh(Context context); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResourceUpdate.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResourceUpdate.java deleted file mode 100644 index 56a7f9a24273..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/OrganizationResourceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the Organization Resource. - */ -@Fluent -public final class OrganizationResourceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of OrganizationResourceUpdate class. - */ - public OrganizationResourceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdate. - */ - public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdate; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Organizations.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Organizations.java deleted file mode 100644 index 5c839e2d1dcd..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Organizations.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Organizations. - */ -public interface Organizations { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String organizationname, - Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - OrganizationResource getById(String id); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OrganizationResource resource. - * - * @param name resource name. - * @return the first stage of the new OrganizationResource definition. - */ - OrganizationResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Origin.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Origin.java deleted file mode 100644 index cbe0c111b87d..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/PartnerProperties.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/PartnerProperties.java deleted file mode 100644 index 0157f884c1b7..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/PartnerProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner's specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * Description of the Organization's purpose - */ - private String description; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the description property: Description of the Organization's purpose. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the Organization's purpose. - * - * @param description the description value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPartnerProperties.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ResourceProvisioningState.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ResourceProvisioningState.java deleted file mode 100644 index 4b51c6b46abb..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnPropertiesV2.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnPropertiesV2.java deleted file mode 100644 index 455a82f3efca..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnPropertiesV2.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties specific to Single Sign On Resource. - */ -@Fluent -public final class SingleSignOnPropertiesV2 implements JsonSerializable { - /* - * Type of Single Sign-On mechanism being used - */ - private SingleSignOnType type; - - /* - * State of the Single Sign On for the resource - */ - private SingleSignOnStates state; - - /* - * AAD enterprise application Id used to setup SSO - */ - private String enterpriseAppId; - - /* - * URL for SSO to be used by the partner to redirect the user to their system - */ - private String url; - - /* - * List of AAD domains fetched from Microsoft Graph for user. - */ - private List aadDomains; - - /** - * Creates an instance of SingleSignOnPropertiesV2 class. - */ - public SingleSignOnPropertiesV2() { - } - - /** - * Get the type property: Type of Single Sign-On mechanism being used. - * - * @return the type value. - */ - public SingleSignOnType type() { - return this.type; - } - - /** - * Set the type property: Type of Single Sign-On mechanism being used. - * - * @param type the type value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withType(SingleSignOnType type) { - this.type = type; - return this; - } - - /** - * Get the state property: State of the Single Sign On for the resource. - * - * @return the state value. - */ - public SingleSignOnStates state() { - return this.state; - } - - /** - * Set the state property: State of the Single Sign On for the resource. - * - * @param state the state value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withState(SingleSignOnStates state) { - this.state = state; - return this; - } - - /** - * Get the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @return the enterpriseAppId value. - */ - public String enterpriseAppId() { - return this.enterpriseAppId; - } - - /** - * Set the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @param enterpriseAppId the enterpriseAppId value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withEnterpriseAppId(String enterpriseAppId) { - this.enterpriseAppId = enterpriseAppId; - return this; - } - - /** - * Get the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @param url the url value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @return the aadDomains value. - */ - public List aadDomains() { - return this.aadDomains; - } - - /** - * Set the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @param aadDomains the aadDomains value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withAadDomains(List aadDomains) { - this.aadDomains = aadDomains; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SingleSignOnPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SingleSignOnPropertiesV2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SingleSignOnPropertiesV2. - */ - public static SingleSignOnPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SingleSignOnPropertiesV2 deserializedSingleSignOnPropertiesV2 = new SingleSignOnPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.type = SingleSignOnType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.state = SingleSignOnStates.fromString(reader.getString()); - } else if ("enterpriseAppId".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.enterpriseAppId = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.url = reader.getString(); - } else if ("aadDomains".equals(fieldName)) { - List aadDomains = reader.readArray(reader1 -> reader1.getString()); - deserializedSingleSignOnPropertiesV2.aadDomains = aadDomains; - } else { - reader.skipChildren(); - } - } - - return deserializedSingleSignOnPropertiesV2; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnStates.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnStates.java deleted file mode 100644 index ea6e08a24b2f..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnStates.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Various states of the SSO resource. - */ -public final class SingleSignOnStates extends ExpandableStringEnum { - /** - * Initial state of the SSO resource. - */ - public static final SingleSignOnStates INITIAL = fromString("Initial"); - - /** - * State of the SSO resource when it is enabled. - */ - public static final SingleSignOnStates ENABLE = fromString("Enable"); - - /** - * State of the SSO resource when it is disabled. - */ - public static final SingleSignOnStates DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SingleSignOnStates value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnStates() { - } - - /** - * Creates or finds a SingleSignOnStates from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnStates. - */ - public static SingleSignOnStates fromString(String name) { - return fromString(name, SingleSignOnStates.class); - } - - /** - * Gets known SingleSignOnStates values. - * - * @return known SingleSignOnStates values. - */ - public static Collection values() { - return values(SingleSignOnStates.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnType.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnType.java deleted file mode 100644 index 35a44f63d56e..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/SingleSignOnType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the type of Single Sign-On (SSO) mechanism being used. - */ -public final class SingleSignOnType extends ExpandableStringEnum { - /** - * Security Assertion Markup Language (SAML) based Single Sign-On. - */ - public static final SingleSignOnType SAML = fromString("Saml"); - - /** - * OpenID Connect based Single Sign-On. - */ - public static final SingleSignOnType OPEN_ID = fromString("OpenId"); - - /** - * Creates a new instance of SingleSignOnType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnType() { - } - - /** - * Creates or finds a SingleSignOnType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnType. - */ - public static SingleSignOnType fromString(String name) { - return fromString(name, SingleSignOnType.class); - } - - /** - * Gets known SingleSignOnType values. - * - * @return known SingleSignOnType values. - */ - public static Collection values() { - return values(SingleSignOnType.class); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserAssignedIdentity.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserAssignedIdentity.java deleted file mode 100644 index a2acb34cd54c..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserDetails.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserDetails.java deleted file mode 100644 index 6d75ff327f0e..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/UserDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.arizeaiobservabilityeval.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/package-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/package-info.java deleted file mode 100644 index d8c40a0677a9..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for ArizeAIObservabilityEval. - */ -package com.azure.resourcemanager.arizeaiobservabilityeval.models; diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/package-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/package-info.java deleted file mode 100644 index 304e49ad31c6..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/com/azure/resourcemanager/arizeaiobservabilityeval/package-info.java +++ /dev/null @@ -1,8 +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 ArizeAIObservabilityEval. - */ -package com.azure.resourcemanager.arizeaiobservabilityeval; diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/module-info.java b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/module-info.java deleted file mode 100644 index 58dfe986e3aa..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.arizeaiobservabilityeval { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.arizeaiobservabilityeval; - exports com.azure.resourcemanager.arizeaiobservabilityeval.fluent; - exports com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models; - exports com.azure.resourcemanager.arizeaiobservabilityeval.models; - - opens com.azure.resourcemanager.arizeaiobservabilityeval.fluent.models to com.azure.core; - opens com.azure.resourcemanager.arizeaiobservabilityeval.models to com.azure.core; - opens com.azure.resourcemanager.arizeaiobservabilityeval.implementation.models to com.azure.core; -} diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/proxy-config.json b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/proxy-config.json deleted file mode 100644 index 26688bbdfa7a..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.arizeaiobservabilityeval.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.arizeaiobservabilityeval.implementation.OrganizationsClientImpl$OrganizationsService"]] \ No newline at end of file diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/reflect-config.json b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-arizeaiobservabilityeval/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/azure-resourcemanager-arizeaiobservabilityeval.properties b/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/azure-resourcemanager-arizeaiobservabilityeval.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/arizeaiobservabilityeval/azure-resourcemanager-arizeaiobservabilityeval/src/main/resources/azure-resourcemanager-arizeaiobservabilityeval.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesDeallocateSamples.java b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesDeallocateSamples.java index 0dd3dad96131..42e6f7f747d8 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesDeallocateSamples.java +++ b/sdk/compute/azure-resourcemanager-compute/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachinesDeallocateSamples.java @@ -51,5 +51,4 @@ public static void virtualMachineDeallocateMinimumSetGen(com.azure.resourcemanag .getVirtualMachines() .deallocate("rgcompute", "aaaaaaaaaaaaaaaa", true, null, com.azure.core.util.Context.NONE); } - } diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/LambdaTestHyperExecuteManager.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/LambdaTestHyperExecuteManager.java deleted file mode 100644 index 3c872c455aae..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/LambdaTestHyperExecuteManager.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.LambdaTestHyperExecuteMgmtClient; -import com.azure.resourcemanager.lambdatesthyperexecute.implementation.LambdaTestHyperExecuteMgmtClientBuilder; -import com.azure.resourcemanager.lambdatesthyperexecute.implementation.OperationsImpl; -import com.azure.resourcemanager.lambdatesthyperexecute.implementation.OrganizationsImpl; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Operations; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Organizations; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to LambdaTestHyperExecuteManager. - */ -public final class LambdaTestHyperExecuteManager { - private Operations operations; - - private Organizations organizations; - - private final LambdaTestHyperExecuteMgmtClient clientObject; - - private LambdaTestHyperExecuteManager(HttpPipeline httpPipeline, AzureProfile profile, - Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new LambdaTestHyperExecuteMgmtClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of LambdaTest HyperExecute service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the LambdaTest HyperExecute service API instance. - */ - public static LambdaTestHyperExecuteManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of LambdaTest HyperExecute service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the LambdaTest HyperExecute service API instance. - */ - public static LambdaTestHyperExecuteManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new LambdaTestHyperExecuteManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create LambdaTestHyperExecuteManager with optional - * configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new LambdaTestHyperExecuteManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-lambdatesthyperexecute.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of LambdaTest HyperExecute service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the LambdaTest HyperExecute service API instance. - */ - public LambdaTestHyperExecuteManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.lambdatesthyperexecute") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new LambdaTestHyperExecuteManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Organizations. It manages OrganizationResource. - * - * @return Resource collection API of Organizations. - */ - public Organizations organizations() { - if (this.organizations == null) { - this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this); - } - return organizations; - } - - /** - * Gets wrapped service client LambdaTestHyperExecuteMgmtClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client LambdaTestHyperExecuteMgmtClient. - */ - public LambdaTestHyperExecuteMgmtClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/LambdaTestHyperExecuteMgmtClient.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/LambdaTestHyperExecuteMgmtClient.java deleted file mode 100644 index 8393ff302637..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/LambdaTestHyperExecuteMgmtClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for LambdaTestHyperExecuteMgmtClient class. - */ -public interface LambdaTestHyperExecuteMgmtClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - OrganizationsClient getOrganizations(); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OperationsClient.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OperationsClient.java deleted file mode 100644 index 37a078476b7b..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OrganizationsClient.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OrganizationsClient.java deleted file mode 100644 index 0ce7a2028fc5..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/OrganizationsClient.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public interface OrganizationsClient { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OperationInner.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OperationInner.java deleted file mode 100644 index 01bfdeb0f599..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.lambdatesthyperexecute.models.ActionType; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OperationDisplay; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OrganizationResourceInner.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OrganizationResourceInner.java deleted file mode 100644 index 6f7923214f04..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/OrganizationResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.lambdatesthyperexecute.models.ManagedServiceIdentity; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Concrete tracked resource types can be created by aliasing this type using a specific property type. - */ -@Fluent -public final class OrganizationResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private OrganizationProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OrganizationResourceInner class. - */ - public OrganizationResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withProperties(OrganizationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceInner. - */ - public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOrganizationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrganizationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrganizationResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOrganizationResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceInner; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/package-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/package-info.java deleted file mode 100644 index 032563aecc20..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for LambdaTestHyperExecute. - */ -package com.azure.resourcemanager.lambdatesthyperexecute.fluent.models; diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/package-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/package-info.java deleted file mode 100644 index 034356a035e6..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for LambdaTestHyperExecute. - */ -package com.azure.resourcemanager.lambdatesthyperexecute.fluent; diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientBuilder.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientBuilder.java deleted file mode 100644 index 46e7cdf24160..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the LambdaTestHyperExecuteMgmtClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { LambdaTestHyperExecuteMgmtClientImpl.class }) -public final class LambdaTestHyperExecuteMgmtClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the LambdaTestHyperExecuteMgmtClientBuilder. - */ - public LambdaTestHyperExecuteMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of LambdaTestHyperExecuteMgmtClientImpl with the provided parameters. - * - * @return an instance of LambdaTestHyperExecuteMgmtClientImpl. - */ - public LambdaTestHyperExecuteMgmtClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - LambdaTestHyperExecuteMgmtClientImpl client = new LambdaTestHyperExecuteMgmtClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientImpl.java deleted file mode 100644 index bbaa2db33a41..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/LambdaTestHyperExecuteMgmtClientImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.LambdaTestHyperExecuteMgmtClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OperationsClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OrganizationsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the LambdaTestHyperExecuteMgmtClientImpl type. - */ -@ServiceClient(builder = LambdaTestHyperExecuteMgmtClientBuilder.class) -public final class LambdaTestHyperExecuteMgmtClientImpl implements LambdaTestHyperExecuteMgmtClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The OrganizationsClient object to access its operations. - */ - private final OrganizationsClient organizations; - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - public OrganizationsClient getOrganizations() { - return this.organizations; - } - - /** - * Initializes an instance of LambdaTestHyperExecuteMgmtClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - LambdaTestHyperExecuteMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2024-02-01"; - this.operations = new OperationsClientImpl(this); - this.organizations = new OrganizationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LambdaTestHyperExecuteMgmtClientImpl.class); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationImpl.java deleted file mode 100644 index e4c9110ab49b..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; -import com.azure.resourcemanager.lambdatesthyperexecute.models.ActionType; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Operation; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OperationDisplay; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsClientImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsClientImpl.java deleted file mode 100644 index 007174f06763..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OperationsClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; -import com.azure.resourcemanager.lambdatesthyperexecute.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final LambdaTestHyperExecuteMgmtClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(LambdaTestHyperExecuteMgmtClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for LambdaTestHyperExecuteMgmtClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "LambdaTestHyperExecuteMgmtClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/LambdaTest.HyperExecute/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/LambdaTest.HyperExecute/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsImpl.java deleted file mode 100644 index 6dfd9a74e5e6..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OperationsImpl.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 com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OperationsClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Operation; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationResourceImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationResourceImpl.java deleted file mode 100644 index 1fea3335467c..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationResourceImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.lambdatesthyperexecute.models.ManagedServiceIdentity; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationProperties; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationResource; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationResourceUpdate; -import java.util.Collections; -import java.util.Map; - -public final class OrganizationResourceImpl - implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update { - private OrganizationResourceInner innerObject; - - private final com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OrganizationProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OrganizationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationname; - - private OrganizationResourceUpdate updateProperties; - - public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public OrganizationResource create() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), Context.NONE); - return this; - } - - public OrganizationResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), context); - return this; - } - - OrganizationResourceImpl(String name, - com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager) { - this.innerObject = new OrganizationResourceInner(); - this.serviceManager = serviceManager; - this.organizationname = name; - } - - public OrganizationResourceImpl update() { - this.updateProperties = new OrganizationResourceUpdate(); - return this; - } - - public OrganizationResource apply() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, context) - .getValue(); - return this; - } - - OrganizationResourceImpl(OrganizationResourceInner innerObject, - com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationname = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - } - - public OrganizationResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, context) - .getValue(); - return this; - } - - public OrganizationResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OrganizationResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OrganizationResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsClientImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsClientImpl.java deleted file mode 100644 index ade28a5c034d..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsClientImpl.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OrganizationsClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.lambdatesthyperexecute.implementation.models.OrganizationResourceListResult; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public final class OrganizationsClientImpl implements OrganizationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OrganizationsService service; - - /** - * The service client containing this operation class. - */ - private final LambdaTestHyperExecuteMgmtClientImpl client; - - /** - * Initializes an instance of OrganizationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OrganizationsClientImpl(LambdaTestHyperExecuteMgmtClientImpl client) { - this.service - = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for LambdaTestHyperExecuteMgmtClientOrganizations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "LambdaTestHyperExecuteMgmtClientOrganizations") - public interface OrganizationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/LambdaTest.HyperExecute/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/LambdaTest.HyperExecute/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String organizationname) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponseAsync(resourceGroupName, organizationname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationname, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationname, resource); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationname, resource, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationname, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource).getFinalResult(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource, context).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, organizationname, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponse(resourceGroupName, organizationname, properties, Context.NONE).getValue(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String organizationname) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationname) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationname); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname) { - Response response = deleteWithResponse(resourceGroupName, organizationname); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, - Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationname, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationname) { - return beginDeleteAsync(resourceGroupName, organizationname).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname) { - beginDelete(resourceGroupName, organizationname).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname, Context context) { - beginDelete(resourceGroupName, organizationname, context).getFinalResult(); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsImpl.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsImpl.java deleted file mode 100644 index f0d39edbae94..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/OrganizationsImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.OrganizationsClient; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.lambdatesthyperexecute.models.OrganizationResource; -import com.azure.resourcemanager.lambdatesthyperexecute.models.Organizations; - -public final class OrganizationsImpl implements Organizations { - private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); - - private final OrganizationsClient innerClient; - - private final com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager; - - public OrganizationsImpl(OrganizationsClient innerClient, - com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OrganizationResourceImpl(inner.getValue(), this.manager())); - } - - public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname) { - OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationname); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String organizationname) { - this.serviceClient().delete(resourceGroupName, organizationname); - } - - public void delete(String resourceGroupName, String organizationname, Context context) { - this.serviceClient().delete(resourceGroupName, organizationname, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public OrganizationResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, context); - } - - private OrganizationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.lambdatesthyperexecute.LambdaTestHyperExecuteManager manager() { - return this.serviceManager; - } - - public OrganizationResourceImpl define(String name) { - return new OrganizationResourceImpl(name, this.manager()); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/ResourceManagerUtils.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/ResourceManagerUtils.java deleted file mode 100644 index da1c3ed71e79..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OperationListResult.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OperationListResult.java deleted file mode 100644 index 75158119e677..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OrganizationResourceListResult.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OrganizationResourceListResult.java deleted file mode 100644 index 819483db786f..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/models/OrganizationResourceListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OrganizationResource list operation. - */ -@Immutable -public final class OrganizationResourceListResult implements JsonSerializable { - /* - * The OrganizationResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OrganizationResourceListResult class. - */ - private OrganizationResourceListResult() { - } - - /** - * Get the value property: The OrganizationResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceListResult. - */ - public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceListResult deserializedOrganizationResourceListResult - = new OrganizationResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1)); - deserializedOrganizationResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOrganizationResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceListResult; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/package-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/package-info.java deleted file mode 100644 index 5630b696eb6a..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/implementation/package-info.java +++ /dev/null @@ -1,8 +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 LambdaTestHyperExecute. - */ -package com.azure.resourcemanager.lambdatesthyperexecute.implementation; diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ActionType.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ActionType.java deleted file mode 100644 index ed2a4f5ccf43..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentity.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentity.java deleted file mode 100644 index 8113f2f40603..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentityType.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentityType.java deleted file mode 100644 index add99a2eb60e..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceDetails.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceDetails.java deleted file mode 100644 index 7881ca1e0927..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceSubscriptionStatus.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index 9276621187ae..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OfferDetails.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OfferDetails.java deleted file mode 100644 index e3d1c0b7d480..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operation.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operation.java deleted file mode 100644 index 0bca0ebb518e..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OperationDisplay.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OperationDisplay.java deleted file mode 100644 index b737ab0dffc9..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operations.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operations.java deleted file mode 100644 index 92fa0e478b88..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationProperties.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationProperties.java deleted file mode 100644 index 66601ee75490..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationProperties.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Organization. - */ -@Fluent -public final class OrganizationProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * partner properties - */ - private PartnerProperties partnerProperties; - - /* - * Single sign-on properties - */ - private SingleSignOnPropertiesV2 singleSignOnProperties; - - /** - * Creates an instance of OrganizationProperties class. - */ - public OrganizationProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: partner properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: partner properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * Get the singleSignOnProperties property: Single sign-on properties. - * - * @return the singleSignOnProperties value. - */ - public SingleSignOnPropertiesV2 singleSignOnProperties() { - return this.singleSignOnProperties; - } - - /** - * Set the singleSignOnProperties property: Single sign-on properties. - * - * @param singleSignOnProperties the singleSignOnProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withSingleSignOnProperties(SingleSignOnPropertiesV2 singleSignOnProperties) { - this.singleSignOnProperties = singleSignOnProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationProperties. - */ - public static OrganizationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationProperties deserializedOrganizationProperties = new OrganizationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedOrganizationProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedOrganizationProperties.user = UserDetails.fromJson(reader); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOrganizationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("singleSignOnProperties".equals(fieldName)) { - deserializedOrganizationProperties.singleSignOnProperties - = SingleSignOnPropertiesV2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationProperties; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResource.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResource.java deleted file mode 100644 index 195277dc84b4..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResource.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of OrganizationResource. - */ -public interface OrganizationResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OrganizationProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.lambdatesthyperexecute.fluent.models.OrganizationResourceInner object. - * - * @return the inner object. - */ - OrganizationResourceInner innerModel(); - - /** - * The entirety of the OrganizationResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The OrganizationResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OrganizationResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OrganizationResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the OrganizationResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the OrganizationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - OrganizationResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OrganizationResource create(Context context); - } - - /** - * The stage of the OrganizationResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the OrganizationResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(OrganizationProperties properties); - } - - /** - * The stage of the OrganizationResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the OrganizationResource resource. - * - * @return the stage of resource update. - */ - OrganizationResource.Update update(); - - /** - * The template for OrganizationResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OrganizationResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OrganizationResource apply(Context context); - } - - /** - * The OrganizationResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OrganizationResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the OrganizationResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OrganizationResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OrganizationResource refresh(Context context); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResourceUpdate.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResourceUpdate.java deleted file mode 100644 index d6b9c7405b18..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/OrganizationResourceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the Organization Resource. - */ -@Fluent -public final class OrganizationResourceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of OrganizationResourceUpdate class. - */ - public OrganizationResourceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdate. - */ - public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdate; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Organizations.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Organizations.java deleted file mode 100644 index ea7e3e1f6747..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Organizations.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Organizations. - */ -public interface Organizations { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String organizationname, - Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - OrganizationResource getById(String id); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OrganizationResource resource. - * - * @param name resource name. - * @return the first stage of the new OrganizationResource definition. - */ - OrganizationResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Origin.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Origin.java deleted file mode 100644 index b8412528cf1a..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/PartnerProperties.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/PartnerProperties.java deleted file mode 100644 index ba93f2555dab..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/PartnerProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner's specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * The number of licenses subscribed - */ - private int licensesSubscribed; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the licensesSubscribed property: The number of licenses subscribed. - * - * @return the licensesSubscribed value. - */ - public int licensesSubscribed() { - return this.licensesSubscribed; - } - - /** - * Set the licensesSubscribed property: The number of licenses subscribed. - * - * @param licensesSubscribed the licensesSubscribed value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withLicensesSubscribed(int licensesSubscribed) { - this.licensesSubscribed = licensesSubscribed; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("licensesSubscribed", this.licensesSubscribed); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("licensesSubscribed".equals(fieldName)) { - deserializedPartnerProperties.licensesSubscribed = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ResourceProvisioningState.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ResourceProvisioningState.java deleted file mode 100644 index 08c1d908d891..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnPropertiesV2.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnPropertiesV2.java deleted file mode 100644 index 8f92e42736e6..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnPropertiesV2.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties specific to Single Sign On Resource. - */ -@Fluent -public final class SingleSignOnPropertiesV2 implements JsonSerializable { - /* - * Type of Single Sign-On mechanism being used - */ - private SingleSignOnType type; - - /* - * State of the Single Sign On for the resource - */ - private SingleSignOnStates state; - - /* - * AAD enterprise application Id used to setup SSO - */ - private String enterpriseAppId; - - /* - * URL for SSO to be used by the partner to redirect the user to their system - */ - private String url; - - /* - * List of AAD domains fetched from Microsoft Graph for user. - */ - private List aadDomains; - - /** - * Creates an instance of SingleSignOnPropertiesV2 class. - */ - public SingleSignOnPropertiesV2() { - } - - /** - * Get the type property: Type of Single Sign-On mechanism being used. - * - * @return the type value. - */ - public SingleSignOnType type() { - return this.type; - } - - /** - * Set the type property: Type of Single Sign-On mechanism being used. - * - * @param type the type value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withType(SingleSignOnType type) { - this.type = type; - return this; - } - - /** - * Get the state property: State of the Single Sign On for the resource. - * - * @return the state value. - */ - public SingleSignOnStates state() { - return this.state; - } - - /** - * Set the state property: State of the Single Sign On for the resource. - * - * @param state the state value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withState(SingleSignOnStates state) { - this.state = state; - return this; - } - - /** - * Get the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @return the enterpriseAppId value. - */ - public String enterpriseAppId() { - return this.enterpriseAppId; - } - - /** - * Set the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @param enterpriseAppId the enterpriseAppId value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withEnterpriseAppId(String enterpriseAppId) { - this.enterpriseAppId = enterpriseAppId; - return this; - } - - /** - * Get the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @param url the url value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @return the aadDomains value. - */ - public List aadDomains() { - return this.aadDomains; - } - - /** - * Set the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @param aadDomains the aadDomains value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withAadDomains(List aadDomains) { - this.aadDomains = aadDomains; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SingleSignOnPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SingleSignOnPropertiesV2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SingleSignOnPropertiesV2. - */ - public static SingleSignOnPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SingleSignOnPropertiesV2 deserializedSingleSignOnPropertiesV2 = new SingleSignOnPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.type = SingleSignOnType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.state = SingleSignOnStates.fromString(reader.getString()); - } else if ("enterpriseAppId".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.enterpriseAppId = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.url = reader.getString(); - } else if ("aadDomains".equals(fieldName)) { - List aadDomains = reader.readArray(reader1 -> reader1.getString()); - deserializedSingleSignOnPropertiesV2.aadDomains = aadDomains; - } else { - reader.skipChildren(); - } - } - - return deserializedSingleSignOnPropertiesV2; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnStates.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnStates.java deleted file mode 100644 index f1855561ec2d..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnStates.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Various states of the SSO resource. - */ -public final class SingleSignOnStates extends ExpandableStringEnum { - /** - * Initial state of the SSO resource. - */ - public static final SingleSignOnStates INITIAL = fromString("Initial"); - - /** - * State of the SSO resource when it is enabled. - */ - public static final SingleSignOnStates ENABLE = fromString("Enable"); - - /** - * State of the SSO resource when it is disabled. - */ - public static final SingleSignOnStates DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SingleSignOnStates value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnStates() { - } - - /** - * Creates or finds a SingleSignOnStates from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnStates. - */ - public static SingleSignOnStates fromString(String name) { - return fromString(name, SingleSignOnStates.class); - } - - /** - * Gets known SingleSignOnStates values. - * - * @return known SingleSignOnStates values. - */ - public static Collection values() { - return values(SingleSignOnStates.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnType.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnType.java deleted file mode 100644 index bbfc870f0bfb..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/SingleSignOnType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the type of Single Sign-On (SSO) mechanism being used. - */ -public final class SingleSignOnType extends ExpandableStringEnum { - /** - * Security Assertion Markup Language (SAML) based Single Sign-On. - */ - public static final SingleSignOnType SAML = fromString("Saml"); - - /** - * OpenID Connect based Single Sign-On. - */ - public static final SingleSignOnType OPEN_ID = fromString("OpenId"); - - /** - * Creates a new instance of SingleSignOnType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnType() { - } - - /** - * Creates or finds a SingleSignOnType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnType. - */ - public static SingleSignOnType fromString(String name) { - return fromString(name, SingleSignOnType.class); - } - - /** - * Gets known SingleSignOnType values. - * - * @return known SingleSignOnType values. - */ - public static Collection values() { - return values(SingleSignOnType.class); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserAssignedIdentity.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserAssignedIdentity.java deleted file mode 100644 index c33beb90f945..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserDetails.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserDetails.java deleted file mode 100644 index db5185a2165f..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/UserDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.lambdatesthyperexecute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/package-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/package-info.java deleted file mode 100644 index ef720367ec61..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for LambdaTestHyperExecute. - */ -package com.azure.resourcemanager.lambdatesthyperexecute.models; diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/package-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/package-info.java deleted file mode 100644 index 072419c50655..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/com/azure/resourcemanager/lambdatesthyperexecute/package-info.java +++ /dev/null @@ -1,8 +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 LambdaTestHyperExecute. - */ -package com.azure.resourcemanager.lambdatesthyperexecute; diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/module-info.java b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/module-info.java deleted file mode 100644 index 5866545ed3b0..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.lambdatesthyperexecute { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.lambdatesthyperexecute; - exports com.azure.resourcemanager.lambdatesthyperexecute.fluent; - exports com.azure.resourcemanager.lambdatesthyperexecute.fluent.models; - exports com.azure.resourcemanager.lambdatesthyperexecute.models; - - opens com.azure.resourcemanager.lambdatesthyperexecute.fluent.models to com.azure.core; - opens com.azure.resourcemanager.lambdatesthyperexecute.models to com.azure.core; - opens com.azure.resourcemanager.lambdatesthyperexecute.implementation.models to com.azure.core; -} diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/proxy-config.json b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/proxy-config.json deleted file mode 100644 index 312265ab0ab5..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.lambdatesthyperexecute.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.lambdatesthyperexecute.implementation.OrganizationsClientImpl$OrganizationsService"]] \ No newline at end of file diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/reflect-config.json b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-lambdatesthyperexecute/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/azure-resourcemanager-lambdatesthyperexecute.properties b/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/azure-resourcemanager-lambdatesthyperexecute.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/lambdatesthyperexecute/azure-resourcemanager-lambdatesthyperexecute/src/main/resources/azure-resourcemanager-lambdatesthyperexecute.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/MongoDBAtlasManager.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/MongoDBAtlasManager.java deleted file mode 100644 index 9bad5713b2ee..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/MongoDBAtlasManager.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mongodbatlas.fluent.MongoDBAtlasManagementClient; -import com.azure.resourcemanager.mongodbatlas.implementation.ClustersImpl; -import com.azure.resourcemanager.mongodbatlas.implementation.MongoDBAtlasManagementClientBuilder; -import com.azure.resourcemanager.mongodbatlas.implementation.OperationsImpl; -import com.azure.resourcemanager.mongodbatlas.implementation.OrganizationsImpl; -import com.azure.resourcemanager.mongodbatlas.implementation.ProjectsImpl; -import com.azure.resourcemanager.mongodbatlas.models.Clusters; -import com.azure.resourcemanager.mongodbatlas.models.Operations; -import com.azure.resourcemanager.mongodbatlas.models.Organizations; -import com.azure.resourcemanager.mongodbatlas.models.Projects; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to MongoDBAtlasManager. - */ -public final class MongoDBAtlasManager { - private Operations operations; - - private Organizations organizations; - - private Projects projects; - - private Clusters clusters; - - private final MongoDBAtlasManagementClient clientObject; - - private MongoDBAtlasManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new MongoDBAtlasManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Mongo DB Atlas service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Mongo DB Atlas service API instance. - */ - public static MongoDBAtlasManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of Mongo DB Atlas service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Mongo DB Atlas service API instance. - */ - public static MongoDBAtlasManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new MongoDBAtlasManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create MongoDBAtlasManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new MongoDBAtlasManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-mongodbatlas.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of Mongo DB Atlas service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Mongo DB Atlas service API instance. - */ - public MongoDBAtlasManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.mongodbatlas") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new MongoDBAtlasManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Organizations. It manages OrganizationResource. - * - * @return Resource collection API of Organizations. - */ - public Organizations organizations() { - if (this.organizations == null) { - this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this); - } - return organizations; - } - - /** - * Gets the resource collection API of Projects. It manages Project. - * - * @return Resource collection API of Projects. - */ - public Projects projects() { - if (this.projects == null) { - this.projects = new ProjectsImpl(clientObject.getProjects(), this); - } - return projects; - } - - /** - * Gets the resource collection API of Clusters. It manages Cluster. - * - * @return Resource collection API of Clusters. - */ - public Clusters clusters() { - if (this.clusters == null) { - this.clusters = new ClustersImpl(clientObject.getClusters(), this); - } - return clusters; - } - - /** - * Gets wrapped service client MongoDBAtlasManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - * - * @return Wrapped service client MongoDBAtlasManagementClient. - */ - public MongoDBAtlasManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ClustersClient.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ClustersClient.java deleted file mode 100644 index 5bf296d9cb8b..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ClustersClient.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; - -/** - * An instance of this class provides access to all the operations defined in ClustersClient. - */ -public interface ClustersClient { - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource); - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource, Context context); - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String clusterName, ClusterInner resource); - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String clusterName, ClusterInner resource, Context context); - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, String clusterName); - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, String clusterName, Context context); - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String clusterName); - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, String clusterName, - Context context); - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String organizationName, String projectName); - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String organizationName, String projectName, - Context context); - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String clusterName, Context context); - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner get(String resourceGroupName, String organizationName, String projectName, String clusterName); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/MongoDBAtlasManagementClient.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/MongoDBAtlasManagementClient.java deleted file mode 100644 index 3202523dea99..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/MongoDBAtlasManagementClient.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for MongoDBAtlasManagementClient class. - */ -public interface MongoDBAtlasManagementClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - OrganizationsClient getOrganizations(); - - /** - * Gets the ProjectsClient object to access its operations. - * - * @return the ProjectsClient object. - */ - ProjectsClient getProjects(); - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - ClustersClient getClusters(); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OperationsClient.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OperationsClient.java deleted file mode 100644 index e7982c93766b..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OrganizationsClient.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OrganizationsClient.java deleted file mode 100644 index e9f12c58a5c3..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/OrganizationsClient.java +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public interface OrganizationsClient { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationName, Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationName); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationName, OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationName, OrganizationResourceInner resource, Context context); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationName, - OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationName, - OrganizationResourceInner resource, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName, - String organizationName, OrganizationResourceUpdate properties); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName, - String organizationName, OrganizationResourceUpdate properties, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ProjectsClient.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ProjectsClient.java deleted file mode 100644 index f2c1b2500c45..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/ProjectsClient.java +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner; - -/** - * An instance of this class provides access to all the operations defined in ProjectsClient. - */ -public interface ProjectsClient { - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - Context context); - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner get(String resourceGroupName, String organizationName, String projectName); - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProjectInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource); - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ProjectInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource, Context context); - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - ProjectInner resource); - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ProjectInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - ProjectInner resource, Context context); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, Context context); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationName, String projectName, Context context); - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String organizationName); - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String organizationName, Context context); - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response tierLimitReachedWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context); - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TierLimitReachedResponseInner tierLimitReached(String resourceGroupName, String organizationName, - String projectName); - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listClusterTierRegionsWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context); - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegionsByTierResponseInner listClusterTierRegions(String resourceGroupName, String organizationName, - String projectName); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ClusterInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ClusterInner.java deleted file mode 100644 index 903a9f6a4361..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ClusterInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.ClusterProperties; -import java.io.IOException; - -/** - * The MongoDB Atlas Cluster resource type. A cluster is a managed database deployment within a project. - */ -@Fluent -public final class ClusterInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ClusterProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ClusterInner class. - */ - public ClusterInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public ClusterProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withProperties(ClusterProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ClusterInner. - */ - public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterInner deserializedClusterInner = new ClusterInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedClusterInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedClusterInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedClusterInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedClusterInner.properties = ClusterProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedClusterInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OperationInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OperationInner.java deleted file mode 100644 index b91eee6bee75..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.ActionType; -import com.azure.resourcemanager.mongodbatlas.models.OperationDisplay; -import com.azure.resourcemanager.mongodbatlas.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OrganizationResourceInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OrganizationResourceInner.java deleted file mode 100644 index d7eda445a152..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/OrganizationResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.ManagedServiceIdentity; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * The resource model definition for an Azure Organization. - */ -@Fluent -public final class OrganizationResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private OrganizationProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OrganizationResourceInner class. - */ - public OrganizationResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withProperties(OrganizationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceInner. - */ - public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOrganizationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrganizationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrganizationResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOrganizationResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ProjectInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ProjectInner.java deleted file mode 100644 index fcfb799287f8..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/ProjectInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.ProjectProperties; -import java.io.IOException; - -/** - * The MongoDB Atlas Project resource type. A project is a logical grouping of clusters within an organization. - */ -@Fluent -public final class ProjectInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ProjectProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ProjectInner class. - */ - public ProjectInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public ProjectProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the ProjectInner object itself. - */ - public ProjectInner withProperties(ProjectProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProjectInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProjectInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProjectInner. - */ - public static ProjectInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProjectInner deserializedProjectInner = new ProjectInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedProjectInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProjectInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedProjectInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedProjectInner.properties = ProjectProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedProjectInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProjectInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/RegionsByTierResponseInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/RegionsByTierResponseInner.java deleted file mode 100644 index eb48746a7d38..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/RegionsByTierResponseInner.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.TierRegions; -import java.io.IOException; -import java.util.List; - -/** - * Response for regions by cluster tier. - */ -@Immutable -public final class RegionsByTierResponseInner implements JsonSerializable { - /* - * Atlas organization id. - */ - private String organizationId; - - /* - * Atlas project id. - */ - private String projectId; - - /* - * List of cluster tiers and their supported regions. - */ - private List regionsByTier; - - /** - * Creates an instance of RegionsByTierResponseInner class. - */ - private RegionsByTierResponseInner() { - } - - /** - * Get the organizationId property: Atlas organization id. - * - * @return the organizationId value. - */ - public String organizationId() { - return this.organizationId; - } - - /** - * Get the projectId property: Atlas project id. - * - * @return the projectId value. - */ - public String projectId() { - return this.projectId; - } - - /** - * Get the regionsByTier property: List of cluster tiers and their supported regions. - * - * @return the regionsByTier value. - */ - public List regionsByTier() { - return this.regionsByTier; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegionsByTierResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegionsByTierResponseInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RegionsByTierResponseInner. - */ - public static RegionsByTierResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegionsByTierResponseInner deserializedRegionsByTierResponseInner = new RegionsByTierResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("organizationId".equals(fieldName)) { - deserializedRegionsByTierResponseInner.organizationId = reader.getString(); - } else if ("projectId".equals(fieldName)) { - deserializedRegionsByTierResponseInner.projectId = reader.getString(); - } else if ("regionsByTier".equals(fieldName)) { - List regionsByTier = reader.readArray(reader1 -> TierRegions.fromJson(reader1)); - deserializedRegionsByTierResponseInner.regionsByTier = regionsByTier; - } else { - reader.skipChildren(); - } - } - - return deserializedRegionsByTierResponseInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/TierLimitReachedResponseInner.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/TierLimitReachedResponseInner.java deleted file mode 100644 index 88f1ab0efe0c..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/TierLimitReachedResponseInner.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.models.ProjectLimitStatus; -import java.io.IOException; -import java.util.List; - -/** - * Response for tier limit check. - */ -@Immutable -public final class TierLimitReachedResponseInner implements JsonSerializable { - /* - * List of project limit statuses. - */ - private List limits; - - /** - * Creates an instance of TierLimitReachedResponseInner class. - */ - private TierLimitReachedResponseInner() { - } - - /** - * Get the limits property: List of project limit statuses. - * - * @return the limits value. - */ - public List limits() { - return this.limits; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TierLimitReachedResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TierLimitReachedResponseInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TierLimitReachedResponseInner. - */ - public static TierLimitReachedResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TierLimitReachedResponseInner deserializedTierLimitReachedResponseInner - = new TierLimitReachedResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limits".equals(fieldName)) { - List limits = reader.readArray(reader1 -> ProjectLimitStatus.fromJson(reader1)); - deserializedTierLimitReachedResponseInner.limits = limits; - } else { - reader.skipChildren(); - } - } - - return deserializedTierLimitReachedResponseInner; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/package-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/package-info.java deleted file mode 100644 index a124eb9f73a1..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for MongoDBAtlas. - */ -package com.azure.resourcemanager.mongodbatlas.fluent.models; diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/package-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/package-info.java deleted file mode 100644 index b6e8c15cf1c9..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for MongoDBAtlas. - */ -package com.azure.resourcemanager.mongodbatlas.fluent; diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClusterImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClusterImpl.java deleted file mode 100644 index cd8aa25deb53..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClusterImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; -import com.azure.resourcemanager.mongodbatlas.models.Cluster; -import com.azure.resourcemanager.mongodbatlas.models.ClusterProperties; - -public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { - private ClusterInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ClusterProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ClusterInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - private String clusterName; - - public ClusterImpl withExistingProject(String resourceGroupName, String organizationName, String projectName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - this.projectName = projectName; - return this; - } - - public Cluster create() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, organizationName, projectName, clusterName, this.innerModel(), - Context.NONE); - return this; - } - - public Cluster create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, organizationName, projectName, clusterName, this.innerModel(), context); - return this; - } - - ClusterImpl(String name, com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = new ClusterInner(); - this.serviceManager = serviceManager; - this.clusterName = name; - } - - public ClusterImpl update() { - return this; - } - - public Cluster apply() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, organizationName, projectName, clusterName, this.innerModel(), - Context.NONE); - return this; - } - - public Cluster apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, organizationName, projectName, clusterName, this.innerModel(), context); - return this; - } - - ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - } - - public Cluster refresh() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, organizationName, projectName, clusterName, Context.NONE) - .getValue(); - return this; - } - - public Cluster refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, organizationName, projectName, clusterName, context) - .getValue(); - return this; - } - - public ClusterImpl withProperties(ClusterProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersClientImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersClientImpl.java deleted file mode 100644 index 816b8f62d811..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersClientImpl.java +++ /dev/null @@ -1,800 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.ClustersClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; -import com.azure.resourcemanager.mongodbatlas.implementation.models.ClusterListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClustersClient. - */ -public final class ClustersClientImpl implements ClustersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClustersService service; - - /** - * The service client containing this operation class. - */ - private final MongoDBAtlasManagementClientImpl client; - - /** - * Initializes an instance of ClustersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClustersClientImpl(MongoDBAtlasManagementClientImpl client) { - this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MongoDBAtlasManagementClientClusters to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "MongoDBAtlasManagementClientClusters") - public interface ClustersService { - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterInner resource, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, - contentType, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - String projectName, String clusterName, ClusterInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, contentType, - accept, resource, Context.NONE); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - String projectName, String clusterName, ClusterInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, contentType, - accept, resource, context); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, projectName, clusterName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationName, projectName, clusterName, resource); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - Context.NONE); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, String clusterName, ClusterInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationName, projectName, - clusterName, resource, context); - return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, - context); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, String clusterName, ClusterInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, clusterName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String clusterName, ClusterInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationName, projectName, clusterName, resource) - .getFinalResult(); - } - - /** - * Create a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Cluster resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - String clusterName, ClusterInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationName, projectName, clusterName, resource, context) - .getFinalResult(); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String clusterName) { - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName, - String projectName, String clusterName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, - Context.NONE); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName, - String projectName, String clusterName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, context); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationName, - String projectName, String clusterName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, organizationName, projectName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, String clusterName) { - Response response - = deleteWithResponse(resourceGroupName, organizationName, projectName, clusterName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, String clusterName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, organizationName, projectName, clusterName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName, - String clusterName) { - return beginDeleteAsync(resourceGroupName, organizationName, projectName, clusterName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String clusterName) { - beginDelete(resourceGroupName, organizationName, projectName, clusterName).getFinalResult(); - } - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, String clusterName, - Context context) { - beginDelete(resourceGroupName, organizationName, projectName, clusterName, context).getFinalResult(); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String organizationName, - String projectName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String organizationName, String projectName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, organizationName, projectName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String organizationName, - String projectName) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String organizationName, - String projectName, Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String organizationName, String projectName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, organizationName, projectName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, organizationName, projectName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName, String clusterName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, clusterName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName, - String clusterName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName, clusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String clusterName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, clusterName, accept, context); - } - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner get(String resourceGroupName, String organizationName, String projectName, String clusterName) { - return getWithResponse(resourceGroupName, organizationName, projectName, clusterName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersImpl.java deleted file mode 100644 index 681b298b52a6..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ClustersImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mongodbatlas.fluent.ClustersClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; -import com.azure.resourcemanager.mongodbatlas.models.Cluster; -import com.azure.resourcemanager.mongodbatlas.models.Clusters; - -public final class ClustersImpl implements Clusters { - private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); - - private final ClustersClient innerClient; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public ClustersImpl(ClustersClient innerClient, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String clusterName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, clusterName); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, String clusterName, - Context context) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, clusterName, context); - } - - public PagedIterable list(String resourceGroupName, String organizationName, String projectName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, organizationName, projectName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String organizationName, String projectName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, organizationName, projectName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String clusterName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, organizationName, projectName, clusterName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterImpl(inner.getValue(), this.manager())); - } - - public Cluster get(String resourceGroupName, String organizationName, String projectName, String clusterName) { - ClusterInner inner = this.serviceClient().get(resourceGroupName, organizationName, projectName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Cluster getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, clusterName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, clusterName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, organizationName, projectName, clusterName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, organizationName, projectName, clusterName, context); - } - - private ClustersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - public ClusterImpl define(String name) { - return new ClusterImpl(name, this.manager()); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientBuilder.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientBuilder.java deleted file mode 100644 index 88bd1f084e6b..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the MongoDBAtlasManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { MongoDBAtlasManagementClientImpl.class }) -public final class MongoDBAtlasManagementClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the MongoDBAtlasManagementClientBuilder. - */ - public MongoDBAtlasManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of MongoDBAtlasManagementClientImpl with the provided parameters. - * - * @return an instance of MongoDBAtlasManagementClientImpl. - */ - public MongoDBAtlasManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - MongoDBAtlasManagementClientImpl client = new MongoDBAtlasManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientImpl.java deleted file mode 100644 index 36b3bf02def2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/MongoDBAtlasManagementClientImpl.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.mongodbatlas.fluent.ClustersClient; -import com.azure.resourcemanager.mongodbatlas.fluent.MongoDBAtlasManagementClient; -import com.azure.resourcemanager.mongodbatlas.fluent.OperationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.OrganizationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.ProjectsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the MongoDBAtlasManagementClientImpl type. - */ -@ServiceClient(builder = MongoDBAtlasManagementClientBuilder.class) -public final class MongoDBAtlasManagementClientImpl implements MongoDBAtlasManagementClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The OrganizationsClient object to access its operations. - */ - private final OrganizationsClient organizations; - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - public OrganizationsClient getOrganizations() { - return this.organizations; - } - - /** - * The ProjectsClient object to access its operations. - */ - private final ProjectsClient projects; - - /** - * Gets the ProjectsClient object to access its operations. - * - * @return the ProjectsClient object. - */ - public ProjectsClient getProjects() { - return this.projects; - } - - /** - * The ClustersClient object to access its operations. - */ - private final ClustersClient clusters; - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - public ClustersClient getClusters() { - return this.clusters; - } - - /** - * Initializes an instance of MongoDBAtlasManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - MongoDBAtlasManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2026-03-01-preview"; - this.operations = new OperationsClientImpl(this); - this.organizations = new OrganizationsClientImpl(this); - this.projects = new ProjectsClientImpl(this); - this.clusters = new ClustersClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MongoDBAtlasManagementClientImpl.class); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationImpl.java deleted file mode 100644 index 5a3077d85e4e..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; -import com.azure.resourcemanager.mongodbatlas.models.ActionType; -import com.azure.resourcemanager.mongodbatlas.models.Operation; -import com.azure.resourcemanager.mongodbatlas.models.OperationDisplay; -import com.azure.resourcemanager.mongodbatlas.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsClientImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsClientImpl.java deleted file mode 100644 index 68ab236f5cff..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.mongodbatlas.fluent.OperationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; -import com.azure.resourcemanager.mongodbatlas.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final MongoDBAtlasManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(MongoDBAtlasManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MongoDBAtlasManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "MongoDBAtlasManagementClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/MongoDB.Atlas/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/MongoDB.Atlas/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsImpl.java deleted file mode 100644 index 141a43f5fef6..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OperationsImpl.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 com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mongodbatlas.fluent.OperationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; -import com.azure.resourcemanager.mongodbatlas.models.Operation; -import com.azure.resourcemanager.mongodbatlas.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationResourceImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationResourceImpl.java deleted file mode 100644 index 2eeb99f67c5f..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationResourceImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.mongodbatlas.models.ManagedServiceIdentity; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationProperties; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResource; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResourceUpdate; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResourceUpdateProperties; -import java.util.Collections; -import java.util.Map; - -public final class OrganizationResourceImpl - implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update { - private OrganizationResourceInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OrganizationProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OrganizationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationName; - - private OrganizationResourceUpdate updateProperties; - - public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public OrganizationResource create() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationName, this.innerModel(), Context.NONE); - return this; - } - - public OrganizationResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationName, this.innerModel(), context); - return this; - } - - OrganizationResourceImpl(String name, com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = new OrganizationResourceInner(); - this.serviceManager = serviceManager; - this.organizationName = name; - } - - public OrganizationResourceImpl update() { - this.updateProperties = new OrganizationResourceUpdate(); - return this; - } - - public OrganizationResource apply() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .update(resourceGroupName, organizationName, updateProperties, Context.NONE); - return this; - } - - public OrganizationResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .update(resourceGroupName, organizationName, updateProperties, context); - return this; - } - - OrganizationResourceImpl(OrganizationResourceInner innerObject, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - } - - public OrganizationResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationName, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationName, context) - .getValue(); - return this; - } - - public OrganizationResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OrganizationResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OrganizationResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationResourceUpdateProperties properties) { - this.updateProperties.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsClientImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsClientImpl.java deleted file mode 100644 index f0fa19de6932..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsClientImpl.java +++ /dev/null @@ -1,1117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.OrganizationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.mongodbatlas.implementation.models.OrganizationResourceListResult; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public final class OrganizationsClientImpl implements OrganizationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OrganizationsService service; - - /** - * The service client containing this operation class. - */ - private final MongoDBAtlasManagementClientImpl client; - - /** - * Initializes an instance of OrganizationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OrganizationsClientImpl(MongoDBAtlasManagementClientImpl client) { - this.service - = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MongoDBAtlasManagementClientOrganizations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "MongoDBAtlasManagementClientOrganizations") - public interface OrganizationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String organizationName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String organizationName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, organizationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationName, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, accept, context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationName) { - return getByResourceGroupWithResponse(resourceGroupName, organizationName, Context.NONE).getValue(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - OrganizationResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, resource, - context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationName, OrganizationResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationName, OrganizationResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationName, resource); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationName, OrganizationResourceInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationName, resource, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - OrganizationResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationName, - OrganizationResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationName, resource).getFinalResult(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationName, - OrganizationResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationName, resource, context).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, properties, - Context.NONE); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, contentType, accept, properties, - context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> - beginUpdateAsync(String resourceGroupName, String organizationName, OrganizationResourceUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, organizationName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginUpdate(String resourceGroupName, String organizationName, OrganizationResourceUpdate properties) { - Response response = updateWithResponse(resourceGroupName, organizationName, properties); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginUpdate( - String resourceGroupName, String organizationName, OrganizationResourceUpdate properties, Context context) { - Response response = updateWithResponse(resourceGroupName, organizationName, properties, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties) { - return beginUpdateAsync(resourceGroupName, organizationName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties) { - return beginUpdate(resourceGroupName, organizationName, properties).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource model definition for an Azure Organization. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationName, - OrganizationResourceUpdate properties, Context context) { - return beginUpdate(resourceGroupName, organizationName, properties, context).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String organizationName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName) { - Response response = deleteWithResponse(resourceGroupName, organizationName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName) { - return beginDeleteAsync(resourceGroupName, organizationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName) { - beginDelete(resourceGroupName, organizationName).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, Context context) { - beginDelete(resourceGroupName, organizationName, context).getFinalResult(); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsImpl.java deleted file mode 100644 index 7c2966b944ae..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/OrganizationsImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mongodbatlas.fluent.OrganizationsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.mongodbatlas.models.OrganizationResource; -import com.azure.resourcemanager.mongodbatlas.models.Organizations; - -public final class OrganizationsImpl implements Organizations { - private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); - - private final OrganizationsClient innerClient; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public OrganizationsImpl(OrganizationsClient innerClient, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OrganizationResourceImpl(inner.getValue(), this.manager())); - } - - public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationName) { - OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationName); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String organizationName) { - this.serviceClient().delete(resourceGroupName, organizationName); - } - - public void delete(String resourceGroupName, String organizationName, Context context) { - this.serviceClient().delete(resourceGroupName, organizationName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public OrganizationResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationName, context); - } - - private OrganizationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - public OrganizationResourceImpl define(String name) { - return new OrganizationResourceImpl(name, this.manager()); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectImpl.java deleted file mode 100644 index 371f7b686c11..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; -import com.azure.resourcemanager.mongodbatlas.models.Project; -import com.azure.resourcemanager.mongodbatlas.models.ProjectProperties; -import com.azure.resourcemanager.mongodbatlas.models.RegionsByTierResponse; -import com.azure.resourcemanager.mongodbatlas.models.TierLimitReachedResponse; - -public final class ProjectImpl implements Project, Project.Definition, Project.Update { - private ProjectInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ProjectProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ProjectInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationName; - - private String projectName; - - public ProjectImpl withExistingOrganization(String resourceGroupName, String organizationName) { - this.resourceGroupName = resourceGroupName; - this.organizationName = organizationName; - return this; - } - - public Project create() { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), Context.NONE); - return this; - } - - public Project create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), context); - return this; - } - - ProjectImpl(String name, com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = new ProjectInner(); - this.serviceManager = serviceManager; - this.projectName = name; - } - - public ProjectImpl update() { - return this; - } - - public Project apply() { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), Context.NONE); - return this; - } - - public Project apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .createOrUpdate(resourceGroupName, organizationName, projectName, this.innerModel(), context); - return this; - } - - ProjectImpl(ProjectInner innerObject, com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - this.projectName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "projects"); - } - - public Project refresh() { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .getWithResponse(resourceGroupName, organizationName, projectName, Context.NONE) - .getValue(); - return this; - } - - public Project refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getProjects() - .getWithResponse(resourceGroupName, organizationName, projectName, context) - .getValue(); - return this; - } - - public Response tierLimitReachedWithResponse(Context context) { - return serviceManager.projects() - .tierLimitReachedWithResponse(resourceGroupName, organizationName, projectName, context); - } - - public TierLimitReachedResponse tierLimitReached() { - return serviceManager.projects().tierLimitReached(resourceGroupName, organizationName, projectName); - } - - public Response listClusterTierRegionsWithResponse(Context context) { - return serviceManager.projects() - .listClusterTierRegionsWithResponse(resourceGroupName, organizationName, projectName, context); - } - - public RegionsByTierResponse listClusterTierRegions() { - return serviceManager.projects().listClusterTierRegions(resourceGroupName, organizationName, projectName); - } - - public ProjectImpl withProperties(ProjectProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsClientImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsClientImpl.java deleted file mode 100644 index d0981a217313..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsClientImpl.java +++ /dev/null @@ -1,958 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mongodbatlas.fluent.ProjectsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner; -import com.azure.resourcemanager.mongodbatlas.implementation.models.ProjectListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ProjectsClient. - */ -public final class ProjectsClientImpl implements ProjectsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ProjectsService service; - - /** - * The service client containing this operation class. - */ - private final MongoDBAtlasManagementClientImpl client; - - /** - * Initializes an instance of ProjectsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ProjectsClientImpl(MongoDBAtlasManagementClientImpl client) { - this.service = RestProxy.create(ProjectsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MongoDBAtlasManagementClientProjects to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "MongoDBAtlasManagementClientProjects") - public interface ProjectsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ProjectInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ProjectInner resource, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/tierLimitReached") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> tierLimitReached(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/tierLimitReached") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response tierLimitReachedSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusterTierRegions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterTierRegions(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusterTierRegions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listClusterTierRegionsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationName") String organizationName, @PathParam("projectName") String projectName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String organizationName, - String projectName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String organizationName, String projectName) { - return getWithResponseAsync(resourceGroupName, organizationName, projectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, organizationName, projectName, accept, context); - } - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner get(String resourceGroupName, String organizationName, String projectName) { - return getWithResponse(resourceGroupName, organizationName, projectName, Context.NONE).getValue(); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, contentType, accept, - resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - String projectName, ProjectInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, contentType, accept, - resource, Context.NONE); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationName, - String projectName, ProjectInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, contentType, accept, - resource, context); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProjectInner> beginCreateOrUpdateAsync(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationName, projectName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ProjectInner.class, ProjectInner.class, this.client.getContext()); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProjectInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationName, projectName, resource); - return this.client.getLroResult(response, ProjectInner.class, ProjectInner.class, - Context.NONE); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ProjectInner> beginCreateOrUpdate(String resourceGroupName, - String organizationName, String projectName, ProjectInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationName, projectName, resource, context); - return this.client.getLroResult(response, ProjectInner.class, ProjectInner.class, - context); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationName, - String projectName, ProjectInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationName, projectName, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - ProjectInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationName, projectName, resource).getFinalResult(); - } - - /** - * Create a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the MongoDB Atlas Project resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ProjectInner createOrUpdate(String resourceGroupName, String organizationName, String projectName, - ProjectInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationName, projectName, resource, context) - .getFinalResult(); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String organizationName, - String projectName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName, - String projectName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, Context.NONE); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationName, - String projectName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, context); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationName, - String projectName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, organizationName, projectName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName) { - Response response = deleteWithResponse(resourceGroupName, organizationName, projectName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationName, - String projectName, Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationName, projectName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationName, String projectName) { - return beginDeleteAsync(resourceGroupName, organizationName, projectName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName) { - beginDelete(resourceGroupName, organizationName, projectName).getFinalResult(); - } - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationName, String projectName, Context context) { - beginDelete(resourceGroupName, organizationName, projectName, context).getFinalResult(); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String organizationName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String organizationName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, organizationName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String organizationName) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String organizationName, - Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String organizationName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, organizationName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String organizationName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, organizationName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> tierLimitReachedWithResponseAsync(String resourceGroupName, - String organizationName, String projectName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.tierLimitReached(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono tierLimitReachedAsync(String resourceGroupName, String organizationName, - String projectName) { - return tierLimitReachedWithResponseAsync(resourceGroupName, organizationName, projectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response tierLimitReachedWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context) { - final String accept = "application/json"; - return service.tierLimitReachedSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context); - } - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TierLimitReachedResponseInner tierLimitReached(String resourceGroupName, String organizationName, - String projectName) { - return tierLimitReachedWithResponse(resourceGroupName, organizationName, projectName, Context.NONE).getValue(); - } - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listClusterTierRegionsWithResponseAsync(String resourceGroupName, - String organizationName, String projectName) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listClusterTierRegions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listClusterTierRegionsAsync(String resourceGroupName, - String organizationName, String projectName) { - return listClusterTierRegionsWithResponseAsync(resourceGroupName, organizationName, projectName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listClusterTierRegionsWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context) { - final String accept = "application/json"; - return service.listClusterTierRegionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationName, projectName, accept, context); - } - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegionsByTierResponseInner listClusterTierRegions(String resourceGroupName, String organizationName, - String projectName) { - return listClusterTierRegionsWithResponse(resourceGroupName, organizationName, projectName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsImpl.java deleted file mode 100644 index f4d120fb526d..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ProjectsImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mongodbatlas.fluent.ProjectsClient; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner; -import com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner; -import com.azure.resourcemanager.mongodbatlas.models.Project; -import com.azure.resourcemanager.mongodbatlas.models.Projects; -import com.azure.resourcemanager.mongodbatlas.models.RegionsByTierResponse; -import com.azure.resourcemanager.mongodbatlas.models.TierLimitReachedResponse; - -public final class ProjectsImpl implements Projects { - private static final ClientLogger LOGGER = new ClientLogger(ProjectsImpl.class); - - private final ProjectsClient innerClient; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - public ProjectsImpl(ProjectsClient innerClient, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, organizationName, projectName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ProjectImpl(inner.getValue(), this.manager())); - } - - public Project get(String resourceGroupName, String organizationName, String projectName) { - ProjectInner inner = this.serviceClient().get(resourceGroupName, organizationName, projectName); - if (inner != null) { - return new ProjectImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String organizationName, String projectName) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName); - } - - public void delete(String resourceGroupName, String organizationName, String projectName, Context context) { - this.serviceClient().delete(resourceGroupName, organizationName, projectName, context); - } - - public PagedIterable list(String resourceGroupName, String organizationName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, organizationName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProjectImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String organizationName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, organizationName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ProjectImpl(inner1, this.manager())); - } - - public Response tierLimitReachedWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context) { - Response inner = this.serviceClient() - .tierLimitReachedWithResponse(resourceGroupName, organizationName, projectName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TierLimitReachedResponseImpl(inner.getValue(), this.manager())); - } - - public TierLimitReachedResponse tierLimitReached(String resourceGroupName, String organizationName, - String projectName) { - TierLimitReachedResponseInner inner - = this.serviceClient().tierLimitReached(resourceGroupName, organizationName, projectName); - if (inner != null) { - return new TierLimitReachedResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listClusterTierRegionsWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context) { - Response inner = this.serviceClient() - .listClusterTierRegionsWithResponse(resourceGroupName, organizationName, projectName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegionsByTierResponseImpl(inner.getValue(), this.manager())); - } - - public RegionsByTierResponse listClusterTierRegions(String resourceGroupName, String organizationName, - String projectName) { - RegionsByTierResponseInner inner - = this.serviceClient().listClusterTierRegions(resourceGroupName, organizationName, projectName); - if (inner != null) { - return new RegionsByTierResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Project getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - return this.getWithResponse(resourceGroupName, organizationName, projectName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - this.delete(resourceGroupName, organizationName, projectName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationName = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - String projectName = ResourceManagerUtils.getValueFromIdByName(id, "projects"); - if (projectName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id))); - } - this.delete(resourceGroupName, organizationName, projectName, context); - } - - private ProjectsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } - - public ProjectImpl define(String name) { - return new ProjectImpl(name, this.manager()); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/RegionsByTierResponseImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/RegionsByTierResponseImpl.java deleted file mode 100644 index 37a971be921e..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/RegionsByTierResponseImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner; -import com.azure.resourcemanager.mongodbatlas.models.RegionsByTierResponse; -import com.azure.resourcemanager.mongodbatlas.models.TierRegions; -import java.util.Collections; -import java.util.List; - -public final class RegionsByTierResponseImpl implements RegionsByTierResponse { - private RegionsByTierResponseInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - RegionsByTierResponseImpl(RegionsByTierResponseInner innerObject, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String organizationId() { - return this.innerModel().organizationId(); - } - - public String projectId() { - return this.innerModel().projectId(); - } - - public List regionsByTier() { - List inner = this.innerModel().regionsByTier(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RegionsByTierResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ResourceManagerUtils.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ResourceManagerUtils.java deleted file mode 100644 index 630224e0a670..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/TierLimitReachedResponseImpl.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/TierLimitReachedResponseImpl.java deleted file mode 100644 index 752dd5a9abf1..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/TierLimitReachedResponseImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner; -import com.azure.resourcemanager.mongodbatlas.models.ProjectLimitStatus; -import com.azure.resourcemanager.mongodbatlas.models.TierLimitReachedResponse; -import java.util.Collections; -import java.util.List; - -public final class TierLimitReachedResponseImpl implements TierLimitReachedResponse { - private TierLimitReachedResponseInner innerObject; - - private final com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager; - - TierLimitReachedResponseImpl(TierLimitReachedResponseInner innerObject, - com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List limits() { - List inner = this.innerModel().limits(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public TierLimitReachedResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mongodbatlas.MongoDBAtlasManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ClusterListResult.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ClusterListResult.java deleted file mode 100644 index 1cc99b0e72a8..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ClusterListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a Cluster list operation. - */ -@Immutable -public final class ClusterListResult implements JsonSerializable { - /* - * The Cluster items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ClusterListResult class. - */ - private ClusterListResult() { - } - - /** - * Get the value property: The Cluster items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ClusterListResult. - */ - public static ClusterListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterListResult deserializedClusterListResult = new ClusterListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ClusterInner.fromJson(reader1)); - deserializedClusterListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedClusterListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterListResult; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OperationListResult.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OperationListResult.java deleted file mode 100644 index d2251fa59a65..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OrganizationResourceListResult.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OrganizationResourceListResult.java deleted file mode 100644 index d4bc88a013e1..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/OrganizationResourceListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OrganizationResource list operation. - */ -@Immutable -public final class OrganizationResourceListResult implements JsonSerializable { - /* - * The OrganizationResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OrganizationResourceListResult class. - */ - private OrganizationResourceListResult() { - } - - /** - * Get the value property: The OrganizationResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceListResult. - */ - public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceListResult deserializedOrganizationResourceListResult - = new OrganizationResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1)); - deserializedOrganizationResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOrganizationResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceListResult; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ProjectListResult.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ProjectListResult.java deleted file mode 100644 index 6cfd8629a1de..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/models/ProjectListResult.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a Project list operation. - */ -@Immutable -public final class ProjectListResult implements JsonSerializable { - /* - * The Project items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ProjectListResult class. - */ - private ProjectListResult() { - } - - /** - * Get the value property: The Project items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProjectListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProjectListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProjectListResult. - */ - public static ProjectListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProjectListResult deserializedProjectListResult = new ProjectListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ProjectInner.fromJson(reader1)); - deserializedProjectListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedProjectListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedProjectListResult; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/package-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/package-info.java deleted file mode 100644 index bc35e037db20..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/implementation/package-info.java +++ /dev/null @@ -1,8 +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 MongoDBAtlas. - */ -package com.azure.resourcemanager.mongodbatlas.implementation; diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ActionType.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ActionType.java deleted file mode 100644 index 89252421d5fa..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Cluster.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Cluster.java deleted file mode 100644 index 727418720f0b..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Cluster.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner; - -/** - * An immutable client-side representation of Cluster. - */ -public interface Cluster { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - ClusterProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.ClusterInner object. - * - * @return the inner object. - */ - ClusterInner innerModel(); - - /** - * The entirety of the Cluster definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Cluster definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Cluster definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Cluster definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName, projectName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @return the next definition stage. - */ - WithCreate withExistingProject(String resourceGroupName, String organizationName, String projectName); - } - - /** - * The stage of the Cluster definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Cluster create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Cluster create(Context context); - } - - /** - * The stage of the Cluster definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(ClusterProperties properties); - } - } - - /** - * Begins update for the Cluster resource. - * - * @return the stage of resource update. - */ - Cluster.Update update(); - - /** - * The template for Cluster update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Cluster apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Cluster apply(Context context); - } - - /** - * The Cluster update stages. - */ - interface UpdateStages { - /** - * The stage of the Cluster update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(ClusterProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Cluster refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Cluster refresh(Context context); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterProperties.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterProperties.java deleted file mode 100644 index 9fc3f3f6765c..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterProperties.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to a MongoDB Atlas Cluster. - */ -@Fluent -public final class ClusterProperties implements JsonSerializable { - /* - * Name of the MongoDB Atlas Cluster. - */ - private String clusterName; - - /* - * Cluster tier (FREE, FLEX, M10, M30). - */ - private ClusterTier clusterTier; - - /* - * Azure region where the cluster is deployed. - */ - private String regionName; - - /* - * MongoDB version running on the cluster. - */ - private String mongoDbVersion; - - /* - * Whether backups are active for the cluster; null if undetermined. - */ - private Boolean backups; - - /* - * Current state of the cluster. - */ - private String state; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /** - * Creates an instance of ClusterProperties class. - */ - public ClusterProperties() { - } - - /** - * Get the clusterName property: Name of the MongoDB Atlas Cluster. - * - * @return the clusterName value. - */ - public String clusterName() { - return this.clusterName; - } - - /** - * Get the clusterTier property: Cluster tier (FREE, FLEX, M10, M30). - * - * @return the clusterTier value. - */ - public ClusterTier clusterTier() { - return this.clusterTier; - } - - /** - * Set the clusterTier property: Cluster tier (FREE, FLEX, M10, M30). - * - * @param clusterTier the clusterTier value to set. - * @return the ClusterProperties object itself. - */ - public ClusterProperties withClusterTier(ClusterTier clusterTier) { - this.clusterTier = clusterTier; - return this; - } - - /** - * Get the regionName property: Azure region where the cluster is deployed. - * - * @return the regionName value. - */ - public String regionName() { - return this.regionName; - } - - /** - * Set the regionName property: Azure region where the cluster is deployed. - * - * @param regionName the regionName value to set. - * @return the ClusterProperties object itself. - */ - public ClusterProperties withRegionName(String regionName) { - this.regionName = regionName; - return this; - } - - /** - * Get the mongoDbVersion property: MongoDB version running on the cluster. - * - * @return the mongoDbVersion value. - */ - public String mongoDbVersion() { - return this.mongoDbVersion; - } - - /** - * Get the backups property: Whether backups are active for the cluster; null if undetermined. - * - * @return the backups value. - */ - public Boolean backups() { - return this.backups; - } - - /** - * Get the state property: Current state of the cluster. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clusterTier", this.clusterTier == null ? null : this.clusterTier.toString()); - jsonWriter.writeStringField("regionName", this.regionName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ClusterProperties. - */ - public static ClusterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterProperties deserializedClusterProperties = new ClusterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clusterTier".equals(fieldName)) { - deserializedClusterProperties.clusterTier = ClusterTier.fromString(reader.getString()); - } else if ("regionName".equals(fieldName)) { - deserializedClusterProperties.regionName = reader.getString(); - } else if ("clusterName".equals(fieldName)) { - deserializedClusterProperties.clusterName = reader.getString(); - } else if ("mongoDbVersion".equals(fieldName)) { - deserializedClusterProperties.mongoDbVersion = reader.getString(); - } else if ("backups".equals(fieldName)) { - deserializedClusterProperties.backups = reader.getNullable(JsonReader::getBoolean); - } else if ("state".equals(fieldName)) { - deserializedClusterProperties.state = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedClusterProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterProperties; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterTier.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterTier.java deleted file mode 100644 index 69f338d710e2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ClusterTier.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Cluster tier options for MongoDB Atlas. - */ -public final class ClusterTier extends ExpandableStringEnum { - /** - * Free tier cluster. - */ - public static final ClusterTier FREE = fromString("FREE"); - - /** - * Flex tier cluster. - */ - public static final ClusterTier FLEX = fromString("FLEX"); - - /** - * M10 tier cluster. - */ - public static final ClusterTier M10 = fromString("M10"); - - /** - * M30 tier cluster. - */ - public static final ClusterTier M30 = fromString("M30"); - - /** - * Creates a new instance of ClusterTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterTier() { - } - - /** - * Creates or finds a ClusterTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterTier. - */ - public static ClusterTier fromString(String name) { - return fromString(name, ClusterTier.class); - } - - /** - * Gets known ClusterTier values. - * - * @return known ClusterTier values. - */ - public static Collection values() { - return values(ClusterTier.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Clusters.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Clusters.java deleted file mode 100644 index c86b4817adb8..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Clusters.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Clusters. - */ -public interface Clusters { - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String clusterName); - - /** - * Delete a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, String clusterName, - Context context); - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String organizationName, String projectName); - - /** - * List Cluster resources by Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String organizationName, String projectName, Context context); - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - String clusterName, Context context); - - /** - * Get a Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param clusterName Name of the MongoDB Atlas Cluster resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster. - */ - Cluster get(String resourceGroupName, String organizationName, String projectName, String clusterName); - - /** - * Get a Cluster. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response}. - */ - Cluster getById(String id); - - /** - * Get a Cluster. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cluster along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Cluster. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Cluster. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Cluster resource. - * - * @param name resource name. - * @return the first stage of the new Cluster definition. - */ - Cluster.DefinitionStages.Blank define(String name); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentity.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentity.java deleted file mode 100644 index dff26584ab27..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentityType.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentityType.java deleted file mode 100644 index 60d1a2ef3865..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceDetails.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceDetails.java deleted file mode 100644 index 79ae61174981..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceSubscriptionStatus.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index 025e2d5cae1f..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OfferDetails.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OfferDetails.java deleted file mode 100644 index 49ba3a99a983..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operation.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operation.java deleted file mode 100644 index e95db28e519b..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OperationDisplay.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OperationDisplay.java deleted file mode 100644 index 1118b6d783d7..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operations.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operations.java deleted file mode 100644 index a9b8912c9afc..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationProperties.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationProperties.java deleted file mode 100644 index 120a975ee2bb..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Organization. - */ -@Fluent -public final class OrganizationProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * MongoDB properties - */ - private PartnerProperties partnerProperties; - - /** - * Creates an instance of OrganizationProperties class. - */ - public OrganizationProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: MongoDB properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: MongoDB properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationProperties. - */ - public static OrganizationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationProperties deserializedOrganizationProperties = new OrganizationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedOrganizationProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedOrganizationProperties.user = UserDetails.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOrganizationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationProperties; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResource.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResource.java deleted file mode 100644 index caa2ebb96833..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResource.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of OrganizationResource. - */ -public interface OrganizationResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OrganizationProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.OrganizationResourceInner object. - * - * @return the inner object. - */ - OrganizationResourceInner innerModel(); - - /** - * The entirety of the OrganizationResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The OrganizationResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OrganizationResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OrganizationResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the OrganizationResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the OrganizationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - OrganizationResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OrganizationResource create(Context context); - } - - /** - * The stage of the OrganizationResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the OrganizationResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(OrganizationProperties properties); - } - - /** - * The stage of the OrganizationResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the OrganizationResource resource. - * - * @return the stage of resource update. - */ - OrganizationResource.Update update(); - - /** - * The template for OrganizationResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OrganizationResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OrganizationResource apply(Context context); - } - - /** - * The OrganizationResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OrganizationResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the OrganizationResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the OrganizationResource update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(OrganizationResourceUpdateProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OrganizationResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OrganizationResource refresh(Context context); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdate.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdate.java deleted file mode 100644 index 00a720f29274..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdate.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the OrganizationResource. - */ -@Fluent -public final class OrganizationResourceUpdate implements JsonSerializable { - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The resource-specific properties for this resource. - */ - private OrganizationResourceUpdateProperties properties; - - /** - * Creates an instance of OrganizationResourceUpdate class. - */ - public OrganizationResourceUpdate() { - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationResourceUpdateProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withProperties(OrganizationResourceUpdateProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdate. - */ - public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceUpdate.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceUpdate.properties - = OrganizationResourceUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdate; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdateProperties.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdateProperties.java deleted file mode 100644 index 473773711536..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/OrganizationResourceUpdateProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The updatable properties of the OrganizationResource. - */ -@Fluent -public final class OrganizationResourceUpdateProperties - implements JsonSerializable { - /* - * Details of the user. - */ - private UserDetails user; - - /* - * MongoDB properties - */ - private PartnerProperties partnerProperties; - - /** - * Creates an instance of OrganizationResourceUpdateProperties class. - */ - public OrganizationResourceUpdateProperties() { - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationResourceUpdateProperties object itself. - */ - public OrganizationResourceUpdateProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the partnerProperties property: MongoDB properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: MongoDB properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationResourceUpdateProperties object itself. - */ - public OrganizationResourceUpdateProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdateProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdateProperties. - */ - public static OrganizationResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdateProperties deserializedOrganizationResourceUpdateProperties - = new OrganizationResourceUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("user".equals(fieldName)) { - deserializedOrganizationResourceUpdateProperties.user = UserDetails.fromJson(reader); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationResourceUpdateProperties.partnerProperties - = PartnerProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdateProperties; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Organizations.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Organizations.java deleted file mode 100644 index b0784b89d85c..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Organizations.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Organizations. - */ -public interface Organizations { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String organizationName, - Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - OrganizationResource getByResourceGroup(String resourceGroupName, String organizationName); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String organizationName); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - OrganizationResource getById(String id); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OrganizationResource resource. - * - * @param name resource name. - * @return the first stage of the new OrganizationResource definition. - */ - OrganizationResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Origin.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Origin.java deleted file mode 100644 index 8da2d8f390c2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/PartnerProperties.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/PartnerProperties.java deleted file mode 100644 index d039d3f18392..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/PartnerProperties.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 com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * MongoDB specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * Organization Id in MongoDB system - */ - private String organizationId; - - /* - * Redirect URL for the MongoDB - */ - private String redirectUrl; - - /* - * Organization name in MongoDB system - */ - private String organizationName; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the organizationId property: Organization Id in MongoDB system. - * - * @return the organizationId value. - */ - public String organizationId() { - return this.organizationId; - } - - /** - * Set the organizationId property: Organization Id in MongoDB system. - * - * @param organizationId the organizationId value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withOrganizationId(String organizationId) { - this.organizationId = organizationId; - return this; - } - - /** - * Get the redirectUrl property: Redirect URL for the MongoDB. - * - * @return the redirectUrl value. - */ - public String redirectUrl() { - return this.redirectUrl; - } - - /** - * Set the redirectUrl property: Redirect URL for the MongoDB. - * - * @param redirectUrl the redirectUrl value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withRedirectUrl(String redirectUrl) { - this.redirectUrl = redirectUrl; - return this; - } - - /** - * Get the organizationName property: Organization name in MongoDB system. - * - * @return the organizationName value. - */ - public String organizationName() { - return this.organizationName; - } - - /** - * Set the organizationName property: Organization name in MongoDB system. - * - * @param organizationName the organizationName value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withOrganizationName(String organizationName) { - this.organizationName = organizationName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("organizationName", this.organizationName); - jsonWriter.writeStringField("organizationId", this.organizationId); - jsonWriter.writeStringField("redirectUrl", this.redirectUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("organizationName".equals(fieldName)) { - deserializedPartnerProperties.organizationName = reader.getString(); - } else if ("organizationId".equals(fieldName)) { - deserializedPartnerProperties.organizationId = reader.getString(); - } else if ("redirectUrl".equals(fieldName)) { - deserializedPartnerProperties.redirectUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Project.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Project.java deleted file mode 100644 index 8d0abfe0a233..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Project.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner; - -/** - * An immutable client-side representation of Project. - */ -public interface Project { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - ProjectProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.ProjectInner object. - * - * @return the inner object. - */ - ProjectInner innerModel(); - - /** - * The entirety of the Project definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Project definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Project definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Project definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, organizationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @return the next definition stage. - */ - WithCreate withExistingOrganization(String resourceGroupName, String organizationName); - } - - /** - * The stage of the Project definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Project create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Project create(Context context); - } - - /** - * The stage of the Project definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(ProjectProperties properties); - } - } - - /** - * Begins update for the Project resource. - * - * @return the stage of resource update. - */ - Project.Update update(); - - /** - * The template for Project update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Project apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Project apply(Context context); - } - - /** - * The Project update stages. - */ - interface UpdateStages { - /** - * The stage of the Project update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(ProjectProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Project refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Project refresh(Context context); - - /** - * Check if tier limit is reached for the project. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check along with {@link Response}. - */ - Response tierLimitReachedWithResponse(Context context); - - /** - * Check if tier limit is reached for the project. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check. - */ - TierLimitReachedResponse tierLimitReached(); - - /** - * List available regions by cluster tier for the project. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier along with {@link Response}. - */ - Response listClusterTierRegionsWithResponse(Context context); - - /** - * List available regions by cluster tier for the project. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier. - */ - RegionsByTierResponse listClusterTierRegions(); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectLimitStatus.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectLimitStatus.java deleted file mode 100644 index 3fcbe616d4a3..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectLimitStatus.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Usage and limit status for a resource quota in a MongoDB Atlas project. - */ -@Immutable -public final class ProjectLimitStatus implements JsonSerializable { - /* - * Type of the limit. - */ - private ClusterTier type; - - /* - * Maximum allowed value. - */ - private int maximum; - - /* - * Current value. - */ - private int current; - - /* - * Whether the limit has been reached. - */ - private boolean isReached; - - /** - * Creates an instance of ProjectLimitStatus class. - */ - private ProjectLimitStatus() { - } - - /** - * Get the type property: Type of the limit. - * - * @return the type value. - */ - public ClusterTier type() { - return this.type; - } - - /** - * Get the maximum property: Maximum allowed value. - * - * @return the maximum value. - */ - public int maximum() { - return this.maximum; - } - - /** - * Get the current property: Current value. - * - * @return the current value. - */ - public int current() { - return this.current; - } - - /** - * Get the isReached property: Whether the limit has been reached. - * - * @return the isReached value. - */ - public boolean isReached() { - return this.isReached; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeIntField("maximum", this.maximum); - jsonWriter.writeIntField("current", this.current); - jsonWriter.writeBooleanField("isReached", this.isReached); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProjectLimitStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProjectLimitStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProjectLimitStatus. - */ - public static ProjectLimitStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProjectLimitStatus deserializedProjectLimitStatus = new ProjectLimitStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedProjectLimitStatus.type = ClusterTier.fromString(reader.getString()); - } else if ("maximum".equals(fieldName)) { - deserializedProjectLimitStatus.maximum = reader.getInt(); - } else if ("current".equals(fieldName)) { - deserializedProjectLimitStatus.current = reader.getInt(); - } else if ("isReached".equals(fieldName)) { - deserializedProjectLimitStatus.isReached = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedProjectLimitStatus; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectProperties.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectProperties.java deleted file mode 100644 index add785e5aaa2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ProjectProperties.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to a MongoDB Atlas Project. - */ -@Immutable -public final class ProjectProperties implements JsonSerializable { - /* - * Atlas project id. - */ - private String projectId; - - /* - * Atlas project name. - */ - private String projectName; - - /* - * Atlas organization id. - */ - private String organizationId; - - /* - * Number of clusters in the project. - */ - private Long clusterCount; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /** - * Creates an instance of ProjectProperties class. - */ - public ProjectProperties() { - } - - /** - * Get the projectId property: Atlas project id. - * - * @return the projectId value. - */ - public String projectId() { - return this.projectId; - } - - /** - * Get the projectName property: Atlas project name. - * - * @return the projectName value. - */ - public String projectName() { - return this.projectName; - } - - /** - * Get the organizationId property: Atlas organization id. - * - * @return the organizationId value. - */ - public String organizationId() { - return this.organizationId; - } - - /** - * Get the clusterCount property: Number of clusters in the project. - * - * @return the clusterCount value. - */ - public Long clusterCount() { - return this.clusterCount; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProjectProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProjectProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ProjectProperties. - */ - public static ProjectProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProjectProperties deserializedProjectProperties = new ProjectProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("projectId".equals(fieldName)) { - deserializedProjectProperties.projectId = reader.getString(); - } else if ("projectName".equals(fieldName)) { - deserializedProjectProperties.projectName = reader.getString(); - } else if ("organizationId".equals(fieldName)) { - deserializedProjectProperties.organizationId = reader.getString(); - } else if ("clusterCount".equals(fieldName)) { - deserializedProjectProperties.clusterCount = reader.getNullable(JsonReader::getLong); - } else if ("provisioningState".equals(fieldName)) { - deserializedProjectProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedProjectProperties; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Projects.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Projects.java deleted file mode 100644 index 0b23bb3557a8..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/Projects.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Projects. - */ -public interface Projects { - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String organizationName, String projectName, - Context context); - - /** - * Get a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project. - */ - Project get(String resourceGroupName, String organizationName, String projectName); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName); - - /** - * Delete a Project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationName, String projectName, Context context); - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String organizationName); - - /** - * List Project resources by OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Project list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String organizationName, Context context); - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check along with {@link Response}. - */ - Response tierLimitReachedWithResponse(String resourceGroupName, String organizationName, - String projectName, Context context); - - /** - * Check if tier limit is reached for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for tier limit check. - */ - TierLimitReachedResponse tierLimitReached(String resourceGroupName, String organizationName, String projectName); - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier along with {@link Response}. - */ - Response listClusterTierRegionsWithResponse(String resourceGroupName, - String organizationName, String projectName, Context context); - - /** - * List available regions by cluster tier for the project. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationName Name of the Organization resource. - * @param projectName Name of the MongoDB Atlas Project resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for regions by cluster tier. - */ - RegionsByTierResponse listClusterTierRegions(String resourceGroupName, String organizationName, String projectName); - - /** - * Get a Project. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response}. - */ - Project getById(String id); - - /** - * Get a Project. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Project along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Project. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Project. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Project resource. - * - * @param name resource name. - * @return the first stage of the new Project definition. - */ - Project.DefinitionStages.Blank define(String name); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/RegionsByTierResponse.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/RegionsByTierResponse.java deleted file mode 100644 index 144ac9e99cf7..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/RegionsByTierResponse.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of RegionsByTierResponse. - */ -public interface RegionsByTierResponse { - /** - * Gets the organizationId property: Atlas organization id. - * - * @return the organizationId value. - */ - String organizationId(); - - /** - * Gets the projectId property: Atlas project id. - * - * @return the projectId value. - */ - String projectId(); - - /** - * Gets the regionsByTier property: List of cluster tiers and their supported regions. - * - * @return the regionsByTier value. - */ - List regionsByTier(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.RegionsByTierResponseInner object. - * - * @return the inner object. - */ - RegionsByTierResponseInner innerModel(); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ResourceProvisioningState.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ResourceProvisioningState.java deleted file mode 100644 index 87a075fc0e74..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierLimitReachedResponse.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierLimitReachedResponse.java deleted file mode 100644 index 9e1c72f35681..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierLimitReachedResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner; -import java.util.List; - -/** - * An immutable client-side representation of TierLimitReachedResponse. - */ -public interface TierLimitReachedResponse { - /** - * Gets the limits property: List of project limit statuses. - * - * @return the limits value. - */ - List limits(); - - /** - * Gets the inner com.azure.resourcemanager.mongodbatlas.fluent.models.TierLimitReachedResponseInner object. - * - * @return the inner object. - */ - TierLimitReachedResponseInner innerModel(); -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierRegions.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierRegions.java deleted file mode 100644 index 3cef9bbc1798..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/TierRegions.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Cluster tier and its supported regions. - */ -@Immutable -public final class TierRegions implements JsonSerializable { - /* - * Cluster tier name. - */ - private ClusterTier tier; - - /* - * Supported region names. - */ - private List regions; - - /** - * Creates an instance of TierRegions class. - */ - private TierRegions() { - } - - /** - * Get the tier property: Cluster tier name. - * - * @return the tier value. - */ - public ClusterTier tier() { - return this.tier; - } - - /** - * Get the regions property: Supported region names. - * - * @return the regions value. - */ - public List regions() { - return this.regions; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); - jsonWriter.writeArrayField("regions", this.regions, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TierRegions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TierRegions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TierRegions. - */ - public static TierRegions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TierRegions deserializedTierRegions = new TierRegions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tier".equals(fieldName)) { - deserializedTierRegions.tier = ClusterTier.fromString(reader.getString()); - } else if ("regions".equals(fieldName)) { - List regions = reader.readArray(reader1 -> reader1.getString()); - deserializedTierRegions.regions = regions; - } else { - reader.skipChildren(); - } - } - - return deserializedTierRegions; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserAssignedIdentity.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserAssignedIdentity.java deleted file mode 100644 index b853960061d2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserDetails.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserDetails.java deleted file mode 100644 index 20764a4c3d43..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/UserDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.mongodbatlas.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /* - * Company Name - */ - private String companyName; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get the companyName property: Company Name. - * - * @return the companyName value. - */ - public String companyName() { - return this.companyName; - } - - /** - * Set the companyName property: Company Name. - * - * @param companyName the companyName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withCompanyName(String companyName) { - this.companyName = companyName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - jsonWriter.writeStringField("companyName", this.companyName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else if ("companyName".equals(fieldName)) { - deserializedUserDetails.companyName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/package-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/package-info.java deleted file mode 100644 index 53e7921cb7c2..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for MongoDBAtlas. - */ -package com.azure.resourcemanager.mongodbatlas.models; diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/package-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/package-info.java deleted file mode 100644 index 582d5ad10729..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/com/azure/resourcemanager/mongodbatlas/package-info.java +++ /dev/null @@ -1,8 +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 MongoDBAtlas. - */ -package com.azure.resourcemanager.mongodbatlas; diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/module-info.java b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/module-info.java deleted file mode 100644 index 37119d236913..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.mongodbatlas { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.mongodbatlas; - exports com.azure.resourcemanager.mongodbatlas.fluent; - exports com.azure.resourcemanager.mongodbatlas.fluent.models; - exports com.azure.resourcemanager.mongodbatlas.models; - - opens com.azure.resourcemanager.mongodbatlas.fluent.models to com.azure.core; - opens com.azure.resourcemanager.mongodbatlas.models to com.azure.core; - opens com.azure.resourcemanager.mongodbatlas.implementation.models to com.azure.core; -} diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/proxy-config.json b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/proxy-config.json deleted file mode 100644 index f7297fc92686..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.mongodbatlas.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.mongodbatlas.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.mongodbatlas.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.mongodbatlas.implementation.ProjectsClientImpl$ProjectsService"]] \ No newline at end of file diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/reflect-config.json b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mongodbatlas/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/azure-resourcemanager-mongodbatlas.properties b/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/azure-resourcemanager-mongodbatlas.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/mongodbatlas/azure-resourcemanager-mongodbatlas/src/main/resources/azure-resourcemanager-mongodbatlas.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/NapsterOmniagentApiManager.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/NapsterOmniagentApiManager.java deleted file mode 100644 index 2c4be9bc9c7d..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/NapsterOmniagentApiManager.java +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.napsteromniagentapi.fluent.NapsterOmniagentApiManagementClient; -import com.azure.resourcemanager.napsteromniagentapi.implementation.NapsterOmniagentApiManagementClientBuilder; -import com.azure.resourcemanager.napsteromniagentapi.implementation.OperationsImpl; -import com.azure.resourcemanager.napsteromniagentapi.implementation.OrganizationsImpl; -import com.azure.resourcemanager.napsteromniagentapi.implementation.SaaSOperationGroupsImpl; -import com.azure.resourcemanager.napsteromniagentapi.models.Operations; -import com.azure.resourcemanager.napsteromniagentapi.models.Organizations; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSOperationGroups; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to NapsterOmniagentApiManager. - */ -public final class NapsterOmniagentApiManager { - private Operations operations; - - private Organizations organizations; - - private SaaSOperationGroups saaSOperationGroups; - - private final NapsterOmniagentApiManagementClient clientObject; - - private NapsterOmniagentApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new NapsterOmniagentApiManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of NapsterOmniagentApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the NapsterOmniagentApi service API instance. - */ - public static NapsterOmniagentApiManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of NapsterOmniagentApi service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the NapsterOmniagentApi service API instance. - */ - public static NapsterOmniagentApiManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new NapsterOmniagentApiManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create NapsterOmniagentApiManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new NapsterOmniagentApiManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-napsteromniagentapi.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of NapsterOmniagentApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the NapsterOmniagentApi service API instance. - */ - public NapsterOmniagentApiManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.napsteromniagentapi") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new NapsterOmniagentApiManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Organizations. It manages OrganizationResource. - * - * @return Resource collection API of Organizations. - */ - public Organizations organizations() { - if (this.organizations == null) { - this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this); - } - return organizations; - } - - /** - * Gets the resource collection API of SaaSOperationGroups. - * - * @return Resource collection API of SaaSOperationGroups. - */ - public SaaSOperationGroups saaSOperationGroups() { - if (this.saaSOperationGroups == null) { - this.saaSOperationGroups = new SaaSOperationGroupsImpl(clientObject.getSaaSOperationGroups(), this); - } - return saaSOperationGroups; - } - - /** - * Gets wrapped service client NapsterOmniagentApiManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client NapsterOmniagentApiManagementClient. - */ - public NapsterOmniagentApiManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.java deleted file mode 100644 index 741513fe64a5..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.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 com.azure.resourcemanager.napsteromniagentapi.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for NapsterOmniagentApiManagementClient class. - */ -public interface NapsterOmniagentApiManagementClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - OrganizationsClient getOrganizations(); - - /** - * Gets the SaaSOperationGroupsClient object to access its operations. - * - * @return the SaaSOperationGroupsClient object. - */ - SaaSOperationGroupsClient getSaaSOperationGroups(); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java deleted file mode 100644 index 3221d5db4d07..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java deleted file mode 100644 index ee387873d2f7..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public interface OrganizationsClient { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName, - String organizationname, OrganizationResourceUpdate properties); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName, - String organizationname, OrganizationResourceUpdate properties, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginLinkSaaS(String resourceGroupName, - String organizationname, SaaSData body); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginLinkSaaS(String resourceGroupName, - String organizationname, SaaSData body, Context context); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body, - Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response latestLinkedSaaSWithResponse(String resourceGroupName, - String organizationname, Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String organizationname); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java deleted file mode 100644 index 58bd05943487..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.models.ActivateSaaSParameterRequest; - -/** - * An instance of this class provides access to all the operations defined in SaaSOperationGroupsClient. - */ -public interface SaaSOperationGroupsClient { - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SaaSResourceDetailsResponseInner> - beginActivateResource(ActivateSaaSParameterRequest body); - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SaaSResourceDetailsResponseInner> - beginActivateResource(ActivateSaaSParameterRequest body, Context context); - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body); - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body, Context context); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java deleted file mode 100644 index 79bf0900e944..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Response of get latest linked SaaS resource operation. - */ -@Immutable -public final class LatestLinkedSaaSResponseInner implements JsonSerializable { - /* - * SaaS resource id - */ - private String saaSResourceId; - - /* - * Flag indicating if the SaaS resource is hidden - */ - private Boolean isHiddenSaaS; - - /** - * Creates an instance of LatestLinkedSaaSResponseInner class. - */ - private LatestLinkedSaaSResponseInner() { - } - - /** - * Get the saaSResourceId property: SaaS resource id. - * - * @return the saaSResourceId value. - */ - public String saaSResourceId() { - return this.saaSResourceId; - } - - /** - * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. - * - * @return the isHiddenSaaS value. - */ - public Boolean isHiddenSaaS() { - return this.isHiddenSaaS; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); - jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LatestLinkedSaaSResponseInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LatestLinkedSaaSResponseInner. - */ - public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner - = new LatestLinkedSaaSResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("saaSResourceId".equals(fieldName)) { - deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString(); - } else if ("isHiddenSaaS".equals(fieldName)) { - deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedLatestLinkedSaaSResponseInner; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java deleted file mode 100644 index a3ad304316da..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.napsteromniagentapi.models.ActionType; -import com.azure.resourcemanager.napsteromniagentapi.models.OperationDisplay; -import com.azure.resourcemanager.napsteromniagentapi.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java deleted file mode 100644 index 104ab0dcdc39..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.napsteromniagentapi.models.ManagedServiceIdentity; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Concrete tracked resource types can be created by aliasing this type using a specific property type. - */ -@Fluent -public final class OrganizationResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private OrganizationProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OrganizationResourceInner class. - */ - public OrganizationResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withProperties(OrganizationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceInner. - */ - public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOrganizationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrganizationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrganizationResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOrganizationResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceInner; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java deleted file mode 100644 index f7eee6a564b3..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace SaaS resource details. - */ -@Immutable -public final class SaaSResourceDetailsResponseInner extends ProxyResource { - /* - * Id of the Marketplace SaaS Resource - */ - private String saasId; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SaaSResourceDetailsResponseInner class. - */ - private SaaSResourceDetailsResponseInner() { - } - - /** - * Get the saasId property: Id of the Marketplace SaaS Resource. - * - * @return the saasId value. - */ - public String saasId() { - return this.saasId; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("saasId", this.saasId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SaaSResourceDetailsResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SaaSResourceDetailsResponseInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SaaSResourceDetailsResponseInner. - */ - public static SaaSResourceDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner - = new SaaSResourceDetailsResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSaaSResourceDetailsResponseInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSaaSResourceDetailsResponseInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSaaSResourceDetailsResponseInner.type = reader.getString(); - } else if ("saasId".equals(fieldName)) { - deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSaaSResourceDetailsResponseInner; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java deleted file mode 100644 index eef4f0ef2c49..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for NapsterOmniagentApi. - */ -package com.azure.resourcemanager.napsteromniagentapi.fluent.models; diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java deleted file mode 100644 index 4894e9f742b4..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for NapsterOmniagentApi. - */ -package com.azure.resourcemanager.napsteromniagentapi.fluent; diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java deleted file mode 100644 index d0ccc67bc872..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse; - -public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse { - private LatestLinkedSaaSResponseInner innerObject; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String saaSResourceId() { - return this.innerModel().saaSResourceId(); - } - - public Boolean isHiddenSaaS() { - return this.innerModel().isHiddenSaaS(); - } - - public LatestLinkedSaaSResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java deleted file mode 100644 index 771f09da4144..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the NapsterOmniagentApiManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { NapsterOmniagentApiManagementClientImpl.class }) -public final class NapsterOmniagentApiManagementClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the NapsterOmniagentApiManagementClientBuilder. - */ - public NapsterOmniagentApiManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of NapsterOmniagentApiManagementClientImpl with the provided parameters. - * - * @return an instance of NapsterOmniagentApiManagementClientImpl. - */ - public NapsterOmniagentApiManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - NapsterOmniagentApiManagementClientImpl client = new NapsterOmniagentApiManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java deleted file mode 100644 index 450d7b911f05..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.napsteromniagentapi.fluent.NapsterOmniagentApiManagementClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OperationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OrganizationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.SaaSOperationGroupsClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the NapsterOmniagentApiManagementClientImpl type. - */ -@ServiceClient(builder = NapsterOmniagentApiManagementClientBuilder.class) -public final class NapsterOmniagentApiManagementClientImpl implements NapsterOmniagentApiManagementClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The OrganizationsClient object to access its operations. - */ - private final OrganizationsClient organizations; - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - public OrganizationsClient getOrganizations() { - return this.organizations; - } - - /** - * The SaaSOperationGroupsClient object to access its operations. - */ - private final SaaSOperationGroupsClient saaSOperationGroups; - - /** - * Gets the SaaSOperationGroupsClient object to access its operations. - * - * @return the SaaSOperationGroupsClient object. - */ - public SaaSOperationGroupsClient getSaaSOperationGroups() { - return this.saaSOperationGroups; - } - - /** - * Initializes an instance of NapsterOmniagentApiManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - NapsterOmniagentApiManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2025-12-24-preview"; - this.operations = new OperationsClientImpl(this); - this.organizations = new OrganizationsClientImpl(this); - this.saaSOperationGroups = new SaaSOperationGroupsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NapsterOmniagentApiManagementClientImpl.class); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java deleted file mode 100644 index f5459c5f46ae..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; -import com.azure.resourcemanager.napsteromniagentapi.models.ActionType; -import com.azure.resourcemanager.napsteromniagentapi.models.Operation; -import com.azure.resourcemanager.napsteromniagentapi.models.OperationDisplay; -import com.azure.resourcemanager.napsteromniagentapi.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java deleted file mode 100644 index 355167bff5b7..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OperationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; -import com.azure.resourcemanager.napsteromniagentapi.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final NapsterOmniagentApiManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(NapsterOmniagentApiManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NapsterOmniagentApiManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "NapsterOmniagentApiManagementClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Napster.CompanionAPI/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Napster.CompanionAPI/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.java deleted file mode 100644 index 1286849ca0a0..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.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 com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OperationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; -import com.azure.resourcemanager.napsteromniagentapi.models.Operation; -import com.azure.resourcemanager.napsteromniagentapi.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java deleted file mode 100644 index 30b977905a9a..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse; -import com.azure.resourcemanager.napsteromniagentapi.models.ManagedServiceIdentity; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationProperties; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResource; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData; -import java.util.Collections; -import java.util.Map; - -public final class OrganizationResourceImpl - implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update { - private OrganizationResourceInner innerObject; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OrganizationProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OrganizationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationname; - - private OrganizationResourceUpdate updateProperties; - - public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public OrganizationResource create() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), Context.NONE); - return this; - } - - public OrganizationResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), context); - return this; - } - - OrganizationResourceImpl(String name, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerObject = new OrganizationResourceInner(); - this.serviceManager = serviceManager; - this.organizationname = name; - } - - public OrganizationResourceImpl update() { - this.updateProperties = new OrganizationResourceUpdate(); - return this; - } - - public OrganizationResource apply() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .update(resourceGroupName, organizationname, updateProperties, Context.NONE); - return this; - } - - public OrganizationResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .update(resourceGroupName, organizationname, updateProperties, context); - return this; - } - - OrganizationResourceImpl(OrganizationResourceInner innerObject, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationname = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - } - - public OrganizationResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, context) - .getValue(); - return this; - } - - public OrganizationResource linkSaaS(SaaSData body) { - return serviceManager.organizations().linkSaaS(resourceGroupName, organizationname, body); - } - - public OrganizationResource linkSaaS(SaaSData body, Context context) { - return serviceManager.organizations().linkSaaS(resourceGroupName, organizationname, body, context); - } - - public Response latestLinkedSaaSWithResponse(Context context) { - return serviceManager.organizations() - .latestLinkedSaaSWithResponse(resourceGroupName, organizationname, context); - } - - public LatestLinkedSaaSResponse latestLinkedSaaS() { - return serviceManager.organizations().latestLinkedSaaS(resourceGroupName, organizationname); - } - - public OrganizationResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OrganizationResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OrganizationResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java deleted file mode 100644 index 60f62eac5827..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java +++ /dev/null @@ -1,1416 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OrganizationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.napsteromniagentapi.implementation.models.OrganizationResourceListResult; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public final class OrganizationsClientImpl implements OrganizationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OrganizationsService service; - - /** - * The service client containing this operation class. - */ - private final NapsterOmniagentApiManagementClientImpl client; - - /** - * Initializes an instance of OrganizationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OrganizationsClientImpl(NapsterOmniagentApiManagementClientImpl client) { - this.service - = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NapsterOmniagentApiManagementClientOrganizations to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "NapsterOmniagentApiManagementClientOrganizations") - public interface OrganizationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/linkSaaS") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> linkSaaS(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SaaSData body, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/linkSaaS") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response linkSaaSSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SaaSData body, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/latestLinkedSaaS") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> latestLinkedSaaS(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/latestLinkedSaaS") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response latestLinkedSaaSSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String organizationname) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponseAsync(resourceGroupName, organizationname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationname, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationname, resource); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationname, resource, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationname, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource).getFinalResult(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource, context).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - Context.NONE); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> - beginUpdateAsync(String resourceGroupName, String organizationname, OrganizationResourceUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, organizationname, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginUpdate(String resourceGroupName, String organizationname, OrganizationResourceUpdate properties) { - Response response = updateWithResponse(resourceGroupName, organizationname, properties); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginUpdate( - String resourceGroupName, String organizationname, OrganizationResourceUpdate properties, Context context) { - Response response = updateWithResponse(resourceGroupName, organizationname, properties, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return beginUpdateAsync(resourceGroupName, organizationname, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return beginUpdate(resourceGroupName, organizationname, properties).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context) { - return beginUpdate(resourceGroupName, organizationname, properties, context).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String organizationname) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationname) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationname); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname) { - Response response = deleteWithResponse(resourceGroupName, organizationname); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, - Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationname, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationname) { - return beginDeleteAsync(resourceGroupName, organizationname).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname) { - beginDelete(resourceGroupName, organizationname).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname, Context context) { - beginDelete(resourceGroupName, organizationname, context).getFinalResult(); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> linkSaaSWithResponseAsync(String resourceGroupName, - String organizationname, SaaSData body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.linkSaaS(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response linkSaaSWithResponse(String resourceGroupName, String organizationname, - SaaSData body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body, - Context.NONE); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response linkSaaSWithResponse(String resourceGroupName, String organizationname, SaaSData body, - Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body, context); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> - beginLinkSaaSAsync(String resourceGroupName, String organizationname, SaaSData body) { - Mono>> mono = linkSaaSWithResponseAsync(resourceGroupName, organizationname, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginLinkSaaS(String resourceGroupName, String organizationname, SaaSData body) { - Response response = linkSaaSWithResponse(resourceGroupName, organizationname, body); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginLinkSaaS(String resourceGroupName, String organizationname, SaaSData body, Context context) { - Response response = linkSaaSWithResponse(resourceGroupName, organizationname, body, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono linkSaaSAsync(String resourceGroupName, String organizationname, - SaaSData body) { - return beginLinkSaaSAsync(resourceGroupName, organizationname, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body) { - return beginLinkSaaS(resourceGroupName, organizationname, body).getFinalResult(); - } - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body, - Context context) { - return beginLinkSaaS(resourceGroupName, organizationname, body, context).getFinalResult(); - } - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> latestLinkedSaaSWithResponseAsync(String resourceGroupName, - String organizationname) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.latestLinkedSaaS(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono latestLinkedSaaSAsync(String resourceGroupName, - String organizationname) { - return latestLinkedSaaSWithResponseAsync(resourceGroupName, organizationname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response latestLinkedSaaSWithResponse(String resourceGroupName, - String organizationname, Context context) { - final String accept = "application/json"; - return service.latestLinkedSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context); - } - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String organizationname) { - return latestLinkedSaaSWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java deleted file mode 100644 index cc53fd431321..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.napsteromniagentapi.fluent.OrganizationsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse; -import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResource; -import com.azure.resourcemanager.napsteromniagentapi.models.Organizations; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData; - -public final class OrganizationsImpl implements Organizations { - private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); - - private final OrganizationsClient innerClient; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - public OrganizationsImpl(OrganizationsClient innerClient, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OrganizationResourceImpl(inner.getValue(), this.manager())); - } - - public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname) { - OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationname); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String organizationname) { - this.serviceClient().delete(resourceGroupName, organizationname); - } - - public void delete(String resourceGroupName, String organizationname, Context context) { - this.serviceClient().delete(resourceGroupName, organizationname, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body) { - OrganizationResourceInner inner = this.serviceClient().linkSaaS(resourceGroupName, organizationname, body); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body, - Context context) { - OrganizationResourceInner inner - = this.serviceClient().linkSaaS(resourceGroupName, organizationname, body, context); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response latestLinkedSaaSWithResponse(String resourceGroupName, - String organizationname, Context context) { - Response inner - = this.serviceClient().latestLinkedSaaSWithResponse(resourceGroupName, organizationname, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LatestLinkedSaaSResponseImpl(inner.getValue(), this.manager())); - } - - public LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String organizationname) { - LatestLinkedSaaSResponseInner inner - = this.serviceClient().latestLinkedSaaS(resourceGroupName, organizationname); - if (inner != null) { - return new LatestLinkedSaaSResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public OrganizationResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, context); - } - - private OrganizationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } - - public OrganizationResourceImpl define(String name) { - return new OrganizationResourceImpl(name, this.manager()); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java deleted file mode 100644 index 89b15cb30ebd..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java deleted file mode 100644 index e1195a211261..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.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.PathParam; -import com.azure.core.annotation.Post; -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.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.napsteromniagentapi.fluent.SaaSOperationGroupsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.models.ActivateSaaSParameterRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SaaSOperationGroupsClient. - */ -public final class SaaSOperationGroupsClientImpl implements SaaSOperationGroupsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SaaSOperationGroupsService service; - - /** - * The service client containing this operation class. - */ - private final NapsterOmniagentApiManagementClientImpl client; - - /** - * Initializes an instance of SaaSOperationGroupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SaaSOperationGroupsClientImpl(NapsterOmniagentApiManagementClientImpl client) { - this.service = RestProxy.create(SaaSOperationGroupsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NapsterOmniagentApiManagementClientSaaSOperationGroups to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "NapsterOmniagentApiManagementClientSaaSOperationGroups") - public interface SaaSOperationGroupsService { - @Post("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/activateSaaS") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> activateResource(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ActivateSaaSParameterRequest body, Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/activateSaaS") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response activateResourceSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ActivateSaaSParameterRequest body, Context context); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> activateResourceWithResponseAsync(ActivateSaaSParameterRequest body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.activateResource(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, body, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response activateResourceWithResponse(ActivateSaaSParameterRequest body) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, body, Context.NONE); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response activateResourceWithResponse(ActivateSaaSParameterRequest body, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, body, context); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SaaSResourceDetailsResponseInner> - beginActivateResourceAsync(ActivateSaaSParameterRequest body) { - Mono>> mono = activateResourceWithResponseAsync(body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), SaaSResourceDetailsResponseInner.class, - SaaSResourceDetailsResponseInner.class, this.client.getContext()); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SaaSResourceDetailsResponseInner> - beginActivateResource(ActivateSaaSParameterRequest body) { - Response response = activateResourceWithResponse(body); - return this.client.getLroResult(response, - SaaSResourceDetailsResponseInner.class, SaaSResourceDetailsResponseInner.class, Context.NONE); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SaaSResourceDetailsResponseInner> - beginActivateResource(ActivateSaaSParameterRequest body, Context context) { - Response response = activateResourceWithResponse(body, context); - return this.client.getLroResult(response, - SaaSResourceDetailsResponseInner.class, SaaSResourceDetailsResponseInner.class, context); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono activateResourceAsync(ActivateSaaSParameterRequest body) { - return beginActivateResourceAsync(body).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body) { - return beginActivateResource(body).getFinalResult(); - } - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body, Context context) { - return beginActivateResource(body, context).getFinalResult(); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsImpl.java deleted file mode 100644 index 16e1483ef1e9..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.napsteromniagentapi.fluent.SaaSOperationGroupsClient; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.models.ActivateSaaSParameterRequest; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSOperationGroups; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSResourceDetailsResponse; - -public final class SaaSOperationGroupsImpl implements SaaSOperationGroups { - private static final ClientLogger LOGGER = new ClientLogger(SaaSOperationGroupsImpl.class); - - private final SaaSOperationGroupsClient innerClient; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - public SaaSOperationGroupsImpl(SaaSOperationGroupsClient innerClient, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest body) { - SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(body); - if (inner != null) { - return new SaaSResourceDetailsResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest body, Context context) { - SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(body, context); - if (inner != null) { - return new SaaSResourceDetailsResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private SaaSOperationGroupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSResourceDetailsResponseImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSResourceDetailsResponseImpl.java deleted file mode 100644 index 311a204fc6e8..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSResourceDetailsResponseImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner; -import com.azure.resourcemanager.napsteromniagentapi.models.SaaSResourceDetailsResponse; - -public final class SaaSResourceDetailsResponseImpl implements SaaSResourceDetailsResponse { - private SaaSResourceDetailsResponseInner innerObject; - - private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager; - - SaaSResourceDetailsResponseImpl(SaaSResourceDetailsResponseInner innerObject, - com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String saasId() { - return this.innerModel().saasId(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SaaSResourceDetailsResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OperationListResult.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OperationListResult.java deleted file mode 100644 index 84320ffb3afc..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OrganizationResourceListResult.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OrganizationResourceListResult.java deleted file mode 100644 index 2b7b58be4c81..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/models/OrganizationResourceListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OrganizationResource list operation. - */ -@Immutable -public final class OrganizationResourceListResult implements JsonSerializable { - /* - * The OrganizationResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OrganizationResourceListResult class. - */ - private OrganizationResourceListResult() { - } - - /** - * Get the value property: The OrganizationResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceListResult. - */ - public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceListResult deserializedOrganizationResourceListResult - = new OrganizationResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1)); - deserializedOrganizationResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOrganizationResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceListResult; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/package-info.java deleted file mode 100644 index 37276883676b..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/package-info.java +++ /dev/null @@ -1,8 +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 NapsterOmniagentApi. - */ -package com.azure.resourcemanager.napsteromniagentapi.implementation; diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActionType.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActionType.java deleted file mode 100644 index 802b1e652bb2..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActivateSaaSParameterRequest.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActivateSaaSParameterRequest.java deleted file mode 100644 index 867118b3683f..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ActivateSaaSParameterRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SaaS guid & PublishedId for Activate and Validate SaaS Resource. - */ -@Fluent -public final class ActivateSaaSParameterRequest implements JsonSerializable { - /* - * SaaS guid for Activate and Validate SaaS Resource - */ - private String saasGuid; - - /* - * Publisher Id for Napster resource - */ - private String publisherId; - - /** - * Creates an instance of ActivateSaaSParameterRequest class. - */ - public ActivateSaaSParameterRequest() { - } - - /** - * Get the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. - * - * @return the saasGuid value. - */ - public String saasGuid() { - return this.saasGuid; - } - - /** - * Set the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. - * - * @param saasGuid the saasGuid value to set. - * @return the ActivateSaaSParameterRequest object itself. - */ - public ActivateSaaSParameterRequest withSaasGuid(String saasGuid) { - this.saasGuid = saasGuid; - return this; - } - - /** - * Get the publisherId property: Publisher Id for Napster resource. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for Napster resource. - * - * @param publisherId the publisherId value to set. - * @return the ActivateSaaSParameterRequest object itself. - */ - public ActivateSaaSParameterRequest withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("saasGuid", this.saasGuid); - jsonWriter.writeStringField("publisherId", this.publisherId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ActivateSaaSParameterRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ActivateSaaSParameterRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActivateSaaSParameterRequest. - */ - public static ActivateSaaSParameterRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ActivateSaaSParameterRequest deserializedActivateSaaSParameterRequest = new ActivateSaaSParameterRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("saasGuid".equals(fieldName)) { - deserializedActivateSaaSParameterRequest.saasGuid = reader.getString(); - } else if ("publisherId".equals(fieldName)) { - deserializedActivateSaaSParameterRequest.publisherId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedActivateSaaSParameterRequest; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/LatestLinkedSaaSResponse.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/LatestLinkedSaaSResponse.java deleted file mode 100644 index e3c5d330d6e8..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/LatestLinkedSaaSResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner; - -/** - * An immutable client-side representation of LatestLinkedSaaSResponse. - */ -public interface LatestLinkedSaaSResponse { - /** - * Gets the saaSResourceId property: SaaS resource id. - * - * @return the saaSResourceId value. - */ - String saaSResourceId(); - - /** - * Gets the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. - * - * @return the isHiddenSaaS value. - */ - Boolean isHiddenSaaS(); - - /** - * Gets the inner com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner object. - * - * @return the inner object. - */ - LatestLinkedSaaSResponseInner innerModel(); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentity.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentity.java deleted file mode 100644 index 6a68316a7102..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentityType.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentityType.java deleted file mode 100644 index 959293dd35d0..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceDetails.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceDetails.java deleted file mode 100644 index 591d828863df..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceDetails.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Marketplace SaaS Resource Id - */ - private String saasResourceId; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the saasResourceId property: Marketplace SaaS Resource Id. - * - * @return the saasResourceId value. - */ - public String saasResourceId() { - return this.saasResourceId; - } - - /** - * Set the saasResourceId property: Marketplace SaaS Resource Id. - * - * @param saasResourceId the saasResourceId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSaasResourceId(String saasResourceId) { - this.saasResourceId = saasResourceId; - return this; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("saasResourceId", this.saasResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else if ("saasResourceId".equals(fieldName)) { - deserializedMarketplaceDetails.saasResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceSubscriptionStatus.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index 8484ca773b9b..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OfferDetails.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OfferDetails.java deleted file mode 100644 index 23b22ce9581a..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operation.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operation.java deleted file mode 100644 index 75393d8f85ff..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OperationDisplay.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OperationDisplay.java deleted file mode 100644 index 406263be3008..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operations.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operations.java deleted file mode 100644 index d45d5e2133b8..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationProperties.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationProperties.java deleted file mode 100644 index 972834ef4010..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationProperties.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Organization. - */ -@Fluent -public final class OrganizationProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * partner properties - */ - private PartnerProperties partnerProperties; - - /* - * Single sign-on properties - */ - private SingleSignOnPropertiesV2 singleSignOnProperties; - - /** - * Creates an instance of OrganizationProperties class. - */ - public OrganizationProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: partner properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: partner properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * Get the singleSignOnProperties property: Single sign-on properties. - * - * @return the singleSignOnProperties value. - */ - public SingleSignOnPropertiesV2 singleSignOnProperties() { - return this.singleSignOnProperties; - } - - /** - * Set the singleSignOnProperties property: Single sign-on properties. - * - * @param singleSignOnProperties the singleSignOnProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withSingleSignOnProperties(SingleSignOnPropertiesV2 singleSignOnProperties) { - this.singleSignOnProperties = singleSignOnProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationProperties. - */ - public static OrganizationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationProperties deserializedOrganizationProperties = new OrganizationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedOrganizationProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedOrganizationProperties.user = UserDetails.fromJson(reader); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOrganizationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("singleSignOnProperties".equals(fieldName)) { - deserializedOrganizationProperties.singleSignOnProperties - = SingleSignOnPropertiesV2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationProperties; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResource.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResource.java deleted file mode 100644 index d5a814b1e0e5..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResource.java +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of OrganizationResource. - */ -public interface OrganizationResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OrganizationProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner object. - * - * @return the inner object. - */ - OrganizationResourceInner innerModel(); - - /** - * The entirety of the OrganizationResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The OrganizationResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OrganizationResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OrganizationResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the OrganizationResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the OrganizationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - OrganizationResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OrganizationResource create(Context context); - } - - /** - * The stage of the OrganizationResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the OrganizationResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(OrganizationProperties properties); - } - - /** - * The stage of the OrganizationResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the OrganizationResource resource. - * - * @return the stage of resource update. - */ - OrganizationResource.Update update(); - - /** - * The template for OrganizationResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OrganizationResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OrganizationResource apply(Context context); - } - - /** - * The OrganizationResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OrganizationResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the OrganizationResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OrganizationResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OrganizationResource refresh(Context context); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - OrganizationResource linkSaaS(SaaSData body); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - OrganizationResource linkSaaS(SaaSData body, Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation along with {@link Response}. - */ - Response latestLinkedSaaSWithResponse(Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation. - */ - LatestLinkedSaaSResponse latestLinkedSaaS(); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResourceUpdate.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResourceUpdate.java deleted file mode 100644 index aab97e88bf3e..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/OrganizationResourceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the Organization Resource. - */ -@Fluent -public final class OrganizationResourceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of OrganizationResourceUpdate class. - */ - public OrganizationResourceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdate. - */ - public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdate; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Organizations.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Organizations.java deleted file mode 100644 index 5133b5d32f23..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Organizations.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Organizations. - */ -public interface Organizations { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String organizationname, - Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body); - - /** - * Links a new SaaS to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body, Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation along with {@link Response}. - */ - Response latestLinkedSaaSWithResponse(String resourceGroupName, String organizationname, - Context context); - - /** - * Returns the latest SaaS linked to the Napster organization of the underlying monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of get latest linked SaaS resource operation. - */ - LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String organizationname); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - OrganizationResource getById(String id); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OrganizationResource resource. - * - * @param name resource name. - * @return the first stage of the new OrganizationResource definition. - */ - OrganizationResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Origin.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Origin.java deleted file mode 100644 index c23174635db3..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/PartnerProperties.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/PartnerProperties.java deleted file mode 100644 index 920bc9b71fe5..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/PartnerProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner's specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * Application name - */ - private String application; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the application property: Application name. - * - * @return the application value. - */ - public String application() { - return this.application; - } - - /** - * Set the application property: Application name. - * - * @param application the application value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withApplication(String application) { - this.application = application; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("application", this.application); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("application".equals(fieldName)) { - deserializedPartnerProperties.application = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ResourceProvisioningState.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ResourceProvisioningState.java deleted file mode 100644 index 5f38737e19e3..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSData.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSData.java deleted file mode 100644 index 18af6dc75093..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSData.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SaaS-related data properties. - */ -@Fluent -public final class SaaSData implements JsonSerializable { - /* - * SaaS resource id - */ - private String saaSResourceId; - - /** - * Creates an instance of SaaSData class. - */ - public SaaSData() { - } - - /** - * Get the saaSResourceId property: SaaS resource id. - * - * @return the saaSResourceId value. - */ - public String saaSResourceId() { - return this.saaSResourceId; - } - - /** - * Set the saaSResourceId property: SaaS resource id. - * - * @param saaSResourceId the saaSResourceId value to set. - * @return the SaaSData object itself. - */ - public SaaSData withSaaSResourceId(String saaSResourceId) { - this.saaSResourceId = saaSResourceId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SaaSData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SaaSData if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the SaaSData. - */ - public static SaaSData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SaaSData deserializedSaaSData = new SaaSData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("saaSResourceId".equals(fieldName)) { - deserializedSaaSData.saaSResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSaaSData; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSOperationGroups.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSOperationGroups.java deleted file mode 100644 index 5e7ab68bce93..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSOperationGroups.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of SaaSOperationGroups. - */ -public interface SaaSOperationGroups { - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest body); - - /** - * Resolve the token to get the SaaS resource ID and activate the SaaS resource. - * - * @param body The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace SaaS resource details. - */ - SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest body, Context context); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSResourceDetailsResponse.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSResourceDetailsResponse.java deleted file mode 100644 index 6c21c55c30f3..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SaaSResourceDetailsResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner; - -/** - * An immutable client-side representation of SaaSResourceDetailsResponse. - */ -public interface SaaSResourceDetailsResponse { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the saasId property: Id of the Marketplace SaaS Resource. - * - * @return the saasId value. - */ - String saasId(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner - * object. - * - * @return the inner object. - */ - SaaSResourceDetailsResponseInner innerModel(); -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnPropertiesV2.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnPropertiesV2.java deleted file mode 100644 index 8a4ab3a2bae1..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnPropertiesV2.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties specific to Single Sign On Resource. - */ -@Fluent -public final class SingleSignOnPropertiesV2 implements JsonSerializable { - /* - * Type of Single Sign-On mechanism being used - */ - private SingleSignOnType type; - - /* - * State of the Single Sign On for the resource - */ - private SingleSignOnStates state; - - /* - * AAD enterprise application Id used to setup SSO - */ - private String enterpriseAppId; - - /* - * URL for SSO to be used by the partner to redirect the user to their system - */ - private String url; - - /* - * List of AAD domains fetched from Microsoft Graph for user. - */ - private List aadDomains; - - /** - * Creates an instance of SingleSignOnPropertiesV2 class. - */ - public SingleSignOnPropertiesV2() { - } - - /** - * Get the type property: Type of Single Sign-On mechanism being used. - * - * @return the type value. - */ - public SingleSignOnType type() { - return this.type; - } - - /** - * Set the type property: Type of Single Sign-On mechanism being used. - * - * @param type the type value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withType(SingleSignOnType type) { - this.type = type; - return this; - } - - /** - * Get the state property: State of the Single Sign On for the resource. - * - * @return the state value. - */ - public SingleSignOnStates state() { - return this.state; - } - - /** - * Set the state property: State of the Single Sign On for the resource. - * - * @param state the state value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withState(SingleSignOnStates state) { - this.state = state; - return this; - } - - /** - * Get the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @return the enterpriseAppId value. - */ - public String enterpriseAppId() { - return this.enterpriseAppId; - } - - /** - * Set the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @param enterpriseAppId the enterpriseAppId value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withEnterpriseAppId(String enterpriseAppId) { - this.enterpriseAppId = enterpriseAppId; - return this; - } - - /** - * Get the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @param url the url value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @return the aadDomains value. - */ - public List aadDomains() { - return this.aadDomains; - } - - /** - * Set the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @param aadDomains the aadDomains value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withAadDomains(List aadDomains) { - this.aadDomains = aadDomains; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SingleSignOnPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SingleSignOnPropertiesV2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SingleSignOnPropertiesV2. - */ - public static SingleSignOnPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SingleSignOnPropertiesV2 deserializedSingleSignOnPropertiesV2 = new SingleSignOnPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.type = SingleSignOnType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.state = SingleSignOnStates.fromString(reader.getString()); - } else if ("enterpriseAppId".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.enterpriseAppId = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.url = reader.getString(); - } else if ("aadDomains".equals(fieldName)) { - List aadDomains = reader.readArray(reader1 -> reader1.getString()); - deserializedSingleSignOnPropertiesV2.aadDomains = aadDomains; - } else { - reader.skipChildren(); - } - } - - return deserializedSingleSignOnPropertiesV2; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnStates.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnStates.java deleted file mode 100644 index a58f4aaf37d9..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnStates.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Various states of the SSO resource. - */ -public final class SingleSignOnStates extends ExpandableStringEnum { - /** - * Initial state of the SSO resource. - */ - public static final SingleSignOnStates INITIAL = fromString("Initial"); - - /** - * State of the SSO resource when it is enabled. - */ - public static final SingleSignOnStates ENABLE = fromString("Enable"); - - /** - * State of the SSO resource when it is disabled. - */ - public static final SingleSignOnStates DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SingleSignOnStates value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnStates() { - } - - /** - * Creates or finds a SingleSignOnStates from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnStates. - */ - public static SingleSignOnStates fromString(String name) { - return fromString(name, SingleSignOnStates.class); - } - - /** - * Gets known SingleSignOnStates values. - * - * @return known SingleSignOnStates values. - */ - public static Collection values() { - return values(SingleSignOnStates.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnType.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnType.java deleted file mode 100644 index 4e17ee74e4ad..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/SingleSignOnType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the type of Single Sign-On (SSO) mechanism being used. - */ -public final class SingleSignOnType extends ExpandableStringEnum { - /** - * Security Assertion Markup Language (SAML) based Single Sign-On. - */ - public static final SingleSignOnType SAML = fromString("Saml"); - - /** - * OpenID Connect based Single Sign-On. - */ - public static final SingleSignOnType OPEN_ID = fromString("OpenId"); - - /** - * Creates a new instance of SingleSignOnType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnType() { - } - - /** - * Creates or finds a SingleSignOnType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnType. - */ - public static SingleSignOnType fromString(String name) { - return fromString(name, SingleSignOnType.class); - } - - /** - * Gets known SingleSignOnType values. - * - * @return known SingleSignOnType values. - */ - public static Collection values() { - return values(SingleSignOnType.class); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserAssignedIdentity.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserAssignedIdentity.java deleted file mode 100644 index d667be2608ed..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserDetails.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserDetails.java deleted file mode 100644 index 6e1896c20c74..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/UserDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.napsteromniagentapi.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/package-info.java deleted file mode 100644 index e0f1355832b5..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for NapsterOmniagentApi. - */ -package com.azure.resourcemanager.napsteromniagentapi.models; diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/package-info.java deleted file mode 100644 index 6603ebe60b86..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/package-info.java +++ /dev/null @@ -1,8 +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 NapsterOmniagentApi. - */ -package com.azure.resourcemanager.napsteromniagentapi; diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/module-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/module-info.java deleted file mode 100644 index 3cc01a406f96..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.napsteromniagentapi { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.napsteromniagentapi; - exports com.azure.resourcemanager.napsteromniagentapi.fluent; - exports com.azure.resourcemanager.napsteromniagentapi.fluent.models; - exports com.azure.resourcemanager.napsteromniagentapi.models; - - opens com.azure.resourcemanager.napsteromniagentapi.fluent.models to com.azure.core; - opens com.azure.resourcemanager.napsteromniagentapi.models to com.azure.core; - opens com.azure.resourcemanager.napsteromniagentapi.implementation.models to com.azure.core; -} diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/proxy-config.json b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/proxy-config.json deleted file mode 100644 index c7b13438da2c..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.napsteromniagentapi.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.napsteromniagentapi.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.napsteromniagentapi.implementation.SaaSOperationGroupsClientImpl$SaaSOperationGroupsService"]] \ No newline at end of file diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/reflect-config.json b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-napsteromniagentapi/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/azure-resourcemanager-napsteromniagentapi.properties b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/azure-resourcemanager-napsteromniagentapi.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/resources/azure-resourcemanager-napsteromniagentapi.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java index 13176f41a5b7..33b4a50db8d0 100644 --- a/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java +++ b/sdk/networkcloud/azure-resourcemanager-networkcloud/src/main/java/com/azure/resourcemanager/networkcloud/implementation/NetworkCloudManagementClientImpl.java @@ -608,7 +608,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/PineconeVectorDbManager.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/PineconeVectorDbManager.java deleted file mode 100644 index 3d654751b5d9..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/PineconeVectorDbManager.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.pineconevectordb.fluent.PineconeVectorDbMgmtClient; -import com.azure.resourcemanager.pineconevectordb.implementation.OperationsImpl; -import com.azure.resourcemanager.pineconevectordb.implementation.OrganizationsImpl; -import com.azure.resourcemanager.pineconevectordb.implementation.PineconeVectorDbMgmtClientBuilder; -import com.azure.resourcemanager.pineconevectordb.models.Operations; -import com.azure.resourcemanager.pineconevectordb.models.Organizations; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to PineconeVectorDbManager. - */ -public final class PineconeVectorDbManager { - private Operations operations; - - private Organizations organizations; - - private final PineconeVectorDbMgmtClient clientObject; - - private PineconeVectorDbManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new PineconeVectorDbMgmtClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Pinecone Vector Db service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Pinecone Vector Db service API instance. - */ - public static PineconeVectorDbManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of Pinecone Vector Db service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Pinecone Vector Db service API instance. - */ - public static PineconeVectorDbManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new PineconeVectorDbManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create PineconeVectorDbManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new PineconeVectorDbManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-pineconevectordb.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of Pinecone Vector Db service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Pinecone Vector Db service API instance. - */ - public PineconeVectorDbManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.pineconevectordb") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new PineconeVectorDbManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Organizations. It manages OrganizationResource. - * - * @return Resource collection API of Organizations. - */ - public Organizations organizations() { - if (this.organizations == null) { - this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this); - } - return organizations; - } - - /** - * Gets wrapped service client PineconeVectorDbMgmtClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - * - * @return Wrapped service client PineconeVectorDbMgmtClient. - */ - public PineconeVectorDbMgmtClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OperationsClient.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OperationsClient.java deleted file mode 100644 index 32d290e70a3d..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OrganizationsClient.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OrganizationsClient.java deleted file mode 100644 index ab04f51f437e..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/OrganizationsClient.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public interface OrganizationsClient { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource); - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context); - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, Context context); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/PineconeVectorDbMgmtClient.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/PineconeVectorDbMgmtClient.java deleted file mode 100644 index a41629233d7f..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/PineconeVectorDbMgmtClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for PineconeVectorDbMgmtClient class. - */ -public interface PineconeVectorDbMgmtClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - OrganizationsClient getOrganizations(); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OperationInner.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OperationInner.java deleted file mode 100644 index 1fbdb76f8f49..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.pineconevectordb.models.ActionType; -import com.azure.resourcemanager.pineconevectordb.models.OperationDisplay; -import com.azure.resourcemanager.pineconevectordb.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OrganizationResourceInner.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OrganizationResourceInner.java deleted file mode 100644 index 55f878c720eb..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/OrganizationResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentity; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Concrete tracked resource types can be created by aliasing this type using a specific property type. - */ -@Fluent -public final class OrganizationResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private OrganizationProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OrganizationResourceInner class. - */ - public OrganizationResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public OrganizationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withProperties(OrganizationProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceInner object itself. - */ - public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OrganizationResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceInner. - */ - public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOrganizationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOrganizationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOrganizationResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedOrganizationResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceInner; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/package-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/package-info.java deleted file mode 100644 index a70d5cc3d8f7..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for PineconeVectorDb. - */ -package com.azure.resourcemanager.pineconevectordb.fluent.models; diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/package-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/package-info.java deleted file mode 100644 index 36d997db9912..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for PineconeVectorDb. - */ -package com.azure.resourcemanager.pineconevectordb.fluent; diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationImpl.java deleted file mode 100644 index 196eb5fd7377..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; -import com.azure.resourcemanager.pineconevectordb.models.ActionType; -import com.azure.resourcemanager.pineconevectordb.models.Operation; -import com.azure.resourcemanager.pineconevectordb.models.OperationDisplay; -import com.azure.resourcemanager.pineconevectordb.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsClientImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsClientImpl.java deleted file mode 100644 index d049184d8fef..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.pineconevectordb.fluent.OperationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; -import com.azure.resourcemanager.pineconevectordb.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final PineconeVectorDbMgmtClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(PineconeVectorDbMgmtClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PineconeVectorDbMgmtClientOperations to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "PineconeVectorDbMgmtClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Pinecone.VectorDb/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Pinecone.VectorDb/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsImpl.java deleted file mode 100644 index b8c56b7b73b4..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OperationsImpl.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 com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.pineconevectordb.fluent.OperationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; -import com.azure.resourcemanager.pineconevectordb.models.Operation; -import com.azure.resourcemanager.pineconevectordb.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationResourceImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationResourceImpl.java deleted file mode 100644 index 9d5ef42ca437..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationResourceImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.pineconevectordb.models.ManagedServiceIdentity; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationProperties; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationResource; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationResourceUpdate; -import java.util.Collections; -import java.util.Map; - -public final class OrganizationResourceImpl - implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update { - private OrganizationResourceInner innerObject; - - private final com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OrganizationProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public OrganizationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String organizationname; - - private OrganizationResourceUpdate updateProperties; - - public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public OrganizationResource create() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), Context.NONE); - return this; - } - - public OrganizationResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), context); - return this; - } - - OrganizationResourceImpl(String name, - com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager) { - this.innerObject = new OrganizationResourceInner(); - this.serviceManager = serviceManager; - this.organizationname = name; - } - - public OrganizationResourceImpl update() { - this.updateProperties = new OrganizationResourceUpdate(); - return this; - } - - public OrganizationResource apply() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .updateWithResponse(resourceGroupName, organizationname, updateProperties, context) - .getValue(); - return this; - } - - OrganizationResourceImpl(OrganizationResourceInner innerObject, - com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.organizationname = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations"); - } - - public OrganizationResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE) - .getValue(); - return this; - } - - public OrganizationResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getOrganizations() - .getByResourceGroupWithResponse(resourceGroupName, organizationname, context) - .getValue(); - return this; - } - - public OrganizationResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OrganizationResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OrganizationResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public OrganizationResourceImpl withProperties(OrganizationProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsClientImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsClientImpl.java deleted file mode 100644 index f047f85f2bc2..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsClientImpl.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.pineconevectordb.fluent.OrganizationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.pineconevectordb.implementation.models.OrganizationResourceListResult; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OrganizationsClient. - */ -public final class OrganizationsClientImpl implements OrganizationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OrganizationsService service; - - /** - * The service client containing this operation class. - */ - private final PineconeVectorDbMgmtClientImpl client; - - /** - * Initializes an instance of OrganizationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OrganizationsClientImpl(PineconeVectorDbMgmtClientImpl client) { - this.service - = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PineconeVectorDbMgmtClientOrganizations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "PineconeVectorDbMgmtClientOrganizations") - public interface OrganizationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("organizationname") String organizationname, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Pinecone.VectorDb/organizations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String organizationname) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponseAsync(resourceGroupName, organizationname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context); - } - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname) { - return getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource, - context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, organizationname, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class, - this.client.getContext()); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> - beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, organizationname, resource); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, organizationname, resource, context); - return this.client.getLroResult(response, - OrganizationResourceInner.class, OrganizationResourceInner.class, context); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, organizationname, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource).getFinalResult(); - } - - /** - * Create a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname, - OrganizationResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, organizationname, resource, context).getFinalResult(); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String organizationname, OrganizationResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, organizationname, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties, - context); - } - - /** - * Update a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OrganizationResourceInner update(String resourceGroupName, String organizationname, - OrganizationResourceUpdate properties) { - return updateWithResponse(resourceGroupName, organizationname, properties, Context.NONE).getValue(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String organizationname) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String organizationname, - Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, organizationname, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String organizationname) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationname); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname) { - Response response = deleteWithResponse(resourceGroupName, organizationname); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String organizationname, - Context context) { - Response response = deleteWithResponse(resourceGroupName, organizationname, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String organizationname) { - return beginDeleteAsync(resourceGroupName, organizationname).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname) { - beginDelete(resourceGroupName, organizationname).getFinalResult(); - } - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String organizationname, Context context) { - beginDelete(resourceGroupName, organizationname, context).getFinalResult(); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsImpl.java deleted file mode 100644 index de777bc4ecf4..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/OrganizationsImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.pineconevectordb.fluent.OrganizationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import com.azure.resourcemanager.pineconevectordb.models.OrganizationResource; -import com.azure.resourcemanager.pineconevectordb.models.Organizations; - -public final class OrganizationsImpl implements Organizations { - private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class); - - private final OrganizationsClient innerClient; - - private final com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager; - - public OrganizationsImpl(OrganizationsClient innerClient, - com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String organizationname, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OrganizationResourceImpl(inner.getValue(), this.manager())); - } - - public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname) { - OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationname); - if (inner != null) { - return new OrganizationResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String organizationname) { - this.serviceClient().delete(resourceGroupName, organizationname); - } - - public void delete(String resourceGroupName, String organizationname, Context context) { - this.serviceClient().delete(resourceGroupName, organizationname, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager())); - } - - public OrganizationResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations"); - if (organizationname == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id))); - } - this.delete(resourceGroupName, organizationname, context); - } - - private OrganizationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.pineconevectordb.PineconeVectorDbManager manager() { - return this.serviceManager; - } - - public OrganizationResourceImpl define(String name) { - return new OrganizationResourceImpl(name, this.manager()); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientBuilder.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientBuilder.java deleted file mode 100644 index 3a1e2fb3fb71..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the PineconeVectorDbMgmtClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { PineconeVectorDbMgmtClientImpl.class }) -public final class PineconeVectorDbMgmtClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the PineconeVectorDbMgmtClientBuilder. - */ - public PineconeVectorDbMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of PineconeVectorDbMgmtClientImpl with the provided parameters. - * - * @return an instance of PineconeVectorDbMgmtClientImpl. - */ - public PineconeVectorDbMgmtClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - PineconeVectorDbMgmtClientImpl client = new PineconeVectorDbMgmtClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientImpl.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientImpl.java deleted file mode 100644 index 5fb50ba7102e..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/PineconeVectorDbMgmtClientImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.pineconevectordb.fluent.OperationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.OrganizationsClient; -import com.azure.resourcemanager.pineconevectordb.fluent.PineconeVectorDbMgmtClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the PineconeVectorDbMgmtClientImpl type. - */ -@ServiceClient(builder = PineconeVectorDbMgmtClientBuilder.class) -public final class PineconeVectorDbMgmtClientImpl implements PineconeVectorDbMgmtClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The OrganizationsClient object to access its operations. - */ - private final OrganizationsClient organizations; - - /** - * Gets the OrganizationsClient object to access its operations. - * - * @return the OrganizationsClient object. - */ - public OrganizationsClient getOrganizations() { - return this.organizations; - } - - /** - * Initializes an instance of PineconeVectorDbMgmtClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - PineconeVectorDbMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2024-10-22-preview"; - this.operations = new OperationsClientImpl(this); - this.organizations = new OrganizationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PineconeVectorDbMgmtClientImpl.class); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/ResourceManagerUtils.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/ResourceManagerUtils.java deleted file mode 100644 index 6ea513cfc54d..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OperationListResult.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OperationListResult.java deleted file mode 100644 index 0813028562f0..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OrganizationResourceListResult.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OrganizationResourceListResult.java deleted file mode 100644 index 894c90e21ff5..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/models/OrganizationResourceListResult.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a OrganizationResource list operation. - */ -@Immutable -public final class OrganizationResourceListResult implements JsonSerializable { - /* - * The OrganizationResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OrganizationResourceListResult class. - */ - private OrganizationResourceListResult() { - } - - /** - * Get the value property: The OrganizationResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationResourceListResult. - */ - public static OrganizationResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceListResult deserializedOrganizationResourceListResult - = new OrganizationResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OrganizationResourceInner.fromJson(reader1)); - deserializedOrganizationResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOrganizationResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceListResult; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/package-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/package-info.java deleted file mode 100644 index 96b80f0657a9..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/implementation/package-info.java +++ /dev/null @@ -1,8 +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 PineconeVectorDb. - */ -package com.azure.resourcemanager.pineconevectordb.implementation; diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ActionType.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ActionType.java deleted file mode 100644 index 2abf5e848f10..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentity.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentity.java deleted file mode 100644 index 4578e5a162b2..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentityType.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentityType.java deleted file mode 100644 index f8d3169ab015..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceDetails.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceDetails.java deleted file mode 100644 index 4e7f730141ad..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceSubscriptionStatus.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index 47315186a7ff..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OfferDetails.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OfferDetails.java deleted file mode 100644 index 79247ae49ba4..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operation.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operation.java deleted file mode 100644 index 7f2701fd77cd..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.pineconevectordb.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OperationDisplay.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OperationDisplay.java deleted file mode 100644 index d7217fb691de..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operations.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operations.java deleted file mode 100644 index 0fa6604ced52..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationProperties.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationProperties.java deleted file mode 100644 index d1f24f3dc93e..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationProperties.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Organization. - */ -@Fluent -public final class OrganizationProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * partner properties - */ - private PartnerProperties partnerProperties; - - /* - * Single sign-on properties - */ - private SingleSignOnPropertiesV2 singleSignOnProperties; - - /** - * Creates an instance of OrganizationProperties class. - */ - public OrganizationProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: partner properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: partner properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * Get the singleSignOnProperties property: Single sign-on properties. - * - * @return the singleSignOnProperties value. - */ - public SingleSignOnPropertiesV2 singleSignOnProperties() { - return this.singleSignOnProperties; - } - - /** - * Set the singleSignOnProperties property: Single sign-on properties. - * - * @param singleSignOnProperties the singleSignOnProperties value to set. - * @return the OrganizationProperties object itself. - */ - public OrganizationProperties withSingleSignOnProperties(SingleSignOnPropertiesV2 singleSignOnProperties) { - this.singleSignOnProperties = singleSignOnProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OrganizationProperties. - */ - public static OrganizationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationProperties deserializedOrganizationProperties = new OrganizationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedOrganizationProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedOrganizationProperties.user = UserDetails.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedOrganizationProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("partnerProperties".equals(fieldName)) { - deserializedOrganizationProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else if ("singleSignOnProperties".equals(fieldName)) { - deserializedOrganizationProperties.singleSignOnProperties - = SingleSignOnPropertiesV2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationProperties; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResource.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResource.java deleted file mode 100644 index 12f9fa361873..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResource.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of OrganizationResource. - */ -public interface OrganizationResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - OrganizationProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.pineconevectordb.fluent.models.OrganizationResourceInner object. - * - * @return the inner object. - */ - OrganizationResourceInner innerModel(); - - /** - * The entirety of the OrganizationResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The OrganizationResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the OrganizationResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the OrganizationResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the OrganizationResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the OrganizationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - OrganizationResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OrganizationResource create(Context context); - } - - /** - * The stage of the OrganizationResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the OrganizationResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(OrganizationProperties properties); - } - - /** - * The stage of the OrganizationResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the OrganizationResource resource. - * - * @return the stage of resource update. - */ - OrganizationResource.Update update(); - - /** - * The template for OrganizationResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OrganizationResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OrganizationResource apply(Context context); - } - - /** - * The OrganizationResource update stages. - */ - interface UpdateStages { - /** - * The stage of the OrganizationResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the OrganizationResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OrganizationResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OrganizationResource refresh(Context context); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResourceUpdate.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResourceUpdate.java deleted file mode 100644 index f0ec5aa456f3..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/OrganizationResourceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the Organization Resource. - */ -@Fluent -public final class OrganizationResourceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of OrganizationResourceUpdate class. - */ - public OrganizationResourceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the OrganizationResourceUpdate object itself. - */ - public OrganizationResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OrganizationResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OrganizationResourceUpdate if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OrganizationResourceUpdate. - */ - public static OrganizationResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OrganizationResourceUpdate deserializedOrganizationResourceUpdate = new OrganizationResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOrganizationResourceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedOrganizationResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOrganizationResourceUpdate; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Organizations.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Organizations.java deleted file mode 100644 index 0933a0bbea77..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Organizations.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Organizations. - */ -public interface Organizations { - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String organizationname, - Context context); - - /** - * Get a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource. - */ - OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String organizationname); - - /** - * Delete a OrganizationResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param organizationname Name of the Organization resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String organizationname, Context context); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List OrganizationResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List OrganizationResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List OrganizationResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OrganizationResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - OrganizationResource getById(String id); - - /** - * Get a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OrganizationResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a OrganizationResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OrganizationResource resource. - * - * @param name resource name. - * @return the first stage of the new OrganizationResource definition. - */ - OrganizationResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Origin.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Origin.java deleted file mode 100644 index 51676cf402a9..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/PartnerProperties.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/PartnerProperties.java deleted file mode 100644 index b059656d32bf..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/PartnerProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner's specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * Pinecone Organization Name - */ - private String displayName; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the displayName property: Pinecone Organization Name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Pinecone Organization Name. - * - * @param displayName the displayName value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("displayName".equals(fieldName)) { - deserializedPartnerProperties.displayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ResourceProvisioningState.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ResourceProvisioningState.java deleted file mode 100644 index 986aedbcaed5..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnPropertiesV2.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnPropertiesV2.java deleted file mode 100644 index 1e2676dbc4f1..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnPropertiesV2.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties specific to Single Sign On Resource. - */ -@Fluent -public final class SingleSignOnPropertiesV2 implements JsonSerializable { - /* - * Type of Single Sign-On mechanism being used - */ - private SingleSignOnType type; - - /* - * State of the Single Sign On for the resource - */ - private SingleSignOnStates state; - - /* - * AAD enterprise application Id used to setup SSO - */ - private String enterpriseAppId; - - /* - * URL for SSO to be used by the partner to redirect the user to their system - */ - private String url; - - /* - * List of AAD domains fetched from Microsoft Graph for user. - */ - private List aadDomains; - - /** - * Creates an instance of SingleSignOnPropertiesV2 class. - */ - public SingleSignOnPropertiesV2() { - } - - /** - * Get the type property: Type of Single Sign-On mechanism being used. - * - * @return the type value. - */ - public SingleSignOnType type() { - return this.type; - } - - /** - * Set the type property: Type of Single Sign-On mechanism being used. - * - * @param type the type value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withType(SingleSignOnType type) { - this.type = type; - return this; - } - - /** - * Get the state property: State of the Single Sign On for the resource. - * - * @return the state value. - */ - public SingleSignOnStates state() { - return this.state; - } - - /** - * Set the state property: State of the Single Sign On for the resource. - * - * @param state the state value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withState(SingleSignOnStates state) { - this.state = state; - return this; - } - - /** - * Get the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @return the enterpriseAppId value. - */ - public String enterpriseAppId() { - return this.enterpriseAppId; - } - - /** - * Set the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @param enterpriseAppId the enterpriseAppId value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withEnterpriseAppId(String enterpriseAppId) { - this.enterpriseAppId = enterpriseAppId; - return this; - } - - /** - * Get the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @param url the url value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @return the aadDomains value. - */ - public List aadDomains() { - return this.aadDomains; - } - - /** - * Set the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @param aadDomains the aadDomains value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withAadDomains(List aadDomains) { - this.aadDomains = aadDomains; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SingleSignOnPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SingleSignOnPropertiesV2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SingleSignOnPropertiesV2. - */ - public static SingleSignOnPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SingleSignOnPropertiesV2 deserializedSingleSignOnPropertiesV2 = new SingleSignOnPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.type = SingleSignOnType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.state = SingleSignOnStates.fromString(reader.getString()); - } else if ("enterpriseAppId".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.enterpriseAppId = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.url = reader.getString(); - } else if ("aadDomains".equals(fieldName)) { - List aadDomains = reader.readArray(reader1 -> reader1.getString()); - deserializedSingleSignOnPropertiesV2.aadDomains = aadDomains; - } else { - reader.skipChildren(); - } - } - - return deserializedSingleSignOnPropertiesV2; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnStates.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnStates.java deleted file mode 100644 index 5ed28b5fa1f4..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnStates.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Various states of the SSO resource. - */ -public final class SingleSignOnStates extends ExpandableStringEnum { - /** - * Initial state of the SSO resource. - */ - public static final SingleSignOnStates INITIAL = fromString("Initial"); - - /** - * State of the SSO resource when it is enabled. - */ - public static final SingleSignOnStates ENABLE = fromString("Enable"); - - /** - * State of the SSO resource when it is disabled. - */ - public static final SingleSignOnStates DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SingleSignOnStates value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnStates() { - } - - /** - * Creates or finds a SingleSignOnStates from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnStates. - */ - public static SingleSignOnStates fromString(String name) { - return fromString(name, SingleSignOnStates.class); - } - - /** - * Gets known SingleSignOnStates values. - * - * @return known SingleSignOnStates values. - */ - public static Collection values() { - return values(SingleSignOnStates.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnType.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnType.java deleted file mode 100644 index b5dac4c4ed1b..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/SingleSignOnType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the type of Single Sign-On (SSO) mechanism being used. - */ -public final class SingleSignOnType extends ExpandableStringEnum { - /** - * Security Assertion Markup Language (SAML) based Single Sign-On. - */ - public static final SingleSignOnType SAML = fromString("Saml"); - - /** - * OpenID Connect based Single Sign-On. - */ - public static final SingleSignOnType OPEN_ID = fromString("OpenId"); - - /** - * Creates a new instance of SingleSignOnType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnType() { - } - - /** - * Creates or finds a SingleSignOnType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnType. - */ - public static SingleSignOnType fromString(String name) { - return fromString(name, SingleSignOnType.class); - } - - /** - * Gets known SingleSignOnType values. - * - * @return known SingleSignOnType values. - */ - public static Collection values() { - return values(SingleSignOnType.class); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserAssignedIdentity.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserAssignedIdentity.java deleted file mode 100644 index 078016451a30..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserDetails.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserDetails.java deleted file mode 100644 index 8c4bae00d9d6..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/UserDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.pineconevectordb.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/package-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/package-info.java deleted file mode 100644 index f64872aa3120..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for PineconeVectorDb. - */ -package com.azure.resourcemanager.pineconevectordb.models; diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/package-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/package-info.java deleted file mode 100644 index d5eebf706e75..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/com/azure/resourcemanager/pineconevectordb/package-info.java +++ /dev/null @@ -1,8 +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 PineconeVectorDb. - */ -package com.azure.resourcemanager.pineconevectordb; diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/module-info.java b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/module-info.java deleted file mode 100644 index e435a0c62082..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.pineconevectordb { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.pineconevectordb; - exports com.azure.resourcemanager.pineconevectordb.fluent; - exports com.azure.resourcemanager.pineconevectordb.fluent.models; - exports com.azure.resourcemanager.pineconevectordb.models; - - opens com.azure.resourcemanager.pineconevectordb.fluent.models to com.azure.core; - opens com.azure.resourcemanager.pineconevectordb.models to com.azure.core; - opens com.azure.resourcemanager.pineconevectordb.implementation.models to com.azure.core; -} diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/proxy-config.json b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/proxy-config.json deleted file mode 100644 index 447510e74b1a..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.pineconevectordb.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.pineconevectordb.implementation.OrganizationsClientImpl$OrganizationsService"]] \ No newline at end of file diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/reflect-config.json b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-pineconevectordb/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/azure-resourcemanager-pineconevectordb.properties b/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/azure-resourcemanager-pineconevectordb.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/pineconevectordb/azure-resourcemanager-pineconevectordb/src/main/resources/azure-resourcemanager-pineconevectordb.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/WeightsAndBiasesManager.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/WeightsAndBiasesManager.java deleted file mode 100644 index 69da529b1be9..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/WeightsAndBiasesManager.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -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.BearerTokenAuthenticationPolicy; -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.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.weightsandbiases.fluent.WeightsAndBiasesManagementClient; -import com.azure.resourcemanager.weightsandbiases.implementation.InstancesImpl; -import com.azure.resourcemanager.weightsandbiases.implementation.OperationsImpl; -import com.azure.resourcemanager.weightsandbiases.implementation.WeightsAndBiasesManagementClientBuilder; -import com.azure.resourcemanager.weightsandbiases.models.Instances; -import com.azure.resourcemanager.weightsandbiases.models.Operations; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to WeightsAndBiasesManager. - */ -public final class WeightsAndBiasesManager { - private Operations operations; - - private Instances instances; - - private final WeightsAndBiasesManagementClient clientObject; - - private WeightsAndBiasesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new WeightsAndBiasesManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Weights And Biases service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Weights And Biases service API instance. - */ - public static WeightsAndBiasesManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of Weights And Biases service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Weights And Biases service API instance. - */ - public static WeightsAndBiasesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new WeightsAndBiasesManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create WeightsAndBiasesManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new WeightsAndBiasesManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - private static final String SDK_VERSION = "version"; - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-resourcemanager-weightsandbiases.properties"); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of Weights And Biases service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Weights And Biases service API instance. - */ - public WeightsAndBiasesManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.weightsandbiases") - .append("/") - .append(clientVersion); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new WeightsAndBiasesManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Instances. It manages InstanceResource. - * - * @return Resource collection API of Instances. - */ - public Instances instances() { - if (this.instances == null) { - this.instances = new InstancesImpl(clientObject.getInstances(), this); - } - return instances; - } - - /** - * Gets wrapped service client WeightsAndBiasesManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - * - * @return Wrapped service client WeightsAndBiasesManagementClient. - */ - public WeightsAndBiasesManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/InstancesClient.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/InstancesClient.java deleted file mode 100644 index 8a98db69d909..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/InstancesClient.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import com.azure.resourcemanager.weightsandbiases.models.InstanceResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in InstancesClient. - */ -public interface InstancesClient { - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String instancename, - Context context); - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstanceResourceInner getByResourceGroup(String resourceGroupName, String instancename); - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstanceResourceInner> beginCreateOrUpdate(String resourceGroupName, - String instancename, InstanceResourceInner resource); - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstanceResourceInner> beginCreateOrUpdate(String resourceGroupName, - String instancename, InstanceResourceInner resource, Context context); - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstanceResourceInner createOrUpdate(String resourceGroupName, String instancename, InstanceResourceInner resource); - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstanceResourceInner createOrUpdate(String resourceGroupName, String instancename, InstanceResourceInner resource, - Context context); - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String instancename, - InstanceResourceUpdate properties, Context context); - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstanceResourceInner update(String resourceGroupName, String instancename, InstanceResourceUpdate properties); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String instancename); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String instancename, Context context); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String instancename); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String instancename, Context context); - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List InstanceResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List InstanceResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/OperationsClient.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/OperationsClient.java deleted file mode 100644 index 151e09d833bf..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/WeightsAndBiasesManagementClient.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/WeightsAndBiasesManagementClient.java deleted file mode 100644 index 0330bdafee01..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/WeightsAndBiasesManagementClient.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for WeightsAndBiasesManagementClient class. - */ -public interface WeightsAndBiasesManagementClient { - /** - * Gets Service host. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the InstancesClient object to access its operations. - * - * @return the InstancesClient object. - */ - InstancesClient getInstances(); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/InstanceResourceInner.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/InstanceResourceInner.java deleted file mode 100644 index c2ec027e18fc..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/InstanceResourceInner.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.weightsandbiases.models.InstanceProperties; -import com.azure.resourcemanager.weightsandbiases.models.ManagedServiceIdentity; -import java.io.IOException; -import java.util.Map; - -/** - * Concrete tracked resource types can be created by aliasing this type using a specific property type. - */ -@Fluent -public final class InstanceResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private InstanceProperties properties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of InstanceResourceInner class. - */ - public InstanceResourceInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public InstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the InstanceResourceInner object itself. - */ - public InstanceResourceInner withProperties(InstanceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the InstanceResourceInner object itself. - */ - public InstanceResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public InstanceResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InstanceResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InstanceResourceInner. - */ - public static InstanceResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceResourceInner deserializedInstanceResourceInner = new InstanceResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedInstanceResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedInstanceResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedInstanceResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedInstanceResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedInstanceResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedInstanceResourceInner.properties = InstanceProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedInstanceResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedInstanceResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceResourceInner; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/OperationInner.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/OperationInner.java deleted file mode 100644 index 1899928f7986..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/OperationInner.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.weightsandbiases.models.ActionType; -import com.azure.resourcemanager.weightsandbiases.models.OperationDisplay; -import com.azure.resourcemanager.weightsandbiases.models.Origin; -import java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Immutable -public final class OperationInner implements JsonSerializable { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure - * Resource Manager/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - private Origin origin; - - /* - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - private OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("display", this.display); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationInner.origin = Origin.fromString(reader.getString()); - } else if ("actionType".equals(fieldName)) { - deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/package-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/package-info.java deleted file mode 100644 index 9102a799eb34..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/models/package-info.java +++ /dev/null @@ -1,8 +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 inner data models for WeightsAndBiases. - */ -package com.azure.resourcemanager.weightsandbiases.fluent.models; diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/package-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/package-info.java deleted file mode 100644 index 3e131f014834..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/fluent/package-info.java +++ /dev/null @@ -1,8 +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 service clients for WeightsAndBiases. - */ -package com.azure.resourcemanager.weightsandbiases.fluent; diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstanceResourceImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstanceResourceImpl.java deleted file mode 100644 index 3d18f68195ba..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstanceResourceImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import com.azure.resourcemanager.weightsandbiases.models.InstanceProperties; -import com.azure.resourcemanager.weightsandbiases.models.InstanceResource; -import com.azure.resourcemanager.weightsandbiases.models.InstanceResourceUpdate; -import com.azure.resourcemanager.weightsandbiases.models.ManagedServiceIdentity; -import java.util.Collections; -import java.util.Map; - -public final class InstanceResourceImpl - implements InstanceResource, InstanceResource.Definition, InstanceResource.Update { - private InstanceResourceInner innerObject; - - private final com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public InstanceProperties properties() { - return this.innerModel().properties(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public InstanceResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String instancename; - - private InstanceResourceUpdate updateProperties; - - public InstanceResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public InstanceResource create() { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .createOrUpdate(resourceGroupName, instancename, this.innerModel(), Context.NONE); - return this; - } - - public InstanceResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .createOrUpdate(resourceGroupName, instancename, this.innerModel(), context); - return this; - } - - InstanceResourceImpl(String name, - com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager) { - this.innerObject = new InstanceResourceInner(); - this.serviceManager = serviceManager; - this.instancename = name; - } - - public InstanceResourceImpl update() { - this.updateProperties = new InstanceResourceUpdate(); - return this; - } - - public InstanceResource apply() { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .updateWithResponse(resourceGroupName, instancename, updateProperties, Context.NONE) - .getValue(); - return this; - } - - public InstanceResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .updateWithResponse(resourceGroupName, instancename, updateProperties, context) - .getValue(); - return this; - } - - InstanceResourceImpl(InstanceResourceInner innerObject, - com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.instancename = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "instances"); - } - - public InstanceResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .getByResourceGroupWithResponse(resourceGroupName, instancename, Context.NONE) - .getValue(); - return this; - } - - public InstanceResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getInstances() - .getByResourceGroupWithResponse(resourceGroupName, instancename, context) - .getValue(); - return this; - } - - public InstanceResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public InstanceResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public InstanceResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateProperties.withTags(tags); - return this; - } - } - - public InstanceResourceImpl withProperties(InstanceProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public InstanceResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateProperties.withIdentity(identity); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesClientImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesClientImpl.java deleted file mode 100644 index 9e5b4af48c9e..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesClientImpl.java +++ /dev/null @@ -1,1009 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.weightsandbiases.fluent.InstancesClient; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import com.azure.resourcemanager.weightsandbiases.implementation.models.InstanceResourceListResult; -import com.azure.resourcemanager.weightsandbiases.models.InstanceResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in InstancesClient. - */ -public final class InstancesClientImpl implements InstancesClient { - /** - * The proxy service used to perform REST calls. - */ - private final InstancesService service; - - /** - * The service client containing this operation class. - */ - private final WeightsAndBiasesManagementClientImpl client; - - /** - * Initializes an instance of InstancesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - InstancesClientImpl(WeightsAndBiasesManagementClientImpl client) { - this.service - = RestProxy.create(InstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for WeightsAndBiasesManagementClientInstances to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "WeightsAndBiasesManagementClientInstances") - public interface InstancesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") InstanceResourceInner resource, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") InstanceResourceInner resource, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") InstanceResourceUpdate properties, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") InstanceResourceUpdate properties, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancename") String instancename, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String instancename) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String instancename) { - return getByResourceGroupWithResponseAsync(resourceGroupName, instancename) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String instancename, - Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, accept, context); - } - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceResourceInner getByResourceGroup(String resourceGroupName, String instancename) { - return getByResourceGroupWithResponse(resourceGroupName, instancename, Context.NONE).getValue(); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String instancename, InstanceResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, contentType, accept, resource, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String instancename, - InstanceResourceInner resource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, contentType, accept, resource, - Context.NONE); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String instancename, - InstanceResourceInner resource, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, contentType, accept, resource, context); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InstanceResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String instancename, InstanceResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, instancename, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), InstanceResourceInner.class, InstanceResourceInner.class, - this.client.getContext()); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstanceResourceInner> - beginCreateOrUpdate(String resourceGroupName, String instancename, InstanceResourceInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, instancename, resource); - return this.client.getLroResult(response, - InstanceResourceInner.class, InstanceResourceInner.class, Context.NONE); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this - * type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String instancename, InstanceResourceInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, instancename, resource, context); - return this.client.getLroResult(response, - InstanceResourceInner.class, InstanceResourceInner.class, context); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String instancename, - InstanceResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, instancename, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceResourceInner createOrUpdate(String resourceGroupName, String instancename, - InstanceResourceInner resource) { - return beginCreateOrUpdate(resourceGroupName, instancename, resource).getFinalResult(); - } - - /** - * Create a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceResourceInner createOrUpdate(String resourceGroupName, String instancename, - InstanceResourceInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, instancename, resource, context).getFinalResult(); - } - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String instancename, - InstanceResourceUpdate properties) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, contentType, accept, properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String instancename, - InstanceResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, instancename, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String instancename, - InstanceResourceUpdate properties, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, contentType, accept, properties, context); - } - - /** - * Update a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete tracked resource types can be created by aliasing this type using a specific property type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceResourceInner update(String resourceGroupName, String instancename, - InstanceResourceUpdate properties) { - return updateWithResponse(resourceGroupName, instancename, properties, Context.NONE).getValue(); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String instancename) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String instancename) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, Context.NONE); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String instancename, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancename, context); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String instancename) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, instancename); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String instancename) { - Response response = deleteWithResponse(resourceGroupName, instancename); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String instancename, - Context context) { - Response response = deleteWithResponse(resourceGroupName, instancename, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String instancename) { - return beginDeleteAsync(resourceGroupName, instancename).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String instancename) { - beginDelete(resourceGroupName, instancename).getFinalResult(); - } - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String instancename, Context context) { - beginDelete(resourceGroupName, instancename, context).getFinalResult(); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); - } - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); - } - - /** - * List InstanceResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesImpl.java deleted file mode 100644 index e10fa01f7b82..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/InstancesImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.weightsandbiases.fluent.InstancesClient; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import com.azure.resourcemanager.weightsandbiases.models.InstanceResource; -import com.azure.resourcemanager.weightsandbiases.models.Instances; - -public final class InstancesImpl implements Instances { - private static final ClientLogger LOGGER = new ClientLogger(InstancesImpl.class); - - private final InstancesClient innerClient; - - private final com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager; - - public InstancesImpl(InstancesClient innerClient, - com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String instancename, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, instancename, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new InstanceResourceImpl(inner.getValue(), this.manager())); - } - - public InstanceResource getByResourceGroup(String resourceGroupName, String instancename) { - InstanceResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, instancename); - if (inner != null) { - return new InstanceResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String instancename) { - this.serviceClient().delete(resourceGroupName, instancename); - } - - public void delete(String resourceGroupName, String instancename, Context context) { - this.serviceClient().delete(resourceGroupName, instancename, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InstanceResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InstanceResourceImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InstanceResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new InstanceResourceImpl(inner1, this.manager())); - } - - public InstanceResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String instancename = ResourceManagerUtils.getValueFromIdByName(id, "instances"); - if (instancename == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'instances'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, instancename, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String instancename = ResourceManagerUtils.getValueFromIdByName(id, "instances"); - if (instancename == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'instances'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, instancename, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String instancename = ResourceManagerUtils.getValueFromIdByName(id, "instances"); - if (instancename == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'instances'.", id))); - } - this.delete(resourceGroupName, instancename, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String instancename = ResourceManagerUtils.getValueFromIdByName(id, "instances"); - if (instancename == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'instances'.", id))); - } - this.delete(resourceGroupName, instancename, context); - } - - private InstancesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager manager() { - return this.serviceManager; - } - - public InstanceResourceImpl define(String name) { - return new InstanceResourceImpl(name, this.manager()); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationImpl.java deleted file mode 100644 index cc7917296aca..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; -import com.azure.resourcemanager.weightsandbiases.models.ActionType; -import com.azure.resourcemanager.weightsandbiases.models.Operation; -import com.azure.resourcemanager.weightsandbiases.models.OperationDisplay; -import com.azure.resourcemanager.weightsandbiases.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsClientImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsClientImpl.java deleted file mode 100644 index b1606c758e70..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.weightsandbiases.fluent.OperationsClient; -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; -import com.azure.resourcemanager.weightsandbiases.implementation.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final WeightsAndBiasesManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(WeightsAndBiasesManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for WeightsAndBiasesManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "WeightsAndBiasesManagementClientOperations") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.WeightsAndBiases/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.WeightsAndBiases/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); - } - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsImpl.java deleted file mode 100644 index 34c1d9020c27..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/OperationsImpl.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 com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.weightsandbiases.fluent.OperationsClient; -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; -import com.azure.resourcemanager.weightsandbiases.models.Operation; -import com.azure.resourcemanager.weightsandbiases.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.weightsandbiases.WeightsAndBiasesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/ResourceManagerUtils.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/ResourceManagerUtils.java deleted file mode 100644 index 137a852b1566..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientBuilder.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientBuilder.java deleted file mode 100644 index a025f2c72afd..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -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.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the WeightsAndBiasesManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { WeightsAndBiasesManagementClientImpl.class }) -public final class WeightsAndBiasesManagementClientBuilder { - /* - * Service host - */ - private String endpoint; - - /** - * Sets Service host. - * - * @param endpoint the endpoint value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the WeightsAndBiasesManagementClientBuilder. - */ - public WeightsAndBiasesManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of WeightsAndBiasesManagementClientImpl with the provided parameters. - * - * @return an instance of WeightsAndBiasesManagementClientImpl. - */ - public WeightsAndBiasesManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - WeightsAndBiasesManagementClientImpl client = new WeightsAndBiasesManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); - return client; - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientImpl.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientImpl.java deleted file mode 100644 index afd0e4c22c8e..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/WeightsAndBiasesManagementClientImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.SyncPollerFactory; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.weightsandbiases.fluent.InstancesClient; -import com.azure.resourcemanager.weightsandbiases.fluent.OperationsClient; -import com.azure.resourcemanager.weightsandbiases.fluent.WeightsAndBiasesManagementClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the WeightsAndBiasesManagementClientImpl type. - */ -@ServiceClient(builder = WeightsAndBiasesManagementClientBuilder.class) -public final class WeightsAndBiasesManagementClientImpl implements WeightsAndBiasesManagementClient { - /** - * Service host. - */ - private final String endpoint; - - /** - * Gets Service host. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Version parameter. - */ - private final String apiVersion; - - /** - * Gets Version parameter. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * 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. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The InstancesClient object to access its operations. - */ - private final InstancesClient instances; - - /** - * Gets the InstancesClient object to access its operations. - * - * @return the InstancesClient object. - */ - public InstancesClient getInstances() { - return this.instances; - } - - /** - * Initializes an instance of WeightsAndBiasesManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - */ - WeightsAndBiasesManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; - this.subscriptionId = subscriptionId; - this.apiVersion = "2024-09-18"; - this.operations = new OperationsClientImpl(this); - this.instances = new InstancesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return SyncPoller for poll result and final result. - */ - public SyncPoller, U> getLroResult(Response activationResponse, - Type pollResultType, Type finalResultType, Context context) { - return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, () -> activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WeightsAndBiasesManagementClientImpl.class); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/InstanceResourceListResult.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/InstanceResourceListResult.java deleted file mode 100644 index 6793be3b6596..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/InstanceResourceListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a InstanceResource list operation. - */ -@Immutable -public final class InstanceResourceListResult implements JsonSerializable { - /* - * The InstanceResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of InstanceResourceListResult class. - */ - private InstanceResourceListResult() { - } - - /** - * Get the value property: The InstanceResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceResourceListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InstanceResourceListResult. - */ - public static InstanceResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceResourceListResult deserializedInstanceResourceListResult = new InstanceResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> InstanceResourceInner.fromJson(reader1)); - deserializedInstanceResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedInstanceResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceResourceListResult; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/OperationListResult.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/OperationListResult.java deleted file mode 100644 index 847a62a6a53c..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/models/OperationListResult.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * The Operation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - private OperationListResult() { - } - - /** - * Get the value property: The Operation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/package-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/package-info.java deleted file mode 100644 index 71105c0f84e0..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/implementation/package-info.java +++ /dev/null @@ -1,8 +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 WeightsAndBiases. - */ -package com.azure.resourcemanager.weightsandbiases.implementation; diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ActionType.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ActionType.java deleted file mode 100644 index eefe535f188b..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Actions are for internal-only APIs. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceProperties.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceProperties.java deleted file mode 100644 index 43bd2140d83d..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceProperties.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties specific to Instance. - */ -@Fluent -public final class InstanceProperties implements JsonSerializable { - /* - * Marketplace details of the resource. - */ - private MarketplaceDetails marketplace; - - /* - * Details of the user. - */ - private UserDetails user; - - /* - * Provisioning state of the resource. - */ - private ResourceProvisioningState provisioningState; - - /* - * partner properties - */ - private PartnerProperties partnerProperties; - - /* - * Single sign-on properties - */ - private SingleSignOnPropertiesV2 singleSignOnProperties; - - /** - * Creates an instance of InstanceProperties class. - */ - public InstanceProperties() { - } - - /** - * Get the marketplace property: Marketplace details of the resource. - * - * @return the marketplace value. - */ - public MarketplaceDetails marketplace() { - return this.marketplace; - } - - /** - * Set the marketplace property: Marketplace details of the resource. - * - * @param marketplace the marketplace value to set. - * @return the InstanceProperties object itself. - */ - public InstanceProperties withMarketplace(MarketplaceDetails marketplace) { - this.marketplace = marketplace; - return this; - } - - /** - * Get the user property: Details of the user. - * - * @return the user value. - */ - public UserDetails user() { - return this.user; - } - - /** - * Set the user property: Details of the user. - * - * @param user the user value to set. - * @return the InstanceProperties object itself. - */ - public InstanceProperties withUser(UserDetails user) { - this.user = user; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the partnerProperties property: partner properties. - * - * @return the partnerProperties value. - */ - public PartnerProperties partnerProperties() { - return this.partnerProperties; - } - - /** - * Set the partnerProperties property: partner properties. - * - * @param partnerProperties the partnerProperties value to set. - * @return the InstanceProperties object itself. - */ - public InstanceProperties withPartnerProperties(PartnerProperties partnerProperties) { - this.partnerProperties = partnerProperties; - return this; - } - - /** - * Get the singleSignOnProperties property: Single sign-on properties. - * - * @return the singleSignOnProperties value. - */ - public SingleSignOnPropertiesV2 singleSignOnProperties() { - return this.singleSignOnProperties; - } - - /** - * Set the singleSignOnProperties property: Single sign-on properties. - * - * @param singleSignOnProperties the singleSignOnProperties value to set. - * @return the InstanceProperties object itself. - */ - public InstanceProperties withSingleSignOnProperties(SingleSignOnPropertiesV2 singleSignOnProperties) { - this.singleSignOnProperties = singleSignOnProperties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("marketplace", this.marketplace); - jsonWriter.writeJsonField("user", this.user); - jsonWriter.writeJsonField("partnerProperties", this.partnerProperties); - jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the InstanceProperties. - */ - public static InstanceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceProperties deserializedInstanceProperties = new InstanceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("marketplace".equals(fieldName)) { - deserializedInstanceProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedInstanceProperties.user = UserDetails.fromJson(reader); - } else if ("partnerProperties".equals(fieldName)) { - deserializedInstanceProperties.partnerProperties = PartnerProperties.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedInstanceProperties.provisioningState - = ResourceProvisioningState.fromString(reader.getString()); - } else if ("singleSignOnProperties".equals(fieldName)) { - deserializedInstanceProperties.singleSignOnProperties = SingleSignOnPropertiesV2.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceProperties; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResource.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResource.java deleted file mode 100644 index f08f2a283269..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResource.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner; -import java.util.Map; - -/** - * An immutable client-side representation of InstanceResource. - */ -public interface InstanceResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - InstanceProperties properties(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.weightsandbiases.fluent.models.InstanceResourceInner object. - * - * @return the inner object. - */ - InstanceResourceInner innerModel(); - - /** - * The entirety of the InstanceResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The InstanceResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the InstanceResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the InstanceResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the InstanceResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the InstanceResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - InstanceResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - InstanceResource create(Context context); - } - - /** - * The stage of the InstanceResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the InstanceResource definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(InstanceProperties properties); - } - - /** - * The stage of the InstanceResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Begins update for the InstanceResource resource. - * - * @return the stage of resource update. - */ - InstanceResource.Update update(); - - /** - * The template for InstanceResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - InstanceResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - InstanceResource apply(Context context); - } - - /** - * The InstanceResource update stages. - */ - interface UpdateStages { - /** - * The stage of the InstanceResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the InstanceResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - InstanceResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - InstanceResource refresh(Context context); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResourceUpdate.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResourceUpdate.java deleted file mode 100644 index acea785b74c8..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/InstanceResourceUpdate.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the Instance Resource. - */ -@Fluent -public final class InstanceResourceUpdate implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /** - * Creates an instance of InstanceResourceUpdate class. - */ - public InstanceResourceUpdate() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the InstanceResourceUpdate object itself. - */ - public InstanceResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the InstanceResourceUpdate object itself. - */ - public InstanceResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstanceResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstanceResourceUpdate if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the InstanceResourceUpdate. - */ - public static InstanceResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstanceResourceUpdate deserializedInstanceResourceUpdate = new InstanceResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedInstanceResourceUpdate.tags = tags; - } else if ("identity".equals(fieldName)) { - deserializedInstanceResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInstanceResourceUpdate; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Instances.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Instances.java deleted file mode 100644 index dae0cc2add3a..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Instances.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Instances. - */ -public interface Instances { - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String instancename, - Context context); - - /** - * Get a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource. - */ - InstanceResource getByResourceGroup(String resourceGroupName, String instancename); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String instancename); - - /** - * Delete a InstanceResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancename Name of the Instance resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String instancename, Context context); - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List InstanceResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List InstanceResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List InstanceResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a InstanceResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get a InstanceResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response}. - */ - InstanceResource getById(String id); - - /** - * Get a InstanceResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a InstanceResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a InstanceResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a InstanceResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new InstanceResource resource. - * - * @param name resource name. - * @return the first stage of the new InstanceResource definition. - */ - InstanceResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentity.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentity.java deleted file mode 100644 index c16cea93e4a7..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity assigned to this resource. - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentityType.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentityType.java deleted file mode 100644 index bbac54302199..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceDetails.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceDetails.java deleted file mode 100644 index 6a77bd408f9d..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceDetails.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Marketplace details for an organization. - */ -@Fluent -public final class MarketplaceDetails implements JsonSerializable { - /* - * Azure subscription id for the the marketplace offer is purchased from - */ - private String subscriptionId; - - /* - * Marketplace subscription status - */ - private MarketplaceSubscriptionStatus subscriptionStatus; - - /* - * Offer details for the marketplace that is selected by the user - */ - private OfferDetails offerDetails; - - /** - * Creates an instance of MarketplaceDetails class. - */ - public MarketplaceDetails() { - } - - /** - * Get the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription id for the the marketplace offer is purchased from. - * - * @param subscriptionId the subscriptionId value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the subscriptionStatus property: Marketplace subscription status. - * - * @return the subscriptionStatus value. - */ - public MarketplaceSubscriptionStatus subscriptionStatus() { - return this.subscriptionStatus; - } - - /** - * Get the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @return the offerDetails value. - */ - public OfferDetails offerDetails() { - return this.offerDetails; - } - - /** - * Set the offerDetails property: Offer details for the marketplace that is selected by the user. - * - * @param offerDetails the offerDetails value to set. - * @return the MarketplaceDetails object itself. - */ - public MarketplaceDetails withOfferDetails(OfferDetails offerDetails) { - this.offerDetails = offerDetails; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("offerDetails", this.offerDetails); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MarketplaceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MarketplaceDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MarketplaceDetails. - */ - public static MarketplaceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MarketplaceDetails deserializedMarketplaceDetails = new MarketplaceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("offerDetails".equals(fieldName)) { - deserializedMarketplaceDetails.offerDetails = OfferDetails.fromJson(reader); - } else if ("subscriptionId".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionId = reader.getString(); - } else if ("subscriptionStatus".equals(fieldName)) { - deserializedMarketplaceDetails.subscriptionStatus - = MarketplaceSubscriptionStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMarketplaceDetails; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceSubscriptionStatus.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceSubscriptionStatus.java deleted file mode 100644 index e3b560d01c27..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/MarketplaceSubscriptionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Marketplace subscription status of a resource. - */ -public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** - * Purchased but not yet activated. - */ - public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); - - /** - * Marketplace subscription is activated. - */ - public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); - - /** - * This state indicates that a customer's payment for the Marketplace service was not received. - */ - public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); - - /** - * Customer has cancelled the subscription. - */ - public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); - - /** - * Creates a new instance of MarketplaceSubscriptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MarketplaceSubscriptionStatus() { - } - - /** - * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding MarketplaceSubscriptionStatus. - */ - public static MarketplaceSubscriptionStatus fromString(String name) { - return fromString(name, MarketplaceSubscriptionStatus.class); - } - - /** - * Gets known MarketplaceSubscriptionStatus values. - * - * @return known MarketplaceSubscriptionStatus values. - */ - public static Collection values() { - return values(MarketplaceSubscriptionStatus.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OfferDetails.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OfferDetails.java deleted file mode 100644 index c0b536425f4a..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OfferDetails.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Offer details for the marketplace that is selected by the user. - */ -@Fluent -public final class OfferDetails implements JsonSerializable { - /* - * Publisher Id for the marketplace offer - */ - private String publisherId; - - /* - * Offer Id for the marketplace offer - */ - private String offerId; - - /* - * Plan Id for the marketplace offer - */ - private String planId; - - /* - * Plan Name for the marketplace offer - */ - private String planName; - - /* - * Plan Display Name for the marketplace offer - */ - private String termUnit; - - /* - * Plan Display Name for the marketplace offer - */ - private String termId; - - /** - * Creates an instance of OfferDetails class. - */ - public OfferDetails() { - } - - /** - * Get the publisherId property: Publisher Id for the marketplace offer. - * - * @return the publisherId value. - */ - public String publisherId() { - return this.publisherId; - } - - /** - * Set the publisherId property: Publisher Id for the marketplace offer. - * - * @param publisherId the publisherId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPublisherId(String publisherId) { - this.publisherId = publisherId; - return this; - } - - /** - * Get the offerId property: Offer Id for the marketplace offer. - * - * @return the offerId value. - */ - public String offerId() { - return this.offerId; - } - - /** - * Set the offerId property: Offer Id for the marketplace offer. - * - * @param offerId the offerId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withOfferId(String offerId) { - this.offerId = offerId; - return this; - } - - /** - * Get the planId property: Plan Id for the marketplace offer. - * - * @return the planId value. - */ - public String planId() { - return this.planId; - } - - /** - * Set the planId property: Plan Id for the marketplace offer. - * - * @param planId the planId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanId(String planId) { - this.planId = planId; - return this; - } - - /** - * Get the planName property: Plan Name for the marketplace offer. - * - * @return the planName value. - */ - public String planName() { - return this.planName; - } - - /** - * Set the planName property: Plan Name for the marketplace offer. - * - * @param planName the planName value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withPlanName(String planName) { - this.planName = planName; - return this; - } - - /** - * Get the termUnit property: Plan Display Name for the marketplace offer. - * - * @return the termUnit value. - */ - public String termUnit() { - return this.termUnit; - } - - /** - * Set the termUnit property: Plan Display Name for the marketplace offer. - * - * @param termUnit the termUnit value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermUnit(String termUnit) { - this.termUnit = termUnit; - return this; - } - - /** - * Get the termId property: Plan Display Name for the marketplace offer. - * - * @return the termId value. - */ - public String termId() { - return this.termId; - } - - /** - * Set the termId property: Plan Display Name for the marketplace offer. - * - * @param termId the termId value to set. - * @return the OfferDetails object itself. - */ - public OfferDetails withTermId(String termId) { - this.termId = termId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("publisherId", this.publisherId); - jsonWriter.writeStringField("offerId", this.offerId); - jsonWriter.writeStringField("planId", this.planId); - jsonWriter.writeStringField("planName", this.planName); - jsonWriter.writeStringField("termUnit", this.termUnit); - jsonWriter.writeStringField("termId", this.termId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OfferDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OfferDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OfferDetails. - */ - public static OfferDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OfferDetails deserializedOfferDetails = new OfferDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("publisherId".equals(fieldName)) { - deserializedOfferDetails.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { - deserializedOfferDetails.offerId = reader.getString(); - } else if ("planId".equals(fieldName)) { - deserializedOfferDetails.planId = reader.getString(); - } else if ("planName".equals(fieldName)) { - deserializedOfferDetails.planName = reader.getString(); - } else if ("termUnit".equals(fieldName)) { - deserializedOfferDetails.termUnit = reader.getString(); - } else if ("termId".equals(fieldName)) { - deserializedOfferDetails.termId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOfferDetails; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operation.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operation.java deleted file mode 100644 index 5c3692674338..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for Azure Resource Manager/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.weightsandbiases.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OperationDisplay.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OperationDisplay.java deleted file mode 100644 index cd99fb70481e..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for an operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - private OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operations.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operations.java deleted file mode 100644 index 0bc22d132f78..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * List the operations for the provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Origin.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Origin.java deleted file mode 100644 index 22fc4c803c2f..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Indicates the operation is initiated by a user. - */ - public static final Origin USER = fromString("user"); - - /** - * Indicates the operation is initiated by a system. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Indicates the operation is initiated by a user or system. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/PartnerProperties.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/PartnerProperties.java deleted file mode 100644 index 8f021822c884..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/PartnerProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Partner's specific Properties. - */ -@Fluent -public final class PartnerProperties implements JsonSerializable { - /* - * The region of the instance - */ - private Region region; - - /* - * The subdomain of the instance - */ - private String subdomain; - - /** - * Creates an instance of PartnerProperties class. - */ - public PartnerProperties() { - } - - /** - * Get the region property: The region of the instance. - * - * @return the region value. - */ - public Region region() { - return this.region; - } - - /** - * Set the region property: The region of the instance. - * - * @param region the region value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withRegion(Region region) { - this.region = region; - return this; - } - - /** - * Get the subdomain property: The subdomain of the instance. - * - * @return the subdomain value. - */ - public String subdomain() { - return this.subdomain; - } - - /** - * Set the subdomain property: The subdomain of the instance. - * - * @param subdomain the subdomain value to set. - * @return the PartnerProperties object itself. - */ - public PartnerProperties withSubdomain(String subdomain) { - this.subdomain = subdomain; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("region", this.region == null ? null : this.region.toString()); - jsonWriter.writeStringField("subdomain", this.subdomain); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PartnerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PartnerProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PartnerProperties. - */ - public static PartnerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PartnerProperties deserializedPartnerProperties = new PartnerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("region".equals(fieldName)) { - deserializedPartnerProperties.region = Region.fromString(reader.getString()); - } else if ("subdomain".equals(fieldName)) { - deserializedPartnerProperties.subdomain = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPartnerProperties; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Region.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Region.java deleted file mode 100644 index ff881c87ff58..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/Region.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 com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The available regions. - */ -public final class Region extends ExpandableStringEnum { - /** - * Region: East US. - */ - public static final Region EASTUS = fromString("eastus"); - - /** - * Region: Central US. - */ - public static final Region CENTRALUS = fromString("centralus"); - - /** - * Region: West US. - */ - public static final Region WESTUS = fromString("westus"); - - /** - * Region: West Europe. - */ - public static final Region WESTEUROPE = fromString("westeurope"); - - /** - * Region: Japan East. - */ - public static final Region JAPANEAST = fromString("japaneast"); - - /** - * Region: Korea Central. - */ - public static final Region KOREACENTRAL = fromString("koreacentral"); - - /** - * Creates a new instance of Region value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Region() { - } - - /** - * Creates or finds a Region from its string representation. - * - * @param name a name to look for. - * @return the corresponding Region. - */ - public static Region fromString(String name) { - return fromString(name, Region.class); - } - - /** - * Gets known Region values. - * - * @return known Region values. - */ - public static Collection values() { - return values(Region.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ResourceProvisioningState.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ResourceProvisioningState.java deleted file mode 100644 index 3b6766050b12..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/ResourceProvisioningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state of a resource type. - */ -public final class ResourceProvisioningState extends ExpandableStringEnum { - /** - * Resource has been created. - */ - public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Resource creation failed. - */ - public static final ResourceProvisioningState FAILED = fromString("Failed"); - - /** - * Resource creation was canceled. - */ - public static final ResourceProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ResourceProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceProvisioningState() { - } - - /** - * Creates or finds a ResourceProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceProvisioningState. - */ - public static ResourceProvisioningState fromString(String name) { - return fromString(name, ResourceProvisioningState.class); - } - - /** - * Gets known ResourceProvisioningState values. - * - * @return known ResourceProvisioningState values. - */ - public static Collection values() { - return values(ResourceProvisioningState.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnPropertiesV2.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnPropertiesV2.java deleted file mode 100644 index 5b1b1c729d9e..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnPropertiesV2.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties specific to Single Sign On Resource. - */ -@Fluent -public final class SingleSignOnPropertiesV2 implements JsonSerializable { - /* - * Type of Single Sign-On mechanism being used - */ - private SingleSignOnType type; - - /* - * State of the Single Sign On for the resource - */ - private SingleSignOnStates state; - - /* - * AAD enterprise application Id used to setup SSO - */ - private String enterpriseAppId; - - /* - * URL for SSO to be used by the partner to redirect the user to their system - */ - private String url; - - /* - * List of AAD domains fetched from Microsoft Graph for user. - */ - private List aadDomains; - - /** - * Creates an instance of SingleSignOnPropertiesV2 class. - */ - public SingleSignOnPropertiesV2() { - } - - /** - * Get the type property: Type of Single Sign-On mechanism being used. - * - * @return the type value. - */ - public SingleSignOnType type() { - return this.type; - } - - /** - * Set the type property: Type of Single Sign-On mechanism being used. - * - * @param type the type value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withType(SingleSignOnType type) { - this.type = type; - return this; - } - - /** - * Get the state property: State of the Single Sign On for the resource. - * - * @return the state value. - */ - public SingleSignOnStates state() { - return this.state; - } - - /** - * Set the state property: State of the Single Sign On for the resource. - * - * @param state the state value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withState(SingleSignOnStates state) { - this.state = state; - return this; - } - - /** - * Get the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @return the enterpriseAppId value. - */ - public String enterpriseAppId() { - return this.enterpriseAppId; - } - - /** - * Set the enterpriseAppId property: AAD enterprise application Id used to setup SSO. - * - * @param enterpriseAppId the enterpriseAppId value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withEnterpriseAppId(String enterpriseAppId) { - this.enterpriseAppId = enterpriseAppId; - return this; - } - - /** - * Get the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL for SSO to be used by the partner to redirect the user to their system. - * - * @param url the url value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @return the aadDomains value. - */ - public List aadDomains() { - return this.aadDomains; - } - - /** - * Set the aadDomains property: List of AAD domains fetched from Microsoft Graph for user. - * - * @param aadDomains the aadDomains value to set. - * @return the SingleSignOnPropertiesV2 object itself. - */ - public SingleSignOnPropertiesV2 withAadDomains(List aadDomains) { - this.aadDomains = aadDomains; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SingleSignOnPropertiesV2 from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SingleSignOnPropertiesV2 if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SingleSignOnPropertiesV2. - */ - public static SingleSignOnPropertiesV2 fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SingleSignOnPropertiesV2 deserializedSingleSignOnPropertiesV2 = new SingleSignOnPropertiesV2(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.type = SingleSignOnType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.state = SingleSignOnStates.fromString(reader.getString()); - } else if ("enterpriseAppId".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.enterpriseAppId = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedSingleSignOnPropertiesV2.url = reader.getString(); - } else if ("aadDomains".equals(fieldName)) { - List aadDomains = reader.readArray(reader1 -> reader1.getString()); - deserializedSingleSignOnPropertiesV2.aadDomains = aadDomains; - } else { - reader.skipChildren(); - } - } - - return deserializedSingleSignOnPropertiesV2; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnStates.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnStates.java deleted file mode 100644 index c0571f5abd6c..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnStates.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Various states of the SSO resource. - */ -public final class SingleSignOnStates extends ExpandableStringEnum { - /** - * Initial state of the SSO resource. - */ - public static final SingleSignOnStates INITIAL = fromString("Initial"); - - /** - * State of the SSO resource when it is enabled. - */ - public static final SingleSignOnStates ENABLE = fromString("Enable"); - - /** - * State of the SSO resource when it is disabled. - */ - public static final SingleSignOnStates DISABLE = fromString("Disable"); - - /** - * Creates a new instance of SingleSignOnStates value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnStates() { - } - - /** - * Creates or finds a SingleSignOnStates from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnStates. - */ - public static SingleSignOnStates fromString(String name) { - return fromString(name, SingleSignOnStates.class); - } - - /** - * Gets known SingleSignOnStates values. - * - * @return known SingleSignOnStates values. - */ - public static Collection values() { - return values(SingleSignOnStates.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnType.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnType.java deleted file mode 100644 index 2436dae62889..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/SingleSignOnType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines the type of Single Sign-On (SSO) mechanism being used. - */ -public final class SingleSignOnType extends ExpandableStringEnum { - /** - * Security Assertion Markup Language (SAML) based Single Sign-On. - */ - public static final SingleSignOnType SAML = fromString("Saml"); - - /** - * OpenID Connect based Single Sign-On. - */ - public static final SingleSignOnType OPEN_ID = fromString("OpenId"); - - /** - * Creates a new instance of SingleSignOnType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SingleSignOnType() { - } - - /** - * Creates or finds a SingleSignOnType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SingleSignOnType. - */ - public static SingleSignOnType fromString(String name) { - return fromString(name, SingleSignOnType.class); - } - - /** - * Gets known SingleSignOnType values. - * - * @return known SingleSignOnType values. - */ - public static Collection values() { - return values(SingleSignOnType.class); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserAssignedIdentity.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserAssignedIdentity.java deleted file mode 100644 index 58fb05e293a1..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserAssignedIdentity.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User assigned identity properties. - */ -@Immutable -public final class UserAssignedIdentity implements JsonSerializable { - /* - * The principal ID of the assigned identity. - */ - private String principalId; - - /* - * The client ID of the assigned identity. - */ - private String clientId; - - /** - * Creates an instance of UserAssignedIdentity class. - */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserAssignedIdentity. - */ - public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAssignedIdentity; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserDetails.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserDetails.java deleted file mode 100644 index 4ec87007be9c..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/UserDetails.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.weightsandbiases.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User details for an organization. - */ -@Fluent -public final class UserDetails implements JsonSerializable { - /* - * First name of the user - */ - private String firstName; - - /* - * Last name of the user - */ - private String lastName; - - /* - * Email address of the user - */ - private String emailAddress; - - /* - * User's principal name - */ - private String upn; - - /* - * User's phone number - */ - private String phoneNumber; - - /** - * Creates an instance of UserDetails class. - */ - public UserDetails() { - } - - /** - * Get the firstName property: First name of the user. - * - * @return the firstName value. - */ - public String firstName() { - return this.firstName; - } - - /** - * Set the firstName property: First name of the user. - * - * @param firstName the firstName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withFirstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get the lastName property: Last name of the user. - * - * @return the lastName value. - */ - public String lastName() { - return this.lastName; - } - - /** - * Set the lastName property: Last name of the user. - * - * @param lastName the lastName value to set. - * @return the UserDetails object itself. - */ - public UserDetails withLastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get the emailAddress property: Email address of the user. - * - * @return the emailAddress value. - */ - public String emailAddress() { - return this.emailAddress; - } - - /** - * Set the emailAddress property: Email address of the user. - * - * @param emailAddress the emailAddress value to set. - * @return the UserDetails object itself. - */ - public UserDetails withEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Get the upn property: User's principal name. - * - * @return the upn value. - */ - public String upn() { - return this.upn; - } - - /** - * Set the upn property: User's principal name. - * - * @param upn the upn value to set. - * @return the UserDetails object itself. - */ - public UserDetails withUpn(String upn) { - this.upn = upn; - return this; - } - - /** - * Get the phoneNumber property: User's phone number. - * - * @return the phoneNumber value. - */ - public String phoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: User's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the UserDetails object itself. - */ - public UserDetails withPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("firstName", this.firstName); - jsonWriter.writeStringField("lastName", this.lastName); - jsonWriter.writeStringField("emailAddress", this.emailAddress); - jsonWriter.writeStringField("upn", this.upn); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UserDetails. - */ - public static UserDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserDetails deserializedUserDetails = new UserDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("firstName".equals(fieldName)) { - deserializedUserDetails.firstName = reader.getString(); - } else if ("lastName".equals(fieldName)) { - deserializedUserDetails.lastName = reader.getString(); - } else if ("emailAddress".equals(fieldName)) { - deserializedUserDetails.emailAddress = reader.getString(); - } else if ("upn".equals(fieldName)) { - deserializedUserDetails.upn = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedUserDetails.phoneNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserDetails; - }); - } -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/package-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/package-info.java deleted file mode 100644 index c4bdea206b34..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/models/package-info.java +++ /dev/null @@ -1,8 +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 data models for WeightsAndBiases. - */ -package com.azure.resourcemanager.weightsandbiases.models; diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/package-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/package-info.java deleted file mode 100644 index fbe90914457b..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/com/azure/resourcemanager/weightsandbiases/package-info.java +++ /dev/null @@ -1,8 +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 WeightsAndBiases. - */ -package com.azure.resourcemanager.weightsandbiases; diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/module-info.java b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/module-info.java deleted file mode 100644 index dcf55b99360c..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -module com.azure.resourcemanager.weightsandbiases { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.weightsandbiases; - exports com.azure.resourcemanager.weightsandbiases.fluent; - exports com.azure.resourcemanager.weightsandbiases.fluent.models; - exports com.azure.resourcemanager.weightsandbiases.models; - - opens com.azure.resourcemanager.weightsandbiases.fluent.models to com.azure.core; - opens com.azure.resourcemanager.weightsandbiases.models to com.azure.core; - opens com.azure.resourcemanager.weightsandbiases.implementation.models to com.azure.core; -} diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/proxy-config.json b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/proxy-config.json deleted file mode 100644 index 91684e89c8ac..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.weightsandbiases.implementation.InstancesClientImpl$InstancesService"],["com.azure.resourcemanager.weightsandbiases.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/reflect-config.json b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-weightsandbiases/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/azure-resourcemanager-weightsandbiases.properties b/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/azure-resourcemanager-weightsandbiases.properties deleted file mode 100644 index defbd48204e4..000000000000 --- a/sdk/weightsandbiases/azure-resourcemanager-weightsandbiases/src/main/resources/azure-resourcemanager-weightsandbiases.properties +++ /dev/null @@ -1 +0,0 @@ -version=${project.version}