From 27e9b3bea1df3bf7fffdea7111185ccdc669dbcc Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 19 Apr 2024 14:18:59 +0800 Subject: [PATCH] mgmt, standbypool from tsp (#39706) --- eng/emitter-package-lock.json | 140 ++- eng/emitter-package.json | 2 + .../CHANGELOG.md | 3 +- .../SAMPLE.md | 65 +- .../standbypool/StandbyPoolManager.java | 46 +- .../standbypool/fluent/OperationsClient.java | 2 +- .../StandbyContainerGroupPoolsClient.java | 148 ++-- ...MgmtClient.java => StandbyPoolClient.java} | 38 +- .../StandbyVirtualMachinePoolsClient.java | 148 ++-- .../fluent/StandbyVirtualMachinesClient.java | 54 +- .../fluent/models/OperationInner.java | 27 +- ...tandbyContainerGroupPoolResourceInner.java | 2 +- ...tandbyVirtualMachinePoolResourceInner.java | 2 +- .../StandbyVirtualMachineResourceInner.java | 19 +- .../fluent/models/package-info.java | 5 +- .../standbypool/fluent/package-info.java | 5 +- .../implementation/OperationImpl.java | 2 +- .../implementation/OperationsClientImpl.java | 22 +- .../implementation/OperationsImpl.java | 2 +- .../implementation/ResourceManagerUtils.java | 2 +- ...StandbyContainerGroupPoolResourceImpl.java | 2 +- .../StandbyContainerGroupPoolsClientImpl.java | 799 +++++++++--------- .../StandbyContainerGroupPoolsImpl.java | 56 +- ...der.java => StandbyPoolClientBuilder.java} | 63 +- ...ntImpl.java => StandbyPoolClientImpl.java} | 90 +- ...StandbyVirtualMachinePoolResourceImpl.java | 2 +- .../StandbyVirtualMachinePoolsClientImpl.java | 799 +++++++++--------- .../StandbyVirtualMachinePoolsImpl.java | 56 +- .../StandbyVirtualMachineResourceImpl.java | 2 +- .../StandbyVirtualMachinesClientImpl.java | 268 +++--- .../StandbyVirtualMachinesImpl.java | 34 +- .../models/PagedOperation.java} | 30 +- ...yContainerGroupPoolResourceListResult.java | 32 +- ...yVirtualMachinePoolResourceListResult.java | 32 +- ...andbyVirtualMachineResourceListResult.java | 32 +- .../implementation/package-info.java | 5 +- .../standbypool/models/ActionType.java | 2 +- .../models/ContainerGroupProfile.java | 2 +- .../models/ContainerGroupProfileUpdate.java | 80 -- .../models/ContainerGroupProperties.java | 2 +- .../ContainerGroupPropertiesUpdate.java | 87 -- .../standbypool/models/Operation.java | 4 +- .../standbypool/models/OperationDisplay.java | 14 +- .../standbypool/models/Operations.java | 2 +- .../standbypool/models/Origin.java | 2 +- .../standbypool/models/ProvisioningState.java | 2 +- .../standbypool/models/RefillPolicy.java | 2 +- ...byContainerGroupPoolElasticityProfile.java | 2 +- ...ainerGroupPoolElasticityProfileUpdate.java | 80 -- .../StandbyContainerGroupPoolResource.java | 6 +- ...yContainerGroupPoolResourceProperties.java | 2 +- ...andbyContainerGroupPoolResourceUpdate.java | 8 +- ...inerGroupPoolResourceUpdateProperties.java | 14 +- .../models/StandbyContainerGroupPools.java | 76 +- ...byVirtualMachinePoolElasticityProfile.java | 2 +- ...ualMachinePoolElasticityProfileUpdate.java | 56 -- .../StandbyVirtualMachinePoolResource.java | 6 +- ...yVirtualMachinePoolResourceProperties.java | 2 +- ...andbyVirtualMachinePoolResourceUpdate.java | 8 +- ...alMachinePoolResourceUpdateProperties.java | 8 +- .../models/StandbyVirtualMachinePools.java | 76 +- .../models/StandbyVirtualMachineResource.java | 2 +- ...andbyVirtualMachineResourceProperties.java | 19 +- .../models/StandbyVirtualMachines.java | 46 +- .../standbypool/models/Subnet.java | 2 +- .../models/VirtualMachineState.java | 2 +- .../standbypool/models/package-info.java | 5 +- .../standbypool/package-info.java | 5 +- .../src/main/java/module-info.java | 3 +- .../proxy-config.json | 2 +- .../reflect-config.json | 62 +- .../generated/OperationsListSamples.java | 5 +- ...tainerGroupPoolsCreateOrUpdateSamples.java | 5 +- ...andbyContainerGroupPoolsDeleteSamples.java | 5 +- ...erGroupPoolsGetByResourceGroupSamples.java | 5 +- ...rGroupPoolsListByResourceGroupSamples.java | 5 +- ...StandbyContainerGroupPoolsListSamples.java | 5 +- ...andbyContainerGroupPoolsUpdateSamples.java | 20 +- ...tualMachinePoolsCreateOrUpdateSamples.java | 5 +- ...andbyVirtualMachinePoolsDeleteSamples.java | 5 +- ...MachinePoolsGetByResourceGroupSamples.java | 5 +- ...achinePoolsListByResourceGroupSamples.java | 5 +- ...StandbyVirtualMachinePoolsListSamples.java | 5 +- ...andbyVirtualMachinePoolsUpdateSamples.java | 10 +- .../StandbyVirtualMachinesGetSamples.java | 5 +- ...ndbyVirtualMachinePoolResourceSamples.java | 5 +- .../generated/ContainerGroupProfileTests.java | 15 +- .../ContainerGroupProfileUpdateTests.java | 29 - .../ContainerGroupPropertiesTests.java | 22 +- .../ContainerGroupPropertiesUpdateTests.java | 37 - .../generated/OperationDisplayTests.java | 15 +- .../generated/OperationInnerTests.java | 18 +- .../generated/OperationListResultTests.java | 23 - .../generated/OperationsListMockTests.java | 11 +- .../generated/PagedOperationTests.java | 25 + ...tainerGroupPoolElasticityProfileTests.java | 10 +- ...GroupPoolElasticityProfileUpdateTests.java | 31 - ...yContainerGroupPoolResourceInnerTests.java | 54 +- ...ainerGroupPoolResourceListResultTests.java | 71 +- ...ainerGroupPoolResourcePropertiesTests.java | 26 +- ...roupPoolResourceUpdatePropertiesTests.java | 37 +- ...ContainerGroupPoolResourceUpdateTests.java | 42 +- ...inerGroupPoolsCreateOrUpdateMockTests.java | 31 +- ...tByResourceGroupWithResponseMockTests.java | 18 +- ...roupPoolsListByResourceGroupMockTests.java | 18 +- ...andbyContainerGroupPoolsListMockTests.java | 16 +- ...tualMachinePoolElasticityProfileTests.java | 10 +- ...chinePoolElasticityProfileUpdateTests.java | 27 - ...yVirtualMachinePoolResourceInnerTests.java | 28 +- ...ualMachinePoolResourceListResultTests.java | 74 +- ...ualMachinePoolResourcePropertiesTests.java | 22 +- ...hinePoolResourceUpdatePropertiesTests.java | 24 +- ...VirtualMachinePoolResourceUpdateTests.java | 24 +- ...alMachinePoolsCreateOrUpdateMockTests.java | 24 +- ...tByResourceGroupWithResponseMockTests.java | 14 +- ...hinePoolsListByResourceGroupMockTests.java | 19 +- ...andbyVirtualMachinePoolsListMockTests.java | 15 +- ...andbyVirtualMachineResourceInnerTests.java | 15 +- ...VirtualMachineResourceListResultTests.java | 24 +- ...VirtualMachineResourcePropertiesTests.java | 14 +- ...rtualMachinesGetWithResponseMockTests.java | 8 +- ...byVirtualMachinePoolResourceMockTests.java | 9 +- .../standbypool/generated/SubnetTests.java | 10 +- .../tsp-location.yaml | 3 + 124 files changed, 1965 insertions(+), 2772 deletions(-) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/{StandbyPoolMgmtClient.java => StandbyPoolClient.java} (85%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/{StandbyPoolMgmtClientBuilder.java => StandbyPoolClientBuilder.java} (62%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/{StandbyPoolMgmtClientImpl.java => StandbyPoolClientImpl.java} (91%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/{models/OperationListResult.java => implementation/models/PagedOperation.java} (54%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/{ => implementation}/models/StandbyContainerGroupPoolResourceListResult.java (65%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/{ => implementation}/models/StandbyVirtualMachinePoolResourceListResult.java (65%) rename sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/{ => implementation}/models/StandbyVirtualMachineResourceListResult.java (65%) delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfileUpdate.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupPropertiesUpdate.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfileUpdate.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfileUpdate.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileUpdateTests.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesUpdateTests.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationListResultTests.java create mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/PagedOperationTests.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileUpdateTests.java delete mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileUpdateTests.java create mode 100644 sdk/standbypool/azure-resourcemanager-standbypool/tsp-location.yaml diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 49a79e59246ca..0ff15eaa5ac3a 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -1,5 +1,5 @@ { - "name": "emitter-consumer", + "name": "TempTypeSpecFiles", "lockfileVersion": 3, "requires": true, "packages": { @@ -8,7 +8,9 @@ "@azure-tools/typespec-java": "0.15.12" }, "devDependencies": { + "@azure-tools/typespec-autorest": "0.41.1", "@azure-tools/typespec-azure-core": "0.41.0", + "@azure-tools/typespec-azure-resource-manager": "0.41.0", "@azure-tools/typespec-client-generator-core": "0.41.3", "@typespec/compiler": "0.55.0", "@typespec/http": "0.55.0", @@ -62,11 +64,28 @@ "node": ">=10.12.0" } }, + "node_modules/@azure-tools/typespec-autorest": { + "version": "0.41.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.41.1.tgz", + "integrity": "sha512-m2Rq8aFMvICfkG/+B1kGSDepCUDHhiQ93y1/IcE+XU1+IU2iuNoSgUd0lHgksP5Aqnvs3Wm9JDmA9nMNjOM1Ww==", + "dev": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": "~0.41.0", + "@azure-tools/typespec-client-generator-core": "~0.41.1", + "@typespec/compiler": "~0.55.0", + "@typespec/http": "~0.55.0", + "@typespec/openapi": "~0.55.0", + "@typespec/rest": "~0.55.0", + "@typespec/versioning": "~0.55.0" + } + }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.41.0", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.41.0.tgz", "integrity": "sha512-bnVrLxyjhMfKv75POL3m+lWjyqpLtWYEM9t2mrhFECHfW3+gWzTKIg98oNMKLXmev/sCc9QhbkKLs72jqxNL1Q==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -76,11 +95,28 @@ "@typespec/rest": "~0.55.0" } }, + "node_modules/@azure-tools/typespec-azure-resource-manager": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.41.0.tgz", + "integrity": "sha512-KPeQQle+hd508bkRjWHDsUXhoLjXVJg0DQyPM9wIxf+3cE0yH0aUxWPU6aj+aTio84226ExO2Qh8IadqgoQ5qg==", + "dev": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@azure-tools/typespec-autorest": "~0.41.0", + "@azure-tools/typespec-azure-core": "~0.41.0", + "@typespec/compiler": "~0.55.0", + "@typespec/http": "~0.55.0", + "@typespec/openapi": "~0.55.0", + "@typespec/rest": "~0.55.0", + "@typespec/versioning": "~0.55.0" + } + }, "node_modules/@azure-tools/typespec-client-generator-core": { "version": "0.41.3", "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.41.3.tgz", "integrity": "sha512-f5H6gz7GCi0kUd7/8LoyJaMq68E0fNldZKQPxUIxqwlQHTFUI/7K37kCkOMNVk8gqmLgLKCShBLhE7zONKe8MA==", - "dev": true, "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -122,7 +158,6 @@ "version": "7.24.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, "dependencies": { "@babel/highlight": "^7.24.2", "picocolors": "^1.0.0" @@ -135,7 +170,6 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -144,7 +178,6 @@ "version": "7.24.2", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", - "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -159,7 +192,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -172,7 +204,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -181,7 +212,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -194,7 +224,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, "engines": { "node": ">=18" }, @@ -206,7 +235,6 @@ "version": "0.55.0", "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.55.0.tgz", "integrity": "sha512-JxBkP7fTc3yzDYZ+Ms+ZHYlL2Ym22oloLDl6107SGaShNJBdQlabgE0aV8WvYRRBYt8g0RNb+sDLEcjvahj6Gw==", - "dev": true, "dependencies": { "@babel/code-frame": "~7.24.2", "ajv": "~8.12.0", @@ -234,7 +262,6 @@ "version": "0.55.0", "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.55.0.tgz", "integrity": "sha512-r30RWzMTJgbyRpdtZxezlvXI/nkAvgilX1OM+s3A039lGLA+JRukgvKIZ3LaNr3lNXHiqeWQDrIZNhqBnpW1zw==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -246,7 +273,6 @@ "version": "0.55.0", "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.55.0.tgz", "integrity": "sha512-5T4VuJSOGfMFSs+1dOl3U3BC6VhKAxSTBrwcQDIEEygnqCSbj/tMFDhNfzKYKARRDotgM8ESOrZU6XH5srVR7A==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -259,7 +285,6 @@ "version": "0.55.0", "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.55.0.tgz", "integrity": "sha512-RPZnx5D4xdTNiP0l++9IA8mUhnegPxetbdJ5RaG/QX2fTyF/gQ7t6AHIgdq8DfYVXqukQI/iGytJ135ObftbtQ==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -272,7 +297,6 @@ "version": "0.55.0", "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.55.0.tgz", "integrity": "sha512-89LTgkA3IBLnaaM4D4qfsrcEU0g3gasE1MmkrQ2HG21fYX88zKbmR1cKWeUxQx9MIXFOH4cPC9KhA/uLknRVMQ==", - "dev": true, "engines": { "node": ">=18.0.0" }, @@ -284,7 +308,6 @@ "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -300,7 +323,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -309,7 +331,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -326,7 +347,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -338,7 +358,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -351,14 +370,12 @@ "node_modules/change-case": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "dev": true + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==" }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -372,7 +389,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -380,20 +396,17 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, "engines": { "node": ">=6" } @@ -402,7 +415,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -410,14 +422,12 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -433,7 +443,6 @@ "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -442,7 +451,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -454,7 +462,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -463,7 +470,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -475,7 +481,6 @@ "version": "14.0.1", "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", - "dev": true, "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", "fast-glob": "^3.3.2", @@ -500,7 +505,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } @@ -509,7 +513,6 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, "engines": { "node": ">= 4" } @@ -518,7 +521,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -527,7 +529,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -536,7 +537,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -548,7 +548,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -556,8 +555,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -573,14 +571,12 @@ "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, "engines": { "node": ">=6" } @@ -605,7 +601,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -614,7 +609,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -627,7 +621,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", - "dev": true, "bin": { "mustache": "bin/mustache" } @@ -636,7 +629,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", - "dev": true, "engines": { "node": ">=12" }, @@ -647,14 +639,12 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -666,7 +656,6 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, "engines": { "node": ">=4" } @@ -675,7 +664,6 @@ "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -690,7 +678,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -715,7 +702,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } @@ -724,7 +710,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -744,7 +729,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -753,7 +737,6 @@ "version": "2.0.2", "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==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -770,7 +753,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -780,7 +762,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -816,14 +797,12 @@ "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "node_modules/slash": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, "engines": { "node": ">=14.16" }, @@ -835,7 +814,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -849,7 +827,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -861,7 +838,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -873,7 +849,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -885,7 +860,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "dev": true, "engines": { "node": ">=18" }, @@ -897,7 +871,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -906,7 +879,6 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", - "dev": true, "engines": { "node": ">=14.0.0" } @@ -915,7 +887,6 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", - "dev": true, "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, @@ -927,7 +898,6 @@ "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", - "dev": true, "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" @@ -936,20 +906,17 @@ "node_modules/vscode-languageserver-textdocument": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "dev": true + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==" }, "node_modules/vscode-languageserver-types": { "version": "3.17.5", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "dev": true + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -966,7 +933,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -981,7 +947,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -992,14 +957,12 @@ "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -1013,7 +976,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", - "dev": true, "bin": { "yaml": "bin.mjs" }, @@ -1025,7 +987,6 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -1043,7 +1004,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } diff --git a/eng/emitter-package.json b/eng/emitter-package.json index b66355a26fb99..7ff4f92f36dea 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -9,6 +9,8 @@ "@typespec/compiler": "0.55.0", "@typespec/versioning": "0.55.0", "@azure-tools/typespec-azure-core": "0.41.0", + "@azure-tools/typespec-azure-resource-manager": "0.41.0", + "@azure-tools/typespec-autorest": "0.41.1", "@typespec/http": "0.55.0", "@azure-tools/typespec-client-generator-core": "0.41.3" } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/CHANGELOG.md b/sdk/standbypool/azure-resourcemanager-standbypool/CHANGELOG.md index cae4a00e2d6b9..2e27d7b1806f2 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/CHANGELOG.md +++ b/sdk/standbypool/azure-resourcemanager-standbypool/CHANGELOG.md @@ -1,5 +1,6 @@ # Release History -## 1.0.0-beta.1 (2024-04-12) +## 1.0.0-beta.1 (2024-04-25) - Azure Resource Manager Standby Pool client library for Java. This package contains Microsoft Azure SDK for Standby Pool Management SDK. Package tag package-preview-2023-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md b/sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md index 37328218e2abd..b854927e1b747 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md +++ b/sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md @@ -34,9 +34,6 @@ * Samples for Operations List. */ public final class OperationsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/Operations_List.json - */ /** * Sample code: Operations_List. * @@ -65,9 +62,6 @@ import java.util.Map; * Samples for StandbyContainerGroupPools CreateOrUpdate. */ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_CreateOrUpdate.json - */ /** * Sample code: StandbyContainerGroupPools_CreateOrUpdate. * @@ -113,9 +107,6 @@ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples { * Samples for StandbyContainerGroupPools Delete. */ public final class StandbyContainerGroupPoolsDeleteSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Delete.json - */ /** * Sample code: StandbyContainerGroupPools_Delete. * @@ -135,9 +126,6 @@ public final class StandbyContainerGroupPoolsDeleteSamples { * Samples for StandbyContainerGroupPools GetByResourceGroup. */ public final class StandbyContainerGroupPoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Get.json - */ /** * Sample code: StandbyContainerGroupPools_Get. * @@ -157,9 +145,6 @@ public final class StandbyContainerGroupPoolsGetByResourceGroupSamples { * Samples for StandbyContainerGroupPools List. */ public final class StandbyContainerGroupPoolsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListBySubscription.json - */ /** * Sample code: StandbyContainerGroupPools_ListBySubscription. * @@ -179,9 +164,6 @@ public final class StandbyContainerGroupPoolsListSamples { * Samples for StandbyContainerGroupPools ListByResourceGroup. */ public final class StandbyContainerGroupPoolsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListByResourceGroup.json - */ /** * Sample code: StandbyContainerGroupPools_ListByResourceGroup. * @@ -197,10 +179,10 @@ public final class StandbyContainerGroupPoolsListByResourceGroupSamples { ### StandbyContainerGroupPools_Update ```java -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties; import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResource; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.Subnet; @@ -212,9 +194,6 @@ import java.util.Map; * Samples for StandbyContainerGroupPools Update. */ public final class StandbyContainerGroupPoolsUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Update.json - */ /** * Sample code: StandbyContainerGroupPools_Update. * @@ -228,11 +207,10 @@ public final class StandbyContainerGroupPoolsUpdateSamples { resource.update() .withTags(mapOf()) .withProperties(new StandbyContainerGroupPoolResourceUpdateProperties() - .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(1743L) - .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupPropertiesUpdate() - .withContainerGroupProfile(new ContainerGroupProfileUpdate().withId( + .withElasticityProfile(new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(1743L) + .withRefillPolicy(RefillPolicy.ALWAYS)) + .withContainerGroupProperties(new ContainerGroupProperties() + .withContainerGroupProfile(new ContainerGroupProfile().withId( "/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile") .withRevision(2L)) .withSubnetIds(Arrays.asList(new Subnet().withId( @@ -267,9 +245,6 @@ import java.util.Map; * Samples for StandbyVirtualMachinePools CreateOrUpdate. */ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_CreateOrUpdate.json - */ /** * Sample code: StandbyVirtualMachinePools_CreateOrUpdate. * @@ -311,9 +286,6 @@ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples { * Samples for StandbyVirtualMachinePools Delete. */ public final class StandbyVirtualMachinePoolsDeleteSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Delete.json - */ /** * Sample code: StandbyVirtualMachinePools_Delete. * @@ -333,9 +305,6 @@ public final class StandbyVirtualMachinePoolsDeleteSamples { * Samples for StandbyVirtualMachinePools GetByResourceGroup. */ public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Get.json - */ /** * Sample code: StandbyVirtualMachinePools_Get. * @@ -355,9 +324,6 @@ public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples { * Samples for StandbyVirtualMachinePools List. */ public final class StandbyVirtualMachinePoolsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListBySubscription.json - */ /** * Sample code: StandbyVirtualMachinePools_ListBySubscription. * @@ -377,9 +343,6 @@ public final class StandbyVirtualMachinePoolsListSamples { * Samples for StandbyVirtualMachinePools ListByResourceGroup. */ public final class StandbyVirtualMachinePoolsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListByResourceGroup.json - */ /** * Sample code: StandbyVirtualMachinePools_ListByResourceGroup. * @@ -395,7 +358,7 @@ public final class StandbyVirtualMachinePoolsListByResourceGroupSamples { ### StandbyVirtualMachinePools_Update ```java -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResource; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.VirtualMachineState; @@ -406,9 +369,6 @@ import java.util.Map; * Samples for StandbyVirtualMachinePools Update. */ public final class StandbyVirtualMachinePoolsUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Update.json - */ /** * Sample code: StandbyVirtualMachinePools_Update. * @@ -422,8 +382,7 @@ public final class StandbyVirtualMachinePoolsUpdateSamples { resource.update() .withTags(mapOf()) .withProperties(new StandbyVirtualMachinePoolResourceUpdateProperties() - .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(304L)) + .withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L)) .withVirtualMachineState(VirtualMachineState.RUNNING) .withAttachedVirtualMachineScaleSetId( "/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss")) @@ -451,9 +410,6 @@ public final class StandbyVirtualMachinePoolsUpdateSamples { * Samples for StandbyVirtualMachines Get. */ public final class StandbyVirtualMachinesGetSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_Get.json - */ /** * Sample code: StandbyVirtualMachines_Get. * @@ -473,9 +429,6 @@ public final class StandbyVirtualMachinesGetSamples { * Samples for StandbyVirtualMachines ListByStandbyVirtualMachinePoolResource. */ public final class StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json - */ /** * Sample code: StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/StandbyPoolManager.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/StandbyPoolManager.java index df8d56810a195..893057d4e2741 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/StandbyPoolManager.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/StandbyPoolManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool; @@ -23,10 +23,10 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.standbypool.fluent.StandbyPoolMgmtClient; +import com.azure.resourcemanager.standbypool.fluent.StandbyPoolClient; import com.azure.resourcemanager.standbypool.implementation.OperationsImpl; import com.azure.resourcemanager.standbypool.implementation.StandbyContainerGroupPoolsImpl; -import com.azure.resourcemanager.standbypool.implementation.StandbyPoolMgmtClientBuilder; +import com.azure.resourcemanager.standbypool.implementation.StandbyPoolClientBuilder; import com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinePoolsImpl; import com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinesImpl; import com.azure.resourcemanager.standbypool.models.Operations; @@ -46,18 +46,18 @@ public final class StandbyPoolManager { private Operations operations; - private StandbyContainerGroupPools standbyContainerGroupPools; - private StandbyVirtualMachinePools standbyVirtualMachinePools; private StandbyVirtualMachines standbyVirtualMachines; - private final StandbyPoolMgmtClient clientObject; + private StandbyContainerGroupPools standbyContainerGroupPools; + + private final StandbyPoolClient clientObject; private StandbyPoolManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new StandbyPoolMgmtClientBuilder().pipeline(httpPipeline) + this.clientObject = new StandbyPoolClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -274,19 +274,6 @@ public Operations operations() { return operations; } - /** - * Gets the resource collection API of StandbyContainerGroupPools. It manages StandbyContainerGroupPoolResource. - * - * @return Resource collection API of StandbyContainerGroupPools. - */ - public StandbyContainerGroupPools standbyContainerGroupPools() { - if (this.standbyContainerGroupPools == null) { - this.standbyContainerGroupPools - = new StandbyContainerGroupPoolsImpl(clientObject.getStandbyContainerGroupPools(), this); - } - return standbyContainerGroupPools; - } - /** * Gets the resource collection API of StandbyVirtualMachinePools. It manages StandbyVirtualMachinePoolResource. * @@ -314,12 +301,25 @@ public StandbyVirtualMachines standbyVirtualMachines() { } /** - * Gets wrapped service client StandbyPoolMgmtClient providing direct access to the underlying auto-generated API + * Gets the resource collection API of StandbyContainerGroupPools. It manages StandbyContainerGroupPoolResource. + * + * @return Resource collection API of StandbyContainerGroupPools. + */ + public StandbyContainerGroupPools standbyContainerGroupPools() { + if (this.standbyContainerGroupPools == null) { + this.standbyContainerGroupPools + = new StandbyContainerGroupPoolsImpl(clientObject.getStandbyContainerGroupPools(), this); + } + return standbyContainerGroupPools; + } + + /** + * Gets wrapped service client StandbyPoolClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. * - * @return Wrapped service client StandbyPoolMgmtClient. + * @return Wrapped service client StandbyPoolClient. */ - public StandbyPoolMgmtClient serviceClient() { + public StandbyPoolClient serviceClient() { return this.clientObject; } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/OperationsClient.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/OperationsClient.java index 352b2d5ce2422..fa59036191b4c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/OperationsClient.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyContainerGroupPoolsClient.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyContainerGroupPoolsClient.java index fbcc737abfcaf..e2acbfc267d47 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyContainerGroupPoolsClient.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyContainerGroupPoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent; @@ -18,58 +18,6 @@ * An instance of this class provides access to all the operations defined in StandbyContainerGroupPoolsClient. */ public interface StandbyContainerGroupPoolsClient { - /** - * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, - Context context); - /** * Get a StandbyContainerGroupPoolResource. * @@ -163,6 +111,59 @@ StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context); + /** + * Delete a StandbyContainerGroupPoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 standbyContainerGroupPoolName); + + /** + * Delete a StandbyContainerGroupPoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 standbyContainerGroupPoolName, + Context context); + + /** + * Delete a StandbyContainerGroupPoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 standbyContainerGroupPoolName); + + /** + * Delete a StandbyContainerGroupPoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 standbyContainerGroupPoolName, Context context); + /** * Update a StandbyContainerGroupPoolResource. * @@ -195,55 +196,54 @@ StandbyContainerGroupPoolResourceInner update(String resourceGroupName, String s StandbyContainerGroupPoolResourceUpdate properties); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String standbyContainerGroupPoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String standbyContainerGroupPoolName, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String standbyContainerGroupPoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String standbyContainerGroupPoolName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolMgmtClient.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolClient.java similarity index 85% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolMgmtClient.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolClient.java index 1a1234610666a..8c66d9f344506 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolMgmtClient.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyPoolClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for StandbyPoolMgmtClient class. + * The interface for StandbyPoolClient class. */ -public interface StandbyPoolMgmtClient { +public interface StandbyPoolClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Server parameter. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -53,13 +53,6 @@ public interface StandbyPoolMgmtClient { */ OperationsClient getOperations(); - /** - * Gets the StandbyContainerGroupPoolsClient object to access its operations. - * - * @return the StandbyContainerGroupPoolsClient object. - */ - StandbyContainerGroupPoolsClient getStandbyContainerGroupPools(); - /** * Gets the StandbyVirtualMachinePoolsClient object to access its operations. * @@ -73,4 +66,11 @@ public interface StandbyPoolMgmtClient { * @return the StandbyVirtualMachinesClient object. */ StandbyVirtualMachinesClient getStandbyVirtualMachines(); + + /** + * Gets the StandbyContainerGroupPoolsClient object to access its operations. + * + * @return the StandbyContainerGroupPoolsClient object. + */ + StandbyContainerGroupPoolsClient getStandbyContainerGroupPools(); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinePoolsClient.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinePoolsClient.java index 1281e92649f2b..2c031822c5cfe 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinePoolsClient.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinePoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent; @@ -18,58 +18,6 @@ * An instance of this class provides access to all the operations defined in StandbyVirtualMachinePoolsClient. */ public interface StandbyVirtualMachinePoolsClient { - /** - * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, - Context context); - /** * Get a StandbyVirtualMachinePoolResource. * @@ -163,6 +111,59 @@ StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context); + /** + * Delete a StandbyVirtualMachinePoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 standbyVirtualMachinePoolName); + + /** + * Delete a StandbyVirtualMachinePoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 standbyVirtualMachinePoolName, + Context context); + + /** + * Delete a StandbyVirtualMachinePoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 standbyVirtualMachinePoolName); + + /** + * Delete a StandbyVirtualMachinePoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 standbyVirtualMachinePoolName, Context context); + /** * Update a StandbyVirtualMachinePoolResource. * @@ -195,55 +196,54 @@ StandbyVirtualMachinePoolResourceInner update(String resourceGroupName, String s StandbyVirtualMachinePoolResourceUpdate properties); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String standbyVirtualMachinePoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String standbyVirtualMachinePoolName, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String standbyVirtualMachinePoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String standbyVirtualMachinePoolName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinesClient.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinesClient.java index 46e7ce7423e81..1213178732777 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinesClient.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/StandbyVirtualMachinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent; @@ -16,64 +16,64 @@ */ public interface StandbyVirtualMachinesClient { /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. + * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachineResource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, - String standbyVirtualMachinePoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context); /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param context The context to associate with this operation. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachineResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + StandbyVirtualMachineResourceInner get(String resourceGroupName, String standbyVirtualMachinePoolName, + String standbyVirtualMachineName); /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. - * @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 StandbyVirtualMachineResource along with {@link Response}. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, + String standbyVirtualMachinePoolName); /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. + * @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 StandbyVirtualMachineResource. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - StandbyVirtualMachineResourceInner get(String resourceGroupName, String standbyVirtualMachinePoolName, - String standbyVirtualMachineName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/OperationInner.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/OperationInner.java index 6310aa42031bd..9f7f87e0f99ee 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/OperationInner.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/OperationInner.java @@ -1,21 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.standbypool.models.ActionType; import com.azure.resourcemanager.standbypool.models.OperationDisplay; import com.azure.resourcemanager.standbypool.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; /** - * REST API Operation - * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" @@ -24,7 +22,7 @@ public final class OperationInner { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -44,13 +42,13 @@ public final class OperationInner { /* * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "actionType") private ActionType actionType; /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -65,7 +63,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -82,17 +80,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * 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". diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyContainerGroupPoolResourceInner.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyContainerGroupPoolResourceInner.java index 3335a75e4ef50..7763ae54eb37f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyContainerGroupPoolResourceInner.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyContainerGroupPoolResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachinePoolResourceInner.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachinePoolResourceInner.java index 3141e0e00f53e..c780b6ff18adf 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachinePoolResourceInner.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachinePoolResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachineResourceInner.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachineResourceInner.java index c8a4c59aef9af..31e20c0e6b4f6 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachineResourceInner.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/StandbyVirtualMachineResourceInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceProperties; @@ -13,7 +13,7 @@ /** * Concrete proxy resource types can be created by aliasing this type using a specific property type. */ -@Fluent +@Immutable public final class StandbyVirtualMachineResourceInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -30,7 +30,7 @@ public final class StandbyVirtualMachineResourceInner extends ProxyResource { /** * Creates an instance of StandbyVirtualMachineResourceInner class. */ - public StandbyVirtualMachineResourceInner() { + private StandbyVirtualMachineResourceInner() { } /** @@ -42,17 +42,6 @@ public StandbyVirtualMachineResourceProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the StandbyVirtualMachineResourceInner object itself. - */ - public StandbyVirtualMachineResourceInner withProperties(StandbyVirtualMachineResourceProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/package-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/package-info.java index 966c61a1dcb59..2541568e996ba 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/package-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for StandbyPoolMgmtClient. - * null. + * Package containing the inner data models for StandbyPool. */ package com.azure.resourcemanager.standbypool.fluent.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/package-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/package-info.java index b5589bda72995..05cd6be08484c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/package-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/fluent/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for StandbyPoolMgmtClient. - * null. + * Package containing the service clients for StandbyPool. */ package com.azure.resourcemanager.standbypool.fluent; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationImpl.java index 4c015861d9446..48801b4b4096b 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsClientImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsClientImpl.java index a03749c0295db..364ab1383f2ef 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsClientImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.standbypool.fluent.OperationsClient; import com.azure.resourcemanager.standbypool.fluent.models.OperationInner; -import com.azure.resourcemanager.standbypool.models.OperationListResult; +import com.azure.resourcemanager.standbypool.implementation.models.PagedOperation; import reactor.core.publisher.Mono; /** @@ -42,39 +42,39 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final StandbyPoolMgmtClientImpl client; + private final StandbyPoolClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(StandbyPoolMgmtClientImpl client) { + OperationsClientImpl(StandbyPoolClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for StandbyPoolMgmtClientOperations to be used by the proxy service to + * The interface defining all the services for StandbyPoolClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "StandbyPoolMgmtClien") + @Host("{endpoint}") + @ServiceInterface(name = "StandbyPoolClientOpe") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.StandbyPool/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> list(@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("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsImpl.java index 428dfb777e95f..dcb8a68972daf 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/ResourceManagerUtils.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/ResourceManagerUtils.java index eec6e6371954a..22cb104a460f3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/ResourceManagerUtils.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolResourceImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolResourceImpl.java index 794d5b63c548e..93dc21651b56e 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolResourceImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsClientImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsClientImpl.java index 22c04f2679814..f7b069b4ebef8 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsClientImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.standbypool.fluent.StandbyContainerGroupPoolsClient; import com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceListResult; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyContainerGroupPoolResourceListResult; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,113 +52,117 @@ public final class StandbyContainerGroupPoolsClientImpl implements StandbyContai /** * The service client containing this operation class. */ - private final StandbyPoolMgmtClientImpl client; + private final StandbyPoolClientImpl client; /** * Initializes an instance of StandbyContainerGroupPoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - StandbyContainerGroupPoolsClientImpl(StandbyPoolMgmtClientImpl client) { + StandbyContainerGroupPoolsClientImpl(StandbyPoolClientImpl client) { this.service = RestProxy.create(StandbyContainerGroupPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for StandbyPoolMgmtClientStandbyContainerGroupPools to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for StandbyPoolClientStandbyContainerGroupPools to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "StandbyPoolMgmtClien") + @Host("{endpoint}") + @ServiceInterface(name = "StandbyPoolClientSta") public interface StandbyContainerGroupPoolsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("standbyContainerGroupPoolName") String standbyContainerGroupPoolName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyContainerGroupPoolName") String standbyContainerGroupPoolName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") StandbyContainerGroupPoolResourceInner resource, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") - @ExpectedResponses({ 200, 201 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyContainerGroupPoolName") String standbyContainerGroupPoolName, - @BodyParam("application/json") StandbyContainerGroupPoolResourceInner resource, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyContainerGroupPoolName") String standbyContainerGroupPoolName, - @BodyParam("application/json") StandbyContainerGroupPoolResourceUpdate properties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") StandbyContainerGroupPoolResourceUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + 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}/providers/Microsoft.StandbyPool/standbyContainerGroupPools") + @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("standbyContainerGroupPoolName") String standbyContainerGroupPoolName, - @HeaderParam("Accept") String accept, Context context); + @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("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + 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) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String standbyContainerGroupPoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -167,27 +171,35 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (standbyContainerGroupPoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyContainerGroupPoolName is required and cannot be null.")); + } 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String standbyContainerGroupPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -196,86 +208,85 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (standbyContainerGroupPoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyContainerGroupPoolName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return 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)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context); } /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return a StandbyContainerGroupPoolResource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String standbyContainerGroupPoolName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyContainerGroupPoolResource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String standbyContainerGroupPoolName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, context).block(); } /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyContainerGroupPoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public StandbyContainerGroupPoolResourceInner getByResourceGroup(String resourceGroupName, + String standbyContainerGroupPoolName) { + return getByResourceGroupWithResponse(resourceGroupName, standbyContainerGroupPoolName, Context.NONE) + .getValue(); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -288,29 +299,38 @@ public PagedIterable list(Context contex return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (standbyContainerGroupPoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyContainerGroupPoolName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -323,218 +343,192 @@ public PagedIterable list(Context contex return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (standbyContainerGroupPoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyContainerGroupPoolName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return 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)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, resource, + context); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a StandbyContainerGroupPoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StandbyContainerGroupPoolResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String standbyContainerGroupPoolName, + StandbyContainerGroupPoolResourceInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, resource); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), StandbyContainerGroupPoolResourceInner.class, + StandbyContainerGroupPoolResourceInner.class, this.client.getContext()); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a StandbyContainerGroupPoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StandbyContainerGroupPoolResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String standbyContainerGroupPoolName, + StandbyContainerGroupPoolResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), StandbyContainerGroupPoolResourceInner.class, + StandbyContainerGroupPoolResourceInner.class, context); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a StandbyContainerGroupPoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StandbyContainerGroupPoolResourceInner> + beginCreateOrUpdate(String resourceGroupName, String standbyContainerGroupPoolName, + StandbyContainerGroupPoolResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource) + .getSyncPoller(); } /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 response of a StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a StandbyContainerGroupPoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StandbyContainerGroupPoolResourceInner> + beginCreateOrUpdate(String resourceGroupName, String standbyContainerGroupPoolName, + StandbyContainerGroupPoolResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context) + .getSyncPoller(); } /** - * Get a StandbyContainerGroupPoolResource. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return a StandbyContainerGroupPoolResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String standbyContainerGroupPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (standbyContainerGroupPoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyContainerGroupPoolName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a StandbyContainerGroupPoolResource. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String standbyContainerGroupPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (standbyContainerGroupPoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyContainerGroupPoolName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context); - } - - /** - * Get a StandbyContainerGroupPoolResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 StandbyContainerGroupPoolResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String standbyContainerGroupPoolName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a StandbyContainerGroupPoolResource. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @param context The context to associate with this operation. + * @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 a StandbyContainerGroupPoolResource along with {@link Response}. + * @return a StandbyContainerGroupPoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String standbyContainerGroupPoolName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, context).block(); + public StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource).block(); } /** - * Get a StandbyContainerGroupPoolResource. + * Create a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 a StandbyContainerGroupPoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyContainerGroupPoolResourceInner getByResourceGroup(String resourceGroupName, - String standbyContainerGroupPoolName) { - return getByResourceGroupWithResponse(resourceGroupName, standbyContainerGroupPoolName, Context.NONE) - .getValue(); + public StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, + String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context).block(); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String standbyContainerGroupPoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -551,34 +545,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter standbyContainerGroupPoolName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, resource, accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String standbyContainerGroupPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -595,173 +582,145 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter standbyContainerGroupPoolName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, resource, accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, standbyContainerGroupPoolName, accept, context); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StandbyContainerGroupPoolResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String standbyContainerGroupPoolName, - StandbyContainerGroupPoolResourceInner resource) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String standbyContainerGroupPoolName) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, resource); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), StandbyContainerGroupPoolResourceInner.class, - StandbyContainerGroupPoolResourceInner.class, this.client.getContext()); + = deleteWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 PollerFlux} for polling of a StandbyContainerGroupPoolResource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StandbyContainerGroupPoolResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String standbyContainerGroupPoolName, - StandbyContainerGroupPoolResourceInner resource, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String standbyContainerGroupPoolName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), StandbyContainerGroupPoolResourceInner.class, - StandbyContainerGroupPoolResourceInner.class, context); + = deleteWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StandbyContainerGroupPoolResourceInner> - beginCreateOrUpdate(String resourceGroupName, String standbyContainerGroupPoolName, - StandbyContainerGroupPoolResourceInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, + String standbyContainerGroupPoolName) { + return this.beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName).getSyncPoller(); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StandbyContainerGroupPoolResourceInner> - beginCreateOrUpdate(String resourceGroupName, String standbyContainerGroupPoolName, - StandbyContainerGroupPoolResourceInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, + String standbyContainerGroupPoolName, Context context) { + return this.beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).getSyncPoller(); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource).last() + private Mono deleteAsync(String resourceGroupName, String standbyContainerGroupPoolName) { + return beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context).last() + private Mono deleteAsync(String resourceGroupName, String standbyContainerGroupPoolName, Context context) { + return beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource) { - return createOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource).block(); + public void delete(String resourceGroupName, String standbyContainerGroupPoolName) { + deleteAsync(resourceGroupName, standbyContainerGroupPoolName).block(); } /** - * Create a StandbyContainerGroupPoolResource. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 a StandbyContainerGroupPoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyContainerGroupPoolResourceInner createOrUpdate(String resourceGroupName, - String standbyContainerGroupPoolName, StandbyContainerGroupPoolResourceInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, standbyContainerGroupPoolName, resource, context).block(); + public void delete(String resourceGroupName, String standbyContainerGroupPoolName, Context context) { + deleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).block(); } /** @@ -802,7 +761,7 @@ private Mono> updateWithRespons final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, properties, accept, + this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -846,7 +805,7 @@ private Mono> updateWithRespons final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, standbyContainerGroupPoolName, properties, accept, context); + resourceGroupName, standbyContainerGroupPoolName, accept, properties, context); } /** @@ -904,18 +863,18 @@ public StandbyContainerGroupPoolResourceInner update(String resourceGroupName, S } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String standbyContainerGroupPoolName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -928,31 +887,29 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (standbyContainerGroupPoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyContainerGroupPoolName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyContainerGroupPoolName, accept, context)) + .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())); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 Response} on successful completion of {@link Mono}. + * @return the response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String standbyContainerGroupPoolName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -965,149 +922,193 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (standbyContainerGroupPoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyContainerGroupPoolName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, standbyContainerGroupPoolName, accept, context); + return 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)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String standbyContainerGroupPoolName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 PollerFlux} for polling of long-running operation. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String standbyContainerGroupPoolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, standbyContainerGroupPoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String standbyContainerGroupPoolName) { - return this.beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String standbyContainerGroupPoolName, Context context) { - return this.beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String standbyContainerGroupPoolName) { - return beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + 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())); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 {@link Mono} that completes when a successful response is received. + * @return the response of a StandbyContainerGroupPoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String standbyContainerGroupPoolName, Context context) { - return beginDeleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @throws ManagementException 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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String standbyContainerGroupPoolName) { - deleteAsync(resourceGroupName, standbyContainerGroupPoolName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource 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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String standbyContainerGroupPoolName, Context context) { - deleteAsync(resourceGroupName, standbyContainerGroupPoolName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -1124,7 +1125,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listBySubscriptionNextSinglePageAsync(String nextLink) { + listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1135,7 +1136,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1156,7 +1157,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1166,7 +1167,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } @@ -1185,7 +1186,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink) { + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1196,7 +1197,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1217,7 +1218,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1227,7 +1228,7 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsImpl.java index 9633bc31e4a07..81b0b66fb5c57 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyContainerGroupPoolsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -27,33 +27,6 @@ public StandbyContainerGroupPoolsImpl(StandbyContainerGroupPoolsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String standbyContainerGroupPoolName, Context context) { Response inner = this.serviceClient() @@ -85,6 +58,33 @@ public void delete(String resourceGroupName, String standbyContainerGroupPoolNam this.serviceClient().delete(resourceGroupName, standbyContainerGroupPoolName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyContainerGroupPoolResourceImpl(inner1, this.manager())); + } + public StandbyContainerGroupPoolResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientBuilder.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientBuilder.java similarity index 62% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientBuilder.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientBuilder.java index 4d297227897de..f6c1e3c66f40e 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientBuilder.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the StandbyPoolMgmtClientImpl type. + * A builder for creating a new instance of the StandbyPoolClientImpl type. */ -@ServiceClientBuilder(serviceClients = { StandbyPoolMgmtClientImpl.class }) -public final class StandbyPoolMgmtClientBuilder { +@ServiceClientBuilder(serviceClients = { StandbyPoolClientImpl.class }) +public final class StandbyPoolClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Server parameter. * - * @param subscriptionId the subscriptionId value. - * @return the StandbyPoolMgmtClientBuilder. + * @param endpoint the endpoint value. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public StandbyPoolClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. * - * @param endpoint the endpoint value. - * @return the StandbyPoolMgmtClientBuilder. + * @param subscriptionId the subscriptionId value. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public StandbyPoolClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public StandbyPoolMgmtClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the StandbyPoolMgmtClientBuilder. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder environment(AzureEnvironment environment) { + public StandbyPoolClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public StandbyPoolMgmtClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the StandbyPoolMgmtClientBuilder. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder pipeline(HttpPipeline pipeline) { + public StandbyPoolClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public StandbyPoolMgmtClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the StandbyPoolMgmtClientBuilder. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public StandbyPoolClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,20 +108,19 @@ public StandbyPoolMgmtClientBuilder defaultPollInterval(Duration defaultPollInte * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the StandbyPoolMgmtClientBuilder. + * @return the StandbyPoolClientBuilder. */ - public StandbyPoolMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public StandbyPoolClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of StandbyPoolMgmtClientImpl with the provided parameters. + * Builds an instance of StandbyPoolClientImpl with the provided parameters. * - * @return an instance of StandbyPoolMgmtClientImpl. + * @return an instance of StandbyPoolClientImpl. */ - public StandbyPoolMgmtClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + public StandbyPoolClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) ? pipeline @@ -131,8 +130,8 @@ public StandbyPoolMgmtClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - StandbyPoolMgmtClientImpl client = new StandbyPoolMgmtClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + StandbyPoolClientImpl client = new StandbyPoolClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.endpoint, this.subscriptionId); return client; } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientImpl.java similarity index 91% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientImpl.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientImpl.java index 68c1aaf72b735..7a80a764b3753 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolMgmtClientImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyPoolClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -25,7 +25,7 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.standbypool.fluent.OperationsClient; import com.azure.resourcemanager.standbypool.fluent.StandbyContainerGroupPoolsClient; -import com.azure.resourcemanager.standbypool.fluent.StandbyPoolMgmtClient; +import com.azure.resourcemanager.standbypool.fluent.StandbyPoolClient; import com.azure.resourcemanager.standbypool.fluent.StandbyVirtualMachinePoolsClient; import com.azure.resourcemanager.standbypool.fluent.StandbyVirtualMachinesClient; import java.io.IOException; @@ -38,31 +38,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the StandbyPoolMgmtClientImpl type. + * Initializes a new instance of the StandbyPoolClientImpl type. */ -@ServiceClient(builder = StandbyPoolMgmtClientBuilder.class) -public final class StandbyPoolMgmtClientImpl implements StandbyPoolMgmtClient { +@ServiceClient(builder = StandbyPoolClientBuilder.class) +public final class StandbyPoolClientImpl implements StandbyPoolClient { /** - * 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; - } - - /** - * server parameter. + * Server parameter. */ private final String endpoint; /** - * Gets server parameter. + * Gets Server parameter. * * @return the endpoint value. */ @@ -71,12 +57,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -84,6 +70,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -140,20 +140,6 @@ public OperationsClient getOperations() { return this.operations; } - /** - * The StandbyContainerGroupPoolsClient object to access its operations. - */ - private final StandbyContainerGroupPoolsClient standbyContainerGroupPools; - - /** - * Gets the StandbyContainerGroupPoolsClient object to access its operations. - * - * @return the StandbyContainerGroupPoolsClient object. - */ - public StandbyContainerGroupPoolsClient getStandbyContainerGroupPools() { - return this.standbyContainerGroupPools; - } - /** * The StandbyVirtualMachinePoolsClient object to access its operations. */ @@ -183,27 +169,41 @@ public StandbyVirtualMachinesClient getStandbyVirtualMachines() { } /** - * Initializes an instance of StandbyPoolMgmtClient client. + * The StandbyContainerGroupPoolsClient object to access its operations. + */ + private final StandbyContainerGroupPoolsClient standbyContainerGroupPools; + + /** + * Gets the StandbyContainerGroupPoolsClient object to access its operations. + * + * @return the StandbyContainerGroupPoolsClient object. + */ + public StandbyContainerGroupPoolsClient getStandbyContainerGroupPools() { + return this.standbyContainerGroupPools; + } + + /** + * Initializes an instance of StandbyPoolClient 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 subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. + * @param endpoint Server parameter. + * @param subscriptionId The ID of the target subscription. */ - StandbyPoolMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + StandbyPoolClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.subscriptionId = subscriptionId; this.apiVersion = "2023-12-01-preview"; this.operations = new OperationsClientImpl(this); - this.standbyContainerGroupPools = new StandbyContainerGroupPoolsClientImpl(this); this.standbyVirtualMachinePools = new StandbyVirtualMachinePoolsClientImpl(this); this.standbyVirtualMachines = new StandbyVirtualMachinesClientImpl(this); + this.standbyContainerGroupPools = new StandbyContainerGroupPoolsClientImpl(this); } /** @@ -332,5 +332,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(StandbyPoolMgmtClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(StandbyPoolClientImpl.class); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolResourceImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolResourceImpl.java index ccd34e2f30743..bc9ed304e9f33 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolResourceImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsClientImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsClientImpl.java index e53fef2f2d4a6..3d50a11747017 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsClientImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.standbypool.fluent.StandbyVirtualMachinePoolsClient; import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachinePoolResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceListResult; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachinePoolResourceListResult; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,113 +52,117 @@ public final class StandbyVirtualMachinePoolsClientImpl implements StandbyVirtua /** * The service client containing this operation class. */ - private final StandbyPoolMgmtClientImpl client; + private final StandbyPoolClientImpl client; /** * Initializes an instance of StandbyVirtualMachinePoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - StandbyVirtualMachinePoolsClientImpl(StandbyPoolMgmtClientImpl client) { + StandbyVirtualMachinePoolsClientImpl(StandbyPoolClientImpl client) { this.service = RestProxy.create(StandbyVirtualMachinePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for StandbyPoolMgmtClientStandbyVirtualMachinePools to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for StandbyPoolClientStandbyVirtualMachinePools to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "StandbyPoolMgmtClien") + @Host("{endpoint}") + @ServiceInterface(name = "StandbyPoolClientSta") public interface StandbyVirtualMachinePoolsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") StandbyVirtualMachinePoolResourceInner resource, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") - @ExpectedResponses({ 200, 201 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @BodyParam("application/json") StandbyVirtualMachinePoolResourceInner resource, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @BodyParam("application/json") StandbyVirtualMachinePoolResourceUpdate properties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") StandbyVirtualMachinePoolResourceUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + 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}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools") + @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("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @HeaderParam("Accept") String accept, Context context); + @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("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + 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) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -167,27 +171,35 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (standbyVirtualMachinePoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); + } 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -196,86 +208,85 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (standbyVirtualMachinePoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return 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)); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context); } /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return a StandbyVirtualMachinePoolResource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String standbyVirtualMachinePoolName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, context).block(); } /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachinePoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public StandbyVirtualMachinePoolResourceInner getByResourceGroup(String resourceGroupName, + String standbyVirtualMachinePoolName) { + return getByResourceGroupWithResponse(resourceGroupName, standbyVirtualMachinePoolName, Context.NONE) + .getValue(); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -288,29 +299,38 @@ public PagedIterable list(Context contex return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (standbyVirtualMachinePoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -323,218 +343,192 @@ public PagedIterable list(Context contex return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (standbyVirtualMachinePoolName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return 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)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, resource, + context); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a StandbyVirtualMachinePoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StandbyVirtualMachinePoolResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String standbyVirtualMachinePoolName, + StandbyVirtualMachinePoolResourceInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, resource); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), StandbyVirtualMachinePoolResourceInner.class, + StandbyVirtualMachinePoolResourceInner.class, this.client.getContext()); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a StandbyVirtualMachinePoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StandbyVirtualMachinePoolResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String standbyVirtualMachinePoolName, + StandbyVirtualMachinePoolResourceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), StandbyVirtualMachinePoolResourceInner.class, + StandbyVirtualMachinePoolResourceInner.class, context); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a StandbyVirtualMachinePoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StandbyVirtualMachinePoolResourceInner> + beginCreateOrUpdate(String resourceGroupName, String standbyVirtualMachinePoolName, + StandbyVirtualMachinePoolResourceInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource) + .getSyncPoller(); } /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 response of a StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a StandbyVirtualMachinePoolResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StandbyVirtualMachinePoolResourceInner> + beginCreateOrUpdate(String resourceGroupName, String standbyVirtualMachinePoolName, + StandbyVirtualMachinePoolResourceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context) + .getSyncPoller(); } /** - * Get a StandbyVirtualMachinePoolResource. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return a StandbyVirtualMachinePoolResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (standbyVirtualMachinePoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a StandbyVirtualMachinePoolResource. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (standbyVirtualMachinePoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context); - } - - /** - * Get a StandbyVirtualMachinePoolResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 StandbyVirtualMachinePoolResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String standbyVirtualMachinePoolName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a StandbyVirtualMachinePoolResource. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param context The context to associate with this operation. + * @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 a StandbyVirtualMachinePoolResource along with {@link Response}. + * @return a StandbyVirtualMachinePoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, context).block(); + public StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { + return createOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource).block(); } /** - * Get a StandbyVirtualMachinePoolResource. + * Create a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 a StandbyVirtualMachinePoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyVirtualMachinePoolResourceInner getByResourceGroup(String resourceGroupName, - String standbyVirtualMachinePoolName) { - return getByResourceGroupWithResponse(resourceGroupName, standbyVirtualMachinePoolName, Context.NONE) - .getValue(); + public StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, + String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context).block(); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -551,34 +545,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, resource, accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -595,173 +582,145 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, resource, accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, standbyVirtualMachinePoolName, accept, context); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StandbyVirtualMachinePoolResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String standbyVirtualMachinePoolName, - StandbyVirtualMachinePoolResourceInner resource) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String standbyVirtualMachinePoolName) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, resource); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), StandbyVirtualMachinePoolResourceInner.class, - StandbyVirtualMachinePoolResourceInner.class, this.client.getContext()); + = deleteWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 PollerFlux} for polling of a StandbyVirtualMachinePoolResource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, StandbyVirtualMachinePoolResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String standbyVirtualMachinePoolName, - StandbyVirtualMachinePoolResourceInner resource, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), StandbyVirtualMachinePoolResourceInner.class, - StandbyVirtualMachinePoolResourceInner.class, context); + = deleteWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StandbyVirtualMachinePoolResourceInner> - beginCreateOrUpdate(String resourceGroupName, String standbyVirtualMachinePoolName, - StandbyVirtualMachinePoolResourceInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, + String standbyVirtualMachinePoolName) { + return this.beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName).getSyncPoller(); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StandbyVirtualMachinePoolResourceInner> - beginCreateOrUpdate(String resourceGroupName, String standbyVirtualMachinePoolName, - StandbyVirtualMachinePoolResourceInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context) { + return this.beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).getSyncPoller(); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource).last() + private Mono deleteAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { + return beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context).last() + private Mono deleteAsync(String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { + return beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource) { - return createOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource).block(); + public void delete(String resourceGroupName, String standbyVirtualMachinePoolName) { + deleteAsync(resourceGroupName, standbyVirtualMachinePoolName).block(); } /** - * Create a StandbyVirtualMachinePoolResource. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 a StandbyVirtualMachinePoolResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyVirtualMachinePoolResourceInner createOrUpdate(String resourceGroupName, - String standbyVirtualMachinePoolName, StandbyVirtualMachinePoolResourceInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, standbyVirtualMachinePoolName, resource, context).block(); + public void delete(String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { + deleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).block(); } /** @@ -802,7 +761,7 @@ private Mono> updateWithRespons final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, properties, accept, + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -846,7 +805,7 @@ private Mono> updateWithRespons final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, standbyVirtualMachinePoolName, properties, accept, context); + resourceGroupName, standbyVirtualMachinePoolName, accept, properties, context); } /** @@ -904,18 +863,18 @@ public StandbyVirtualMachinePoolResourceInner update(String resourceGroupName, S } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -928,31 +887,29 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (standbyVirtualMachinePoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context)) + .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())); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 Response} on successful completion of {@link Mono}. + * @return the response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -965,149 +922,193 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (standbyVirtualMachinePoolName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, standbyVirtualMachinePoolName, accept, context); + return 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)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String standbyVirtualMachinePoolName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 PollerFlux} for polling of long-running operation. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String standbyVirtualMachinePoolName) { - return this.beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context) { - return this.beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { - return beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + 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())); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 {@link Mono} that completes when a successful response is received. + * @return the response of a StandbyVirtualMachinePoolResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - return beginDeleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @throws ManagementException 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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String standbyVirtualMachinePoolName) { - deleteAsync(resourceGroupName, standbyVirtualMachinePoolName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource 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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - deleteAsync(resourceGroupName, standbyVirtualMachinePoolName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -1124,7 +1125,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listBySubscriptionNextSinglePageAsync(String nextLink) { + listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1135,7 +1136,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1156,7 +1157,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1166,7 +1167,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } @@ -1185,7 +1186,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink) { + listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1196,7 +1197,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1217,7 +1218,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1227,7 +1228,7 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsImpl.java index f60accaaf6745..f1985a4414c24 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinePoolsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -27,33 +27,6 @@ public StandbyVirtualMachinePoolsImpl(StandbyVirtualMachinePoolsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { Response inner = this.serviceClient() @@ -85,6 +58,33 @@ public void delete(String resourceGroupName, String standbyVirtualMachinePoolNam this.serviceClient().delete(resourceGroupName, standbyVirtualMachinePoolName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachinePoolResourceImpl(inner1, this.manager())); + } + public StandbyVirtualMachinePoolResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachineResourceImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachineResourceImpl.java index ec2046a1a00e0..313804be290be 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachineResourceImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachineResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesClientImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesClientImpl.java index 0dfb1d503f063..485773fe6537b 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesClientImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.standbypool.fluent.StandbyVirtualMachinesClient; import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceListResult; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachineResourceListResult; import reactor.core.publisher.Mono; /** @@ -42,72 +42,71 @@ public final class StandbyVirtualMachinesClientImpl implements StandbyVirtualMac /** * The service client containing this operation class. */ - private final StandbyPoolMgmtClientImpl client; + private final StandbyPoolClientImpl client; /** * Initializes an instance of StandbyVirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - StandbyVirtualMachinesClientImpl(StandbyPoolMgmtClientImpl client) { + StandbyVirtualMachinesClientImpl(StandbyPoolClientImpl client) { this.service = RestProxy.create(StandbyVirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for StandbyPoolMgmtClientStandbyVirtualMachines to be used by the proxy + * The interface defining all the services for StandbyPoolClientStandbyVirtualMachines to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "StandbyPoolMgmtClien") + @Host("{endpoint}") + @ServiceInterface(name = "StandbyPoolClientSta") public interface StandbyVirtualMachinesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByStandbyVirtualMachinePoolResource( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("standbyVirtualMachineName") String standbyVirtualMachineName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByStandbyVirtualMachinePoolResource( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("standbyVirtualMachinePoolName") String standbyVirtualMachinePoolName, - @PathParam("standbyVirtualMachineName") String standbyVirtualMachineName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByStandbyVirtualMachinePoolResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachineResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachineResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStandbyVirtualMachinePoolResourceSinglePageAsync(String resourceGroupName, - String standbyVirtualMachinePoolName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -124,32 +123,33 @@ Mono> listByStandbyVirtualMach return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } + if (standbyVirtualMachineName == null) { + return Mono.error( + new IllegalArgumentException("Parameter standbyVirtualMachineName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByStandbyVirtualMachinePoolResource(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - standbyVirtualMachinePoolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, + standbyVirtualMachineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a StandbyVirtualMachineResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByStandbyVirtualMachinePoolResourceSinglePageAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -166,72 +166,69 @@ Mono> listByStandbyVirtualMach return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } + if (standbyVirtualMachineName == null) { + return Mono.error( + new IllegalArgumentException("Parameter standbyVirtualMachineName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByStandbyVirtualMachinePoolResource(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, accept, context); } /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedFlux}. + * @return a StandbyVirtualMachineResource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listByStandbyVirtualMachinePoolResourceAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { - return new PagedFlux<>( - () -> listByStandbyVirtualMachinePoolResourceSinglePageAsync(resourceGroupName, - standbyVirtualMachinePoolName), - nextLink -> listByStandbyVirtualMachinePoolResourceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName) { + return getWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedFlux}. + * @return a StandbyVirtualMachineResource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByStandbyVirtualMachinePoolResourceAsync( - String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - return new PagedFlux<>( - () -> listByStandbyVirtualMachinePoolResourceSinglePageAsync(resourceGroupName, - standbyVirtualMachinePoolName, context), - nextLink -> listByStandbyVirtualMachinePoolResourceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context) { + return getWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, + context).block(); } /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachineResource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listByStandbyVirtualMachinePoolResource(String resourceGroupName, String standbyVirtualMachinePoolName) { - return new PagedIterable<>( - listByStandbyVirtualMachinePoolResourceAsync(resourceGroupName, standbyVirtualMachinePoolName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public StandbyVirtualMachineResourceInner get(String resourceGroupName, String standbyVirtualMachinePoolName, + String standbyVirtualMachineName) { + return getWithResponse(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, + Context.NONE).getValue(); } /** @@ -239,34 +236,16 @@ private PagedFlux listByStandbyVirtualMachin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByStandbyVirtualMachinePoolResource( - String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - return new PagedIterable<>( - listByStandbyVirtualMachinePoolResourceAsync(resourceGroupName, standbyVirtualMachinePoolName, context)); - } - - /** - * Get a StandbyVirtualMachineResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 StandbyVirtualMachineResource along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a StandbyVirtualMachineResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName) { + private Mono> + listByStandbyVirtualMachinePoolResourceSinglePageAsync(String resourceGroupName, + String standbyVirtualMachinePoolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -283,33 +262,32 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } - if (standbyVirtualMachineName == null) { - return Mono.error( - new IllegalArgumentException("Parameter standbyVirtualMachineName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, - standbyVirtualMachineName, accept, context)) + .withContext(context -> service.listByStandbyVirtualMachinePoolResource(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + standbyVirtualMachinePoolName, 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 a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a StandbyVirtualMachineResource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context) { + private Mono> + listByStandbyVirtualMachinePoolResourceSinglePageAsync(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -326,69 +304,91 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter standbyVirtualMachinePoolName is required and cannot be null.")); } - if (standbyVirtualMachineName == null) { - return Mono.error( - new IllegalArgumentException("Parameter standbyVirtualMachineName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, accept, context); + return service + .listByStandbyVirtualMachinePoolResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, standbyVirtualMachinePoolName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 StandbyVirtualMachineResource on successful completion of {@link Mono}. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName) { - return getWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listByStandbyVirtualMachinePoolResourceAsync(String resourceGroupName, String standbyVirtualMachinePoolName) { + return new PagedFlux<>( + () -> listByStandbyVirtualMachinePoolResourceSinglePageAsync(resourceGroupName, + standbyVirtualMachinePoolName), + nextLink -> listByStandbyVirtualMachinePoolResourceNextSinglePageAsync(nextLink)); } /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource along with {@link Response}. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context) { - return getWithResponseAsync(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByStandbyVirtualMachinePoolResourceAsync( + String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { + return new PagedFlux<>( + () -> listByStandbyVirtualMachinePoolResourceSinglePageAsync(resourceGroupName, + standbyVirtualMachinePoolName, context), + nextLink -> listByStandbyVirtualMachinePoolResourceNextSinglePageAsync(nextLink, context)); } /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 StandbyVirtualMachineResource. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StandbyVirtualMachineResourceInner get(String resourceGroupName, String standbyVirtualMachinePoolName, - String standbyVirtualMachineName) { - return getWithResponse(resourceGroupName, standbyVirtualMachinePoolName, standbyVirtualMachineName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listByStandbyVirtualMachinePoolResource(String resourceGroupName, String standbyVirtualMachinePoolName) { + return new PagedIterable<>( + listByStandbyVirtualMachinePoolResourceAsync(resourceGroupName, standbyVirtualMachinePoolName)); + } + + /** + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByStandbyVirtualMachinePoolResource( + String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { + return new PagedIterable<>( + listByStandbyVirtualMachinePoolResourceAsync(resourceGroupName, standbyVirtualMachinePoolName, context)); } /** diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesImpl.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesImpl.java index 27942ae211f32..8d9635bf02658 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesImpl.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/StandbyVirtualMachinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.implementation; @@ -27,22 +27,6 @@ public StandbyVirtualMachinesImpl(StandbyVirtualMachinesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable - listByStandbyVirtualMachinePoolResource(String resourceGroupName, String standbyVirtualMachinePoolName) { - PagedIterable inner = this.serviceClient() - .listByStandbyVirtualMachinePoolResource(resourceGroupName, standbyVirtualMachinePoolName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachineResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByStandbyVirtualMachinePoolResource( - String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { - PagedIterable inner = this.serviceClient() - .listByStandbyVirtualMachinePoolResource(resourceGroupName, standbyVirtualMachinePoolName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new StandbyVirtualMachineResourceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context) { Response inner = this.serviceClient() @@ -66,6 +50,22 @@ public StandbyVirtualMachineResource get(String resourceGroupName, String standb } } + public PagedIterable + listByStandbyVirtualMachinePoolResource(String resourceGroupName, String standbyVirtualMachinePoolName) { + PagedIterable inner = this.serviceClient() + .listByStandbyVirtualMachinePoolResource(resourceGroupName, standbyVirtualMachinePoolName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachineResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByStandbyVirtualMachinePoolResource( + String resourceGroupName, String standbyVirtualMachinePoolName, Context context) { + PagedIterable inner = this.serviceClient() + .listByStandbyVirtualMachinePoolResource(resourceGroupName, standbyVirtualMachinePoolName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new StandbyVirtualMachineResourceImpl(inner1, this.manager())); + } + private StandbyVirtualMachinesClient serviceClient() { return this.innerClient; } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationListResult.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/PagedOperation.java similarity index 54% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationListResult.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/PagedOperation.java index fe417389b8132..7c70c3288c215 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationListResult.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/PagedOperation.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.standbypool.models; +package com.azure.resourcemanager.standbypool.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.standbypool.fluent.models.OperationInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -14,27 +15,27 @@ * results. */ @Immutable -public final class OperationListResult { +public final class PagedOperation { /* - * List of operations supported by the resource provider + * The Operation items on this page */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "value", required = true) private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "nextLink") private String nextLink; /** - * Creates an instance of OperationListResult class. + * Creates an instance of PagedOperation class. */ - public OperationListResult() { + private PagedOperation() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -43,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -57,8 +58,13 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedOperation")); + } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(PagedOperation.class); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceListResult.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyContainerGroupPoolResourceListResult.java similarity index 65% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceListResult.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyContainerGroupPoolResourceListResult.java index 9204d67ab5956..82e366bf73213 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceListResult.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyContainerGroupPoolResourceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.standbypool.models; +package com.azure.resourcemanager.standbypool.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +13,7 @@ /** * The response of a StandbyContainerGroupPoolResource list operation. */ -@Fluent +@Immutable public final class StandbyContainerGroupPoolResourceListResult { /* * The StandbyContainerGroupPoolResource items on this page @@ -30,7 +30,7 @@ public final class StandbyContainerGroupPoolResourceListResult { /** * Creates an instance of StandbyContainerGroupPoolResourceListResult class. */ - public StandbyContainerGroupPoolResourceListResult() { + private StandbyContainerGroupPoolResourceListResult() { } /** @@ -42,17 +42,6 @@ public List value() { return this.value; } - /** - * Set the value property: The StandbyContainerGroupPoolResource items on this page. - * - * @param value the value value to set. - * @return the StandbyContainerGroupPoolResourceListResult object itself. - */ - public StandbyContainerGroupPoolResourceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -62,17 +51,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the StandbyContainerGroupPoolResourceListResult object itself. - */ - public StandbyContainerGroupPoolResourceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceListResult.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachinePoolResourceListResult.java similarity index 65% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceListResult.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachinePoolResourceListResult.java index cbc1d9849ac5b..b0b1675cecbb3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceListResult.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachinePoolResourceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.standbypool.models; +package com.azure.resourcemanager.standbypool.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachinePoolResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +13,7 @@ /** * The response of a StandbyVirtualMachinePoolResource list operation. */ -@Fluent +@Immutable public final class StandbyVirtualMachinePoolResourceListResult { /* * The StandbyVirtualMachinePoolResource items on this page @@ -30,7 +30,7 @@ public final class StandbyVirtualMachinePoolResourceListResult { /** * Creates an instance of StandbyVirtualMachinePoolResourceListResult class. */ - public StandbyVirtualMachinePoolResourceListResult() { + private StandbyVirtualMachinePoolResourceListResult() { } /** @@ -42,17 +42,6 @@ public List value() { return this.value; } - /** - * Set the value property: The StandbyVirtualMachinePoolResource items on this page. - * - * @param value the value value to set. - * @return the StandbyVirtualMachinePoolResourceListResult object itself. - */ - public StandbyVirtualMachinePoolResourceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -62,17 +51,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the StandbyVirtualMachinePoolResourceListResult object itself. - */ - public StandbyVirtualMachinePoolResourceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceListResult.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachineResourceListResult.java similarity index 65% rename from sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceListResult.java rename to sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachineResourceListResult.java index 6653b9e80306b..94aa5b0a52a39 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceListResult.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/models/StandbyVirtualMachineResourceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.standbypool.models; +package com.azure.resourcemanager.standbypool.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +13,7 @@ /** * The response of a StandbyVirtualMachineResource list operation. */ -@Fluent +@Immutable public final class StandbyVirtualMachineResourceListResult { /* * The StandbyVirtualMachineResource items on this page @@ -30,7 +30,7 @@ public final class StandbyVirtualMachineResourceListResult { /** * Creates an instance of StandbyVirtualMachineResourceListResult class. */ - public StandbyVirtualMachineResourceListResult() { + private StandbyVirtualMachineResourceListResult() { } /** @@ -42,17 +42,6 @@ public List value() { return this.value; } - /** - * Set the value property: The StandbyVirtualMachineResource items on this page. - * - * @param value the value value to set. - * @return the StandbyVirtualMachineResourceListResult object itself. - */ - public StandbyVirtualMachineResourceListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -62,17 +51,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the StandbyVirtualMachineResourceListResult object itself. - */ - public StandbyVirtualMachineResourceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/package-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/package-info.java index 4eebd42a7162c..1352fe380a7bd 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/package-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/implementation/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for StandbyPoolMgmtClient. - * null. + * Package containing the implementations for StandbyPool. */ package com.azure.resourcemanager.standbypool.implementation; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ActionType.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ActionType.java index ee3fa2a7cae9c..6425ef1e5dacc 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ActionType.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfile.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfile.java index 4d6ee37f2b2c0..0d7cd9b8bc88f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfile.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfileUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfileUpdate.java deleted file mode 100644 index 659a23fc8cff1..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProfileUpdate.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details of the ContainerGroupProfile. - */ -@Fluent -public final class ContainerGroupProfileUpdate { - /* - * Specifies container group profile id of standby container groups. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Specifies revision of container group profile. - */ - @JsonProperty(value = "revision") - private Long revision; - - /** - * Creates an instance of ContainerGroupProfileUpdate class. - */ - public ContainerGroupProfileUpdate() { - } - - /** - * Get the id property: Specifies container group profile id of standby container groups. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies container group profile id of standby container groups. - * - * @param id the id value to set. - * @return the ContainerGroupProfileUpdate object itself. - */ - public ContainerGroupProfileUpdate withId(String id) { - this.id = id; - return this; - } - - /** - * Get the revision property: Specifies revision of container group profile. - * - * @return the revision value. - */ - public Long revision() { - return this.revision; - } - - /** - * Set the revision property: Specifies revision of container group profile. - * - * @param revision the revision value to set. - * @return the ContainerGroupProfileUpdate object itself. - */ - public ContainerGroupProfileUpdate withRevision(Long revision) { - this.revision = revision; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProperties.java index 47adf67d30a57..e4f045174766b 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupPropertiesUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupPropertiesUpdate.java deleted file mode 100644 index cf8e418237a2a..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ContainerGroupPropertiesUpdate.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Details of the ContainerGroupProperties. - */ -@Fluent -public final class ContainerGroupPropertiesUpdate { - /* - * Specifies container group profile of standby container groups. - */ - @JsonProperty(value = "containerGroupProfile") - private ContainerGroupProfileUpdate containerGroupProfile; - - /* - * Specifies subnet Ids for container group. - */ - @JsonProperty(value = "subnetIds") - private List subnetIds; - - /** - * Creates an instance of ContainerGroupPropertiesUpdate class. - */ - public ContainerGroupPropertiesUpdate() { - } - - /** - * Get the containerGroupProfile property: Specifies container group profile of standby container groups. - * - * @return the containerGroupProfile value. - */ - public ContainerGroupProfileUpdate containerGroupProfile() { - return this.containerGroupProfile; - } - - /** - * Set the containerGroupProfile property: Specifies container group profile of standby container groups. - * - * @param containerGroupProfile the containerGroupProfile value to set. - * @return the ContainerGroupPropertiesUpdate object itself. - */ - public ContainerGroupPropertiesUpdate withContainerGroupProfile(ContainerGroupProfileUpdate containerGroupProfile) { - this.containerGroupProfile = containerGroupProfile; - return this; - } - - /** - * Get the subnetIds property: Specifies subnet Ids for container group. - * - * @return the subnetIds value. - */ - public List subnetIds() { - return this.subnetIds; - } - - /** - * Set the subnetIds property: Specifies subnet Ids for container group. - * - * @param subnetIds the subnetIds value to set. - * @return the ContainerGroupPropertiesUpdate object itself. - */ - public ContainerGroupPropertiesUpdate withSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerGroupProfile() != null) { - containerGroupProfile().validate(); - } - if (subnetIds() != null) { - subnetIds().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operation.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operation.java index 1bd666a98803f..bbc61240b12d8 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operation.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationDisplay.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationDisplay.java index 684a14d74a2c5..6680bfac18560 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationDisplay.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -8,38 +8,38 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Localized display information for this particular operation. + * Localized display information for and operation. */ @Immutable public final class OperationDisplay { /* * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "provider") private String provider; /* * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "resource") private String resource; /* * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "operation") private String operation; /* * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "description") private String description; /** * Creates an instance of OperationDisplay class. */ - public OperationDisplay() { + private OperationDisplay() { } /** diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operations.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operations.java index d7540656333ac..d66742ad093c7 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operations.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Origin.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Origin.java index 6691cce99e640..4ddbc86623b63 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Origin.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ProvisioningState.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ProvisioningState.java index c3bb0c9072ba5..be32a4681d35f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ProvisioningState.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/RefillPolicy.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/RefillPolicy.java index 8bf9d611ce70e..b0db024986132 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/RefillPolicy.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/RefillPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfile.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfile.java index 81673db1c3966..ebbce023e4139 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfile.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfileUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfileUpdate.java deleted file mode 100644 index a8671b2401530..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolElasticityProfileUpdate.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specifies the elasticity profile of the standby container group pools. - */ -@Fluent -public final class StandbyContainerGroupPoolElasticityProfileUpdate { - /* - * Specifies maximum number of standby container groups in the standby pool. - */ - @JsonProperty(value = "maxReadyCapacity") - private Long maxReadyCapacity; - - /* - * Specifies refill policy of the pool. - */ - @JsonProperty(value = "refillPolicy") - private RefillPolicy refillPolicy; - - /** - * Creates an instance of StandbyContainerGroupPoolElasticityProfileUpdate class. - */ - public StandbyContainerGroupPoolElasticityProfileUpdate() { - } - - /** - * Get the maxReadyCapacity property: Specifies maximum number of standby container groups in the standby pool. - * - * @return the maxReadyCapacity value. - */ - public Long maxReadyCapacity() { - return this.maxReadyCapacity; - } - - /** - * Set the maxReadyCapacity property: Specifies maximum number of standby container groups in the standby pool. - * - * @param maxReadyCapacity the maxReadyCapacity value to set. - * @return the StandbyContainerGroupPoolElasticityProfileUpdate object itself. - */ - public StandbyContainerGroupPoolElasticityProfileUpdate withMaxReadyCapacity(Long maxReadyCapacity) { - this.maxReadyCapacity = maxReadyCapacity; - return this; - } - - /** - * Get the refillPolicy property: Specifies refill policy of the pool. - * - * @return the refillPolicy value. - */ - public RefillPolicy refillPolicy() { - return this.refillPolicy; - } - - /** - * Set the refillPolicy property: Specifies refill policy of the pool. - * - * @param refillPolicy the refillPolicy value to set. - * @return the StandbyContainerGroupPoolElasticityProfileUpdate object itself. - */ - public StandbyContainerGroupPoolElasticityProfileUpdate withRefillPolicy(RefillPolicy refillPolicy) { - this.refillPolicy = refillPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResource.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResource.java index 4f7d8554cfb9d..afaee5bc50c98 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResource.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -239,9 +239,9 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the StandbyContainerGroupPoolResource.. + * Specifies the properties property: The properties property.. * - * @param properties The updatable properties of the StandbyContainerGroupPoolResource. + * @param properties The properties property. * @return the next definition stage. */ Update withProperties(StandbyContainerGroupPoolResourceUpdateProperties properties); diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceProperties.java index 277f3e251be57..82300135ca634 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdate.java index 48ac19c450a44..e9e677bb4b501 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdate.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -22,7 +22,7 @@ public final class StandbyContainerGroupPoolResourceUpdate { private Map tags; /* - * The updatable properties of the StandbyContainerGroupPoolResource. + * The properties property. */ @JsonProperty(value = "properties") private StandbyContainerGroupPoolResourceUpdateProperties properties; @@ -54,7 +54,7 @@ public StandbyContainerGroupPoolResourceUpdate withTags(Map tags } /** - * Get the properties property: The updatable properties of the StandbyContainerGroupPoolResource. + * Get the properties property: The properties property. * * @return the properties value. */ @@ -63,7 +63,7 @@ public StandbyContainerGroupPoolResourceUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the StandbyContainerGroupPoolResource. + * Set the properties property: The properties property. * * @param properties the properties value to set. * @return the StandbyContainerGroupPoolResourceUpdate object itself. diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdateProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdateProperties.java index e1fc264c275ac..1dc8db118795a 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdateProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPoolResourceUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -16,13 +16,13 @@ public final class StandbyContainerGroupPoolResourceUpdateProperties { * Specifies elasticity profile of standby container group pools. */ @JsonProperty(value = "elasticityProfile") - private StandbyContainerGroupPoolElasticityProfileUpdate elasticityProfile; + private StandbyContainerGroupPoolElasticityProfile elasticityProfile; /* * Specifies container group properties of standby container group pools. */ @JsonProperty(value = "containerGroupProperties") - private ContainerGroupPropertiesUpdate containerGroupProperties; + private ContainerGroupProperties containerGroupProperties; /** * Creates an instance of StandbyContainerGroupPoolResourceUpdateProperties class. @@ -35,7 +35,7 @@ public StandbyContainerGroupPoolResourceUpdateProperties() { * * @return the elasticityProfile value. */ - public StandbyContainerGroupPoolElasticityProfileUpdate elasticityProfile() { + public StandbyContainerGroupPoolElasticityProfile elasticityProfile() { return this.elasticityProfile; } @@ -46,7 +46,7 @@ public StandbyContainerGroupPoolElasticityProfileUpdate elasticityProfile() { * @return the StandbyContainerGroupPoolResourceUpdateProperties object itself. */ public StandbyContainerGroupPoolResourceUpdateProperties - withElasticityProfile(StandbyContainerGroupPoolElasticityProfileUpdate elasticityProfile) { + withElasticityProfile(StandbyContainerGroupPoolElasticityProfile elasticityProfile) { this.elasticityProfile = elasticityProfile; return this; } @@ -56,7 +56,7 @@ public StandbyContainerGroupPoolElasticityProfileUpdate elasticityProfile() { * * @return the containerGroupProperties value. */ - public ContainerGroupPropertiesUpdate containerGroupProperties() { + public ContainerGroupProperties containerGroupProperties() { return this.containerGroupProperties; } @@ -67,7 +67,7 @@ public ContainerGroupPropertiesUpdate containerGroupProperties() { * @return the StandbyContainerGroupPoolResourceUpdateProperties object itself. */ public StandbyContainerGroupPoolResourceUpdateProperties - withContainerGroupProperties(ContainerGroupPropertiesUpdate containerGroupProperties) { + withContainerGroupProperties(ContainerGroupProperties containerGroupProperties) { this.containerGroupProperties = containerGroupProperties; return this; } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPools.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPools.java index 2ca3b508aad01..8960626b8e4c3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPools.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyContainerGroupPools.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -13,101 +13,101 @@ */ public interface StandbyContainerGroupPools { /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyContainerGroupPoolResource along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, + String standbyContainerGroupPoolName, Context context); /** - * List StandbyContainerGroupPoolResource resources by subscription ID. + * Get a StandbyContainerGroupPoolResource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyContainerGroupPoolResource. */ - PagedIterable list(Context context); + StandbyContainerGroupPoolResource getByResourceGroup(String resourceGroupName, + String standbyContainerGroupPoolName); /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String standbyContainerGroupPoolName); /** - * List StandbyContainerGroupPoolResource resources by resource group. + * Delete a StandbyContainerGroupPoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String standbyContainerGroupPoolName, Context context); /** - * Get a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 StandbyContainerGroupPoolResource along with {@link Response}. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String standbyContainerGroupPoolName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. + * @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 StandbyContainerGroupPoolResource. + * @return the response of a StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - StandbyContainerGroupPoolResource getByResourceGroup(String resourceGroupName, - String standbyContainerGroupPoolName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. - * @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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String standbyContainerGroupPoolName); + PagedIterable list(); /** - * Delete a StandbyContainerGroupPoolResource. + * List StandbyContainerGroupPoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyContainerGroupPoolName Name of the standby container group pool. * @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 StandbyContainerGroupPoolResource list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String standbyContainerGroupPoolName, Context context); + PagedIterable list(Context context); /** * Get a StandbyContainerGroupPoolResource. diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfile.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfile.java index 4451a4cab6fae..7c83f50806aeb 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfile.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfileUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfileUpdate.java deleted file mode 100644 index 402010c7f65c7..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolElasticityProfileUpdate.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details of the elasticity profile. - */ -@Fluent -public final class StandbyVirtualMachinePoolElasticityProfileUpdate { - /* - * Specifies the maximum number of virtual machines in the standby virtual machine pool. - */ - @JsonProperty(value = "maxReadyCapacity") - private Long maxReadyCapacity; - - /** - * Creates an instance of StandbyVirtualMachinePoolElasticityProfileUpdate class. - */ - public StandbyVirtualMachinePoolElasticityProfileUpdate() { - } - - /** - * Get the maxReadyCapacity property: Specifies the maximum number of virtual machines in the standby virtual - * machine pool. - * - * @return the maxReadyCapacity value. - */ - public Long maxReadyCapacity() { - return this.maxReadyCapacity; - } - - /** - * Set the maxReadyCapacity property: Specifies the maximum number of virtual machines in the standby virtual - * machine pool. - * - * @param maxReadyCapacity the maxReadyCapacity value to set. - * @return the StandbyVirtualMachinePoolElasticityProfileUpdate object itself. - */ - public StandbyVirtualMachinePoolElasticityProfileUpdate withMaxReadyCapacity(Long maxReadyCapacity) { - this.maxReadyCapacity = maxReadyCapacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResource.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResource.java index a2fd445ef837c..3f2d4b8266f53 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResource.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -239,9 +239,9 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the StandbyVirtualMachinePoolResource.. + * Specifies the properties property: The properties property.. * - * @param properties The updatable properties of the StandbyVirtualMachinePoolResource. + * @param properties The properties property. * @return the next definition stage. */ Update withProperties(StandbyVirtualMachinePoolResourceUpdateProperties properties); diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceProperties.java index 715e122dc0dbb..0c36db064842d 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdate.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdate.java index 4dd33d35c58ab..78c8a8cf1df24 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdate.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -22,7 +22,7 @@ public final class StandbyVirtualMachinePoolResourceUpdate { private Map tags; /* - * The updatable properties of the StandbyVirtualMachinePoolResource. + * The properties property. */ @JsonProperty(value = "properties") private StandbyVirtualMachinePoolResourceUpdateProperties properties; @@ -54,7 +54,7 @@ public StandbyVirtualMachinePoolResourceUpdate withTags(Map tags } /** - * Get the properties property: The updatable properties of the StandbyVirtualMachinePoolResource. + * Get the properties property: The properties property. * * @return the properties value. */ @@ -63,7 +63,7 @@ public StandbyVirtualMachinePoolResourceUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the StandbyVirtualMachinePoolResource. + * Set the properties property: The properties property. * * @param properties the properties value to set. * @return the StandbyVirtualMachinePoolResourceUpdate object itself. diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdateProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdateProperties.java index 4d2c9ff50e680..d39f609d30113 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdateProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePoolResourceUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -16,7 +16,7 @@ public final class StandbyVirtualMachinePoolResourceUpdateProperties { * Specifies the elasticity profile of the standby virtual machine pools. */ @JsonProperty(value = "elasticityProfile") - private StandbyVirtualMachinePoolElasticityProfileUpdate elasticityProfile; + private StandbyVirtualMachinePoolElasticityProfile elasticityProfile; /* * Specifies the desired state of virtual machines in the pool. @@ -41,7 +41,7 @@ public StandbyVirtualMachinePoolResourceUpdateProperties() { * * @return the elasticityProfile value. */ - public StandbyVirtualMachinePoolElasticityProfileUpdate elasticityProfile() { + public StandbyVirtualMachinePoolElasticityProfile elasticityProfile() { return this.elasticityProfile; } @@ -52,7 +52,7 @@ public StandbyVirtualMachinePoolElasticityProfileUpdate elasticityProfile() { * @return the StandbyVirtualMachinePoolResourceUpdateProperties object itself. */ public StandbyVirtualMachinePoolResourceUpdateProperties - withElasticityProfile(StandbyVirtualMachinePoolElasticityProfileUpdate elasticityProfile) { + withElasticityProfile(StandbyVirtualMachinePoolElasticityProfile elasticityProfile) { this.elasticityProfile = elasticityProfile; return this; } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePools.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePools.java index 5b42f42fe9f51..001f20d15ea4f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePools.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachinePools.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -13,101 +13,101 @@ */ public interface StandbyVirtualMachinePools { /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachinePoolResource along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context); /** - * List StandbyVirtualMachinePoolResource resources by subscription ID. + * Get a StandbyVirtualMachinePoolResource. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachinePoolResource. */ - PagedIterable list(Context context); + StandbyVirtualMachinePoolResource getByResourceGroup(String resourceGroupName, + String standbyVirtualMachinePoolName); /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String standbyVirtualMachinePoolName); /** - * List StandbyVirtualMachinePoolResource resources by resource group. + * Delete a StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with - * {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String standbyVirtualMachinePoolName, Context context); /** - * Get a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 StandbyVirtualMachinePoolResource along with {@link Response}. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @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 StandbyVirtualMachinePoolResource. + * @return the response of a StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - StandbyVirtualMachinePoolResource getByResourceGroup(String resourceGroupName, - String standbyVirtualMachinePoolName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String standbyVirtualMachinePoolName); + PagedIterable list(); /** - * Delete a StandbyVirtualMachinePoolResource. + * List StandbyVirtualMachinePoolResource resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. * @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 StandbyVirtualMachinePoolResource list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String standbyVirtualMachinePoolName, Context context); + PagedIterable list(Context context); /** * Get a StandbyVirtualMachinePoolResource. diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResource.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResource.java index 012f2e4901397..0596cd4439dac 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResource.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceProperties.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceProperties.java index 70a66fdcb3b5f..0fd4a3043491b 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceProperties.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachineResourceProperties.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** * Details of the StandbyVirtualMachine. */ -@Fluent +@Immutable public final class StandbyVirtualMachineResourceProperties { /* * Resource id of the virtual machine. @@ -28,7 +28,7 @@ public final class StandbyVirtualMachineResourceProperties { /** * Creates an instance of StandbyVirtualMachineResourceProperties class. */ - public StandbyVirtualMachineResourceProperties() { + private StandbyVirtualMachineResourceProperties() { } /** @@ -40,17 +40,6 @@ public String virtualMachineResourceId() { return this.virtualMachineResourceId; } - /** - * Set the virtualMachineResourceId property: Resource id of the virtual machine. - * - * @param virtualMachineResourceId the virtualMachineResourceId value to set. - * @return the StandbyVirtualMachineResourceProperties object itself. - */ - public StandbyVirtualMachineResourceProperties withVirtualMachineResourceId(String virtualMachineResourceId) { - this.virtualMachineResourceId = virtualMachineResourceId; - return this; - } - /** * Get the provisioningState property: The status of the last operation. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachines.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachines.java index fe0802654dab4..27e2598ff279c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachines.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/StandbyVirtualMachines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; @@ -13,60 +13,60 @@ */ public interface StandbyVirtualMachines { /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. + * @param standbyVirtualMachineName Name of the standby virtual machine. + * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachineResource along with {@link Response}. */ - PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, - String standbyVirtualMachinePoolName); + Response getWithResponse(String resourceGroupName, + String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context); /** - * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. + * Get a StandbyVirtualMachineResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param context The context to associate with this operation. + * @param standbyVirtualMachineName Name of the standby virtual machine. * @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 StandbyVirtualMachineResource list operation as paginated response with - * {@link PagedIterable}. + * @return a StandbyVirtualMachineResource. */ - PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, - String standbyVirtualMachinePoolName, Context context); + StandbyVirtualMachineResource get(String resourceGroupName, String standbyVirtualMachinePoolName, + String standbyVirtualMachineName); /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. - * @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 StandbyVirtualMachineResource along with {@link Response}. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, - String standbyVirtualMachinePoolName, String standbyVirtualMachineName, Context context); + PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, + String standbyVirtualMachinePoolName); /** - * Get a StandbyVirtualMachineResource. + * List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param standbyVirtualMachinePoolName Name of the standby virtual machine pool. - * @param standbyVirtualMachineName Name of the standby virtual machine. + * @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 StandbyVirtualMachineResource. + * @return the response of a StandbyVirtualMachineResource list operation as paginated response with + * {@link PagedIterable}. */ - StandbyVirtualMachineResource get(String resourceGroupName, String standbyVirtualMachinePoolName, - String standbyVirtualMachineName); + PagedIterable listByStandbyVirtualMachinePoolResource(String resourceGroupName, + String standbyVirtualMachinePoolName, Context context); } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Subnet.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Subnet.java index cd68bed51adbb..d794541b4220d 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Subnet.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/Subnet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/VirtualMachineState.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/VirtualMachineState.java index 229d3599a8c9a..2cb8e5aac3a67 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/VirtualMachineState.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/VirtualMachineState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/package-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/package-info.java index ec506ecc64be6..7e8a7a68480d0 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/package-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for StandbyPoolMgmtClient. - * null. + * Package containing the data models for StandbyPool. */ package com.azure.resourcemanager.standbypool.models; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/package-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/package-info.java index 9e0a23a5a4f71..3378ad94d7e35 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/package-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/com/azure/resourcemanager/standbypool/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for StandbyPoolMgmtClient. - * null. + * Package containing the classes for StandbyPool. */ package com.azure.resourcemanager.standbypool; diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/module-info.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/module-info.java index 8093c3a3da840..30a8e6ac9a7ca 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/module-info.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.standbypool { requires transitive com.azure.core.management; @@ -10,4 +10,5 @@ exports com.azure.resourcemanager.standbypool.models; opens com.azure.resourcemanager.standbypool.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.standbypool.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.standbypool.implementation.models to com.azure.core, com.fasterxml.jackson.databind; } \ No newline at end of file diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/proxy-config.json b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/proxy-config.json index 1dfc20cb21a5a..5d58640c6871a 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/proxy-config.json +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.standbypool.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyContainerGroupPoolsClientImpl$StandbyContainerGroupPoolsService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinePoolsClientImpl$StandbyVirtualMachinePoolsService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinesClientImpl$StandbyVirtualMachinesService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.standbypool.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinePoolsClientImpl$StandbyVirtualMachinePoolsService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinesClientImpl$StandbyVirtualMachinesService" ], [ "com.azure.resourcemanager.standbypool.implementation.StandbyContainerGroupPoolsClientImpl$StandbyContainerGroupPoolsService" ] ] \ No newline at end of file diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/reflect-config.json b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/reflect-config.json index b5ba3aa4ae1a9..f4c9cd48c02dd 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/reflect-config.json +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-standbypool/reflect-config.json @@ -1,5 +1,5 @@ [ { - "name" : "com.azure.resourcemanager.standbypool.models.OperationListResult", + "name" : "com.azure.resourcemanager.standbypool.implementation.models.PagedOperation", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -14,112 +14,92 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupProperties", + "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachinePoolResourceInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupProfile", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.Subnet", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceListResult", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdate", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachinePoolResourceInner", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceProperties", + "name" : "com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachinePoolResourceListResult", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile", + "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdate", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties", + "name" : "com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachineResourceListResult", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate", + "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolResourceInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdate", + "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties", + "name" : "com.azure.resourcemanager.standbypool.models.ContainerGroupProfile", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate", + "name" : "com.azure.resourcemanager.standbypool.models.Subnet", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceListResult", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdate", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner", + "name" : "com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceProperties", + "name" : "com.azure.resourcemanager.standbypool.implementation.models.StandbyContainerGroupPoolResourceListResult", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -134,7 +114,7 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.RefillPolicy", + "name" : "com.azure.resourcemanager.standbypool.models.VirtualMachineState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -144,7 +124,7 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.standbypool.models.VirtualMachineState", + "name" : "com.azure.resourcemanager.standbypool.models.RefillPolicy", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/OperationsListSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/OperationsListSamples.java index 03cd51799ce99..4a9ba3fbbb367 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/OperationsListSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for Operations List. */ public final class OperationsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/Operations_List.json - */ /** * Sample code: Operations_List. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateSamples.java index fc8de3eb7104c..d0bffb1d59451 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -18,9 +18,6 @@ * Samples for StandbyContainerGroupPools CreateOrUpdate. */ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_CreateOrUpdate.json - */ /** * Sample code: StandbyContainerGroupPools_CreateOrUpdate. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsDeleteSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsDeleteSamples.java index 126cec58524fa..2bc63664d9e3d 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsDeleteSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyContainerGroupPools Delete. */ public final class StandbyContainerGroupPoolsDeleteSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Delete.json - */ /** * Sample code: StandbyContainerGroupPools_Delete. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupSamples.java index 835e8ad878334..6cbda34cc074a 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyContainerGroupPools GetByResourceGroup. */ public final class StandbyContainerGroupPoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Get.json - */ /** * Sample code: StandbyContainerGroupPools_Get. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupSamples.java index 16d9c9243463b..f889273c69598 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyContainerGroupPools ListByResourceGroup. */ public final class StandbyContainerGroupPoolsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListByResourceGroup.json - */ /** * Sample code: StandbyContainerGroupPools_ListByResourceGroup. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListSamples.java index 7ed0cc52b4f67..aba2241968335 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyContainerGroupPools List. */ public final class StandbyContainerGroupPoolsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListBySubscription.json - */ /** * Sample code: StandbyContainerGroupPools_ListBySubscription. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsUpdateSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsUpdateSamples.java index 79f4f279e6137..c3ce6c994f2d4 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsUpdateSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsUpdateSamples.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties; import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResource; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.Subnet; @@ -19,9 +19,6 @@ * Samples for StandbyContainerGroupPools Update. */ public final class StandbyContainerGroupPoolsUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Update.json - */ /** * Sample code: StandbyContainerGroupPools_Update. * @@ -35,11 +32,10 @@ public final class StandbyContainerGroupPoolsUpdateSamples { resource.update() .withTags(mapOf()) .withProperties(new StandbyContainerGroupPoolResourceUpdateProperties() - .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(1743L) - .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupPropertiesUpdate() - .withContainerGroupProfile(new ContainerGroupProfileUpdate().withId( + .withElasticityProfile(new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(1743L) + .withRefillPolicy(RefillPolicy.ALWAYS)) + .withContainerGroupProperties(new ContainerGroupProperties() + .withContainerGroupProfile(new ContainerGroupProfile().withId( "/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile") .withRevision(2L)) .withSubnetIds(Arrays.asList(new Subnet().withId( diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateSamples.java index a554a9f871559..fd89cf2f2b1b5 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -14,9 +14,6 @@ * Samples for StandbyVirtualMachinePools CreateOrUpdate. */ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_CreateOrUpdate.json - */ /** * Sample code: StandbyVirtualMachinePools_CreateOrUpdate. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsDeleteSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsDeleteSamples.java index 920b73c57bbd7..39d2808e35050 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsDeleteSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachinePools Delete. */ public final class StandbyVirtualMachinePoolsDeleteSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Delete.json - */ /** * Sample code: StandbyVirtualMachinePools_Delete. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupSamples.java index 01af1bb5584cf..257044358ca4f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachinePools GetByResourceGroup. */ public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Get.json - */ /** * Sample code: StandbyVirtualMachinePools_Get. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupSamples.java index 9f91a4a249211..685076633e90c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachinePools ListByResourceGroup. */ public final class StandbyVirtualMachinePoolsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListByResourceGroup.json - */ /** * Sample code: StandbyVirtualMachinePools_ListByResourceGroup. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListSamples.java index 42628d98e5fc4..615da4783c518 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachinePools List. */ public final class StandbyVirtualMachinePoolsListSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListBySubscription.json - */ /** * Sample code: StandbyVirtualMachinePools_ListBySubscription. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsUpdateSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsUpdateSamples.java index fd4e928c408eb..6701306d16886 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsUpdateSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsUpdateSamples.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResource; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.VirtualMachineState; @@ -15,9 +15,6 @@ * Samples for StandbyVirtualMachinePools Update. */ public final class StandbyVirtualMachinePoolsUpdateSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Update.json - */ /** * Sample code: StandbyVirtualMachinePools_Update. * @@ -31,8 +28,7 @@ public final class StandbyVirtualMachinePoolsUpdateSamples { resource.update() .withTags(mapOf()) .withProperties(new StandbyVirtualMachinePoolResourceUpdateProperties() - .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(304L)) + .withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L)) .withVirtualMachineState(VirtualMachineState.RUNNING) .withAttachedVirtualMachineScaleSetId( "/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss")) diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetSamples.java index d5d8b5a036f97..0149b60adcf6d 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachines Get. */ public final class StandbyVirtualMachinesGetSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_Get.json - */ /** * Sample code: StandbyVirtualMachines_Get. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples.java index 8d4aafa3332b7..7f9aa2c44725a 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/samples/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -8,9 +8,6 @@ * Samples for StandbyVirtualMachines ListByStandbyVirtualMachinePoolResource. */ public final class StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples { - /* - * x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json - */ /** * Sample code: StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource. * diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileTests.java index 5d58bfa6013af..89a9608a7848b 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -11,17 +11,18 @@ public final class ContainerGroupProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ContainerGroupProfile model = BinaryData.fromString("{\"id\":\"v\",\"revision\":736999913427384233}") + ContainerGroupProfile model = BinaryData.fromString("{\"id\":\"jaoyfhrtx\",\"revision\":1026697425330169103}") .toObject(ContainerGroupProfile.class); - Assertions.assertEquals("v", model.id()); - Assertions.assertEquals(736999913427384233L, model.revision()); + Assertions.assertEquals("jaoyfhrtx", model.id()); + Assertions.assertEquals(1026697425330169103L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContainerGroupProfile model = new ContainerGroupProfile().withId("v").withRevision(736999913427384233L); + ContainerGroupProfile model + = new ContainerGroupProfile().withId("jaoyfhrtx").withRevision(1026697425330169103L); model = BinaryData.fromObject(model).toObject(ContainerGroupProfile.class); - Assertions.assertEquals("v", model.id()); - Assertions.assertEquals(736999913427384233L, model.revision()); + Assertions.assertEquals("jaoyfhrtx", model.id()); + Assertions.assertEquals(1026697425330169103L, model.revision()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileUpdateTests.java deleted file mode 100644 index 3761534e2ad21..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupProfileUpdateTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import org.junit.jupiter.api.Assertions; - -public final class ContainerGroupProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerGroupProfileUpdate model - = BinaryData.fromString("{\"id\":\"csglum\",\"revision\":7673414974614237227}") - .toObject(ContainerGroupProfileUpdate.class); - Assertions.assertEquals("csglum", model.id()); - Assertions.assertEquals(7673414974614237227L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerGroupProfileUpdate model - = new ContainerGroupProfileUpdate().withId("csglum").withRevision(7673414974614237227L); - model = BinaryData.fromObject(model).toObject(ContainerGroupProfileUpdate.class); - Assertions.assertEquals("csglum", model.id()); - Assertions.assertEquals(7673414974614237227L, model.revision()); - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesTests.java index 6412aa315bd5c..c205b1e936e42 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -15,22 +15,22 @@ public final class ContainerGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContainerGroupProperties model = BinaryData.fromString( - "{\"containerGroupProfile\":{\"id\":\"ihnhun\",\"revision\":4957035002722095413},\"subnetIds\":[{\"id\":\"nfygxgispemvtz\"},{\"id\":\"kufubljo\"},{\"id\":\"xqeofjaeqjhqjba\"}]}") + "{\"containerGroupProfile\":{\"id\":\"xppbhtqqro\",\"revision\":683948345631958154},\"subnetIds\":[{\"id\":\"algbquxigjyjg\"}]}") .toObject(ContainerGroupProperties.class); - Assertions.assertEquals("ihnhun", model.containerGroupProfile().id()); - Assertions.assertEquals(4957035002722095413L, model.containerGroupProfile().revision()); - Assertions.assertEquals("nfygxgispemvtz", model.subnetIds().get(0).id()); + Assertions.assertEquals("xppbhtqqro", model.containerGroupProfile().id()); + Assertions.assertEquals(683948345631958154L, model.containerGroupProfile().revision()); + Assertions.assertEquals("algbquxigjyjg", model.subnetIds().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ContainerGroupProperties model = new ContainerGroupProperties() - .withContainerGroupProfile(new ContainerGroupProfile().withId("ihnhun").withRevision(4957035002722095413L)) - .withSubnetIds(Arrays.asList(new Subnet().withId("nfygxgispemvtz"), new Subnet().withId("kufubljo"), - new Subnet().withId("xqeofjaeqjhqjba"))); + .withContainerGroupProfile( + new ContainerGroupProfile().withId("xppbhtqqro").withRevision(683948345631958154L)) + .withSubnetIds(Arrays.asList(new Subnet().withId("algbquxigjyjg"))); model = BinaryData.fromObject(model).toObject(ContainerGroupProperties.class); - Assertions.assertEquals("ihnhun", model.containerGroupProfile().id()); - Assertions.assertEquals(4957035002722095413L, model.containerGroupProfile().revision()); - Assertions.assertEquals("nfygxgispemvtz", model.subnetIds().get(0).id()); + Assertions.assertEquals("xppbhtqqro", model.containerGroupProfile().id()); + Assertions.assertEquals(683948345631958154L, model.containerGroupProfile().revision()); + Assertions.assertEquals("algbquxigjyjg", model.subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesUpdateTests.java deleted file mode 100644 index 428e2b264e6ae..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/ContainerGroupPropertiesUpdateTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate; -import com.azure.resourcemanager.standbypool.models.Subnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerGroupPropertiesUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerGroupPropertiesUpdate model = BinaryData.fromString( - "{\"containerGroupProfile\":{\"id\":\"pku\",\"revision\":4136441469801788105},\"subnetIds\":[{\"id\":\"hbzhfepg\"},{\"id\":\"gqexzlocxs\"},{\"id\":\"paierh\"}]}") - .toObject(ContainerGroupPropertiesUpdate.class); - Assertions.assertEquals("pku", model.containerGroupProfile().id()); - Assertions.assertEquals(4136441469801788105L, model.containerGroupProfile().revision()); - Assertions.assertEquals("hbzhfepg", model.subnetIds().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerGroupPropertiesUpdate model = new ContainerGroupPropertiesUpdate() - .withContainerGroupProfile( - new ContainerGroupProfileUpdate().withId("pku").withRevision(4136441469801788105L)) - .withSubnetIds(Arrays.asList(new Subnet().withId("hbzhfepg"), new Subnet().withId("gqexzlocxs"), - new Subnet().withId("paierh"))); - model = BinaryData.fromObject(model).toObject(ContainerGroupPropertiesUpdate.class); - Assertions.assertEquals("pku", model.containerGroupProfile().id()); - Assertions.assertEquals(4136441469801788105L, model.containerGroupProfile().revision()); - Assertions.assertEquals("hbzhfepg", model.subnetIds().get(0).id()); - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationDisplayTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationDisplayTests.java index e6e740d514010..06f77afcdb6a1 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationDisplayTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationDisplayTests.java @@ -1,23 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.standbypool.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + Assertions.assertEquals("cdm", model.provider()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.resource()); + Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); + Assertions.assertEquals("kknryrtihf", model.description()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationInnerTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationInnerTests.java index 0505f1242a053..1a8ff8c70f6b7 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationInnerTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationInnerTests.java @@ -1,24 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.standbypool.fluent.models.OperationInner; -import com.azure.resourcemanager.standbypool.models.OperationDisplay; +import com.azure.resourcemanager.standbypool.models.ActionType; +import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); + Assertions.assertEquals("eqsrdeupewnwreit", model.display().provider()); + Assertions.assertEquals("yflusarhmofc", model.display().resource()); + Assertions.assertEquals("smy", model.display().operation()); + Assertions.assertEquals("kdtmlxhekuk", model.display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.actionType()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationListResultTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationListResultTests.java deleted file mode 100644 index 1d73b3f15de0a..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationsListMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationsListMockTests.java index f20fe49159201..0e561f61d458e 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationsListMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -11,9 +11,11 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.standbypool.StandbyPoolManager; +import com.azure.resourcemanager.standbypool.models.ActionType; import com.azure.resourcemanager.standbypool.models.Operation; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"m\",\"isDataAction\":true,\"display\":{\"provider\":\"ayvvtpgvdf\",\"resource\":\"otkftutqxlngx\",\"operation\":\"fgugnxkrxdqmid\",\"description\":\"hzrvqd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"orcjxvsnby\",\"isDataAction\":true,\"display\":{\"provider\":\"mocpc\",\"resource\":\"hurzafblj\",\"operation\":\"pbtoqcjmkl\",\"description\":\"vbqid\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,5 +34,10 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + Assertions.assertEquals("mocpc", response.iterator().next().display().provider()); + Assertions.assertEquals("hurzafblj", response.iterator().next().display().resource()); + Assertions.assertEquals("pbtoqcjmkl", response.iterator().next().display().operation()); + Assertions.assertEquals("vbqid", response.iterator().next().display().description()); + Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/PagedOperationTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/PagedOperationTests.java new file mode 100644 index 0000000000000..91f6b7be1df48 --- /dev/null +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/PagedOperationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.standbypool.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.standbypool.implementation.models.PagedOperation; +import com.azure.resourcemanager.standbypool.models.ActionType; +import org.junit.jupiter.api.Assertions; + +public final class PagedOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PagedOperation model = BinaryData.fromString( + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") + .toObject(PagedOperation.class); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().resource()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType()); + Assertions.assertEquals("kfo", model.nextLink()); + } +} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileTests.java index f0a38b5013cde..6acfd0a1bf5db 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -13,19 +13,19 @@ public final class StandbyContainerGroupPoolElasticityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolElasticityProfile model - = BinaryData.fromString("{\"maxReadyCapacity\":7383356325506438565,\"refillPolicy\":\"always\"}") + = BinaryData.fromString("{\"maxReadyCapacity\":5837880679371880466,\"refillPolicy\":\"always\"}") .toObject(StandbyContainerGroupPoolElasticityProfile.class); - Assertions.assertEquals(7383356325506438565L, model.maxReadyCapacity()); + Assertions.assertEquals(5837880679371880466L, model.maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.refillPolicy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyContainerGroupPoolElasticityProfile model - = new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(7383356325506438565L) + = new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(5837880679371880466L) .withRefillPolicy(RefillPolicy.ALWAYS); model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolElasticityProfile.class); - Assertions.assertEquals(7383356325506438565L, model.maxReadyCapacity()); + Assertions.assertEquals(5837880679371880466L, model.maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.refillPolicy()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileUpdateTests.java deleted file mode 100644 index 95e247952c7a9..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolElasticityProfileUpdateTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate; -import org.junit.jupiter.api.Assertions; - -public final class StandbyContainerGroupPoolElasticityProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StandbyContainerGroupPoolElasticityProfileUpdate model - = BinaryData.fromString("{\"maxReadyCapacity\":5933346331608386156,\"refillPolicy\":\"always\"}") - .toObject(StandbyContainerGroupPoolElasticityProfileUpdate.class); - Assertions.assertEquals(5933346331608386156L, model.maxReadyCapacity()); - Assertions.assertEquals(RefillPolicy.ALWAYS, model.refillPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyContainerGroupPoolElasticityProfileUpdate model - = new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(5933346331608386156L) - .withRefillPolicy(RefillPolicy.ALWAYS); - model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolElasticityProfileUpdate.class); - Assertions.assertEquals(5933346331608386156L, model.maxReadyCapacity()); - Assertions.assertEquals(RefillPolicy.ALWAYS, model.refillPolicy()); - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceInnerTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceInnerTests.java index d474f7b018974..42211a21161fe 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceInnerTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -21,43 +21,41 @@ public final class StandbyContainerGroupPoolResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolResourceInner model = BinaryData.fromString( - "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5542281940735361287,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"hulsuuvmkjozkrwf\",\"revision\":5592682497166327417},\"subnetIds\":[{\"id\":\"pslwejdpvw\"},{\"id\":\"yoqpsoaccta\"}]},\"provisioningState\":\"Failed\"},\"location\":\"j\",\"tags\":{\"sy\":\"bcryffdfd\",\"jakhmsbzjh\":\"expa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\"},\"id\":\"wfzitonpeqfpjk\",\"name\":\"lxofpdvhpfxxypin\",\"type\":\"nmayhuybb\"}") + "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5709229519327126665,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"fkgiawxk\",\"revision\":3283985932829658956},\"subnetIds\":[{\"id\":\"ckbasyypndd\"},{\"id\":\"sgcbac\"},{\"id\":\"hejkotynqgou\"}]},\"provisioningState\":\"Failed\"},\"location\":\"likwyqkgfgib\",\"tags\":{\"yb\":\"gakeqsr\"},\"id\":\"qqedqytbciqfou\",\"name\":\"lmmnkzsmodmglo\",\"type\":\"gpbkwtmut\"}") .toObject(StandbyContainerGroupPoolResourceInner.class); - Assertions.assertEquals("j", model.location()); - Assertions.assertEquals("bcryffdfd", model.tags().get("sy")); - Assertions.assertEquals(5542281940735361287L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("likwyqkgfgib", model.location()); + Assertions.assertEquals("gakeqsr", model.tags().get("yb")); + Assertions.assertEquals(5709229519327126665L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("hulsuuvmkjozkrwf", - model.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(5592682497166327417L, + Assertions.assertEquals("fkgiawxk", model.properties().containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(3283985932829658956L, model.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("pslwejdpvw", model.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("ckbasyypndd", model.properties().containerGroupProperties().subnetIds().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StandbyContainerGroupPoolResourceInner model = new StandbyContainerGroupPoolResourceInner().withLocation("j") - .withTags(mapOf("sy", "bcryffdfd", "jakhmsbzjh", "expa", "hqtrgqjbpf", "rzevdphlxaol", "tfell", - "fsinzgvfcjrwzoxx")) - .withProperties(new StandbyContainerGroupPoolResourceProperties() - .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(5542281940735361287L) - .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupProperties() - .withContainerGroupProfile( - new ContainerGroupProfile().withId("hulsuuvmkjozkrwf").withRevision(5592682497166327417L)) - .withSubnetIds( - Arrays.asList(new Subnet().withId("pslwejdpvw"), new Subnet().withId("yoqpsoaccta"))))); + StandbyContainerGroupPoolResourceInner model + = new StandbyContainerGroupPoolResourceInner().withLocation("likwyqkgfgib") + .withTags(mapOf("yb", "gakeqsr")) + .withProperties(new StandbyContainerGroupPoolResourceProperties() + .withElasticityProfile( + new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(5709229519327126665L) + .withRefillPolicy(RefillPolicy.ALWAYS)) + .withContainerGroupProperties(new ContainerGroupProperties() + .withContainerGroupProfile( + new ContainerGroupProfile().withId("fkgiawxk").withRevision(3283985932829658956L)) + .withSubnetIds(Arrays.asList(new Subnet().withId("ckbasyypndd"), new Subnet().withId("sgcbac"), + new Subnet().withId("hejkotynqgou"))))); model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolResourceInner.class); - Assertions.assertEquals("j", model.location()); - Assertions.assertEquals("bcryffdfd", model.tags().get("sy")); - Assertions.assertEquals(5542281940735361287L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("likwyqkgfgib", model.location()); + Assertions.assertEquals("gakeqsr", model.tags().get("yb")); + Assertions.assertEquals(5709229519327126665L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("hulsuuvmkjozkrwf", - model.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(5592682497166327417L, + Assertions.assertEquals("fkgiawxk", model.properties().containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(3283985932829658956L, model.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("pslwejdpvw", model.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("ckbasyypndd", model.properties().containerGroupProperties().subnetIds().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceListResultTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceListResultTests.java index ccbcfe80ee4ec..e5899e353d7f3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceListResultTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceListResultTests.java @@ -1,83 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.fluent.models.StandbyContainerGroupPoolResourceInner; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyContainerGroupPoolResourceListResult; import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceListResult; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceProperties; -import com.azure.resourcemanager.standbypool.models.Subnet; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class StandbyContainerGroupPoolResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":3259510585978002788,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"xqhabi\",\"revision\":4747702920878176636},\"subnetIds\":[{\"id\":\"czbysc\"},{\"id\":\"pqxu\"}]},\"provisioningState\":\"Succeeded\"},\"location\":\"qniwbybrkxvdumj\",\"tags\":{\"gaudcc\":\"fwvuk\",\"kryhtnapczwlokj\":\"nhsjcnyej\",\"jnchgej\":\"emkkvnipjox\"},\"id\":\"podmailzydehojwy\",\"name\":\"huxinpmqnj\",\"type\":\"qwixjspro\"}],\"nextLink\":\"cputegjvwmfdats\"}") + "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2296241037768956178,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"dzuhtymwi\",\"revision\":2965143483329278673},\"subnetIds\":[{\"id\":\"wxmnteiwao\"},{\"id\":\"vkmijcmmxdcuf\"},{\"id\":\"fsrpymzidnse\"}]},\"provisioningState\":\"Deleting\"},\"location\":\"bzsgfyccsne\",\"tags\":{\"oosflnr\":\"wzjeiach\",\"vypyqrimzinpv\":\"sfqpteehz\",\"rsoodqxhcrmnoh\":\"wjdk\"},\"id\":\"t\",\"name\":\"kwh\",\"type\":\"soifiyipjxsqw\"}],\"nextLink\":\"rjb\"}") .toObject(StandbyContainerGroupPoolResourceListResult.class); - Assertions.assertEquals("qniwbybrkxvdumj", model.value().get(0).location()); - Assertions.assertEquals("fwvuk", model.value().get(0).tags().get("gaudcc")); - Assertions.assertEquals(3259510585978002788L, + Assertions.assertEquals("bzsgfyccsne", model.value().get(0).location()); + Assertions.assertEquals("wzjeiach", model.value().get(0).tags().get("oosflnr")); + Assertions.assertEquals(2296241037768956178L, model.value().get(0).properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.value().get(0).properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("xqhabi", + Assertions.assertEquals("dzuhtymwi", model.value().get(0).properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(4747702920878176636L, + Assertions.assertEquals(2965143483329278673L, model.value().get(0).properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("czbysc", + Assertions.assertEquals("wxmnteiwao", model.value().get(0).properties().containerGroupProperties().subnetIds().get(0).id()); - Assertions.assertEquals("cputegjvwmfdats", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyContainerGroupPoolResourceListResult model = new StandbyContainerGroupPoolResourceListResult() - .withValue(Arrays.asList(new StandbyContainerGroupPoolResourceInner().withLocation("qniwbybrkxvdumj") - .withTags(mapOf("gaudcc", "fwvuk", "kryhtnapczwlokj", "nhsjcnyej", "jnchgej", "emkkvnipjox")) - .withProperties(new StandbyContainerGroupPoolResourceProperties() - .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(3259510585978002788L) - .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupProperties() - .withContainerGroupProfile( - new ContainerGroupProfile().withId("xqhabi").withRevision(4747702920878176636L)) - .withSubnetIds(Arrays.asList(new Subnet().withId("czbysc"), new Subnet().withId("pqxu"))))))) - .withNextLink("cputegjvwmfdats"); - model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolResourceListResult.class); - Assertions.assertEquals("qniwbybrkxvdumj", model.value().get(0).location()); - Assertions.assertEquals("fwvuk", model.value().get(0).tags().get("gaudcc")); - Assertions.assertEquals(3259510585978002788L, - model.value().get(0).properties().elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(RefillPolicy.ALWAYS, - model.value().get(0).properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("xqhabi", - model.value().get(0).properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(4747702920878176636L, - model.value().get(0).properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("czbysc", - model.value().get(0).properties().containerGroupProperties().subnetIds().get(0).id()); - Assertions.assertEquals("cputegjvwmfdats", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("rjb", model.nextLink()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourcePropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourcePropertiesTests.java index 14c2082985566..5ca24587efbac 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourcePropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourcePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -18,31 +18,31 @@ public final class StandbyContainerGroupPoolResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolResourceProperties model = BinaryData.fromString( - "{\"elasticityProfile\":{\"maxReadyCapacity\":7787978777429211563,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"po\",\"revision\":4106452916609629681},\"subnetIds\":[{\"id\":\"amiheognarxz\"},{\"id\":\"theotusiv\"}]},\"provisioningState\":\"Succeeded\"}") + "{\"elasticityProfile\":{\"maxReadyCapacity\":6598359226941135232,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"ap\",\"revision\":4447095824411046688},\"subnetIds\":[{\"id\":\"ertumkdo\"},{\"id\":\"vqwhbmdgbbjfd\"}]},\"provisioningState\":\"Canceled\"}") .toObject(StandbyContainerGroupPoolResourceProperties.class); - Assertions.assertEquals(7787978777429211563L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(6598359226941135232L, model.elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.elasticityProfile().refillPolicy()); - Assertions.assertEquals("po", model.containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(4106452916609629681L, + Assertions.assertEquals("ap", model.containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(4447095824411046688L, model.containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("amiheognarxz", model.containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("ertumkdo", model.containerGroupProperties().subnetIds().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyContainerGroupPoolResourceProperties model = new StandbyContainerGroupPoolResourceProperties() .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(7787978777429211563L) + new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(6598359226941135232L) .withRefillPolicy(RefillPolicy.ALWAYS)) .withContainerGroupProperties(new ContainerGroupProperties() - .withContainerGroupProfile(new ContainerGroupProfile().withId("po").withRevision(4106452916609629681L)) - .withSubnetIds(Arrays.asList(new Subnet().withId("amiheognarxz"), new Subnet().withId("theotusiv")))); + .withContainerGroupProfile(new ContainerGroupProfile().withId("ap").withRevision(4447095824411046688L)) + .withSubnetIds(Arrays.asList(new Subnet().withId("ertumkdo"), new Subnet().withId("vqwhbmdgbbjfd")))); model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolResourceProperties.class); - Assertions.assertEquals(7787978777429211563L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(6598359226941135232L, model.elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.elasticityProfile().refillPolicy()); - Assertions.assertEquals("po", model.containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(4106452916609629681L, + Assertions.assertEquals("ap", model.containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(4447095824411046688L, model.containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("amiheognarxz", model.containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("ertumkdo", model.containerGroupProperties().subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdatePropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdatePropertiesTests.java index 154e4fc555860..55028a2485483 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdatePropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdatePropertiesTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties; import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.Subnet; import java.util.Arrays; @@ -18,14 +18,14 @@ public final class StandbyContainerGroupPoolResourceUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolResourceUpdateProperties model = BinaryData.fromString( - "{\"elasticityProfile\":{\"maxReadyCapacity\":73742112490406036,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"znorcj\",\"revision\":3202297530026478124},\"subnetIds\":[{\"id\":\"xqabnmocpcysh\"},{\"id\":\"rzafbljjgpbtoqcj\"},{\"id\":\"klj\"},{\"id\":\"vbqid\"}]}}") + "{\"elasticityProfile\":{\"maxReadyCapacity\":1326110633733318383,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"muouqfp\",\"revision\":1346703559786740146},\"subnetIds\":[{\"id\":\"g\"},{\"id\":\"itnwuizgazxufi\"},{\"id\":\"uckyf\"},{\"id\":\"hr\"}]}}") .toObject(StandbyContainerGroupPoolResourceUpdateProperties.class); - Assertions.assertEquals(73742112490406036L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(1326110633733318383L, model.elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.elasticityProfile().refillPolicy()); - Assertions.assertEquals("znorcj", model.containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(3202297530026478124L, + Assertions.assertEquals("muouqfp", model.containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(1346703559786740146L, model.containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("xqabnmocpcysh", model.containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("g", model.containerGroupProperties().subnetIds().get(0).id()); } @org.junit.jupiter.api.Test @@ -33,20 +33,19 @@ public void testSerialize() throws Exception { StandbyContainerGroupPoolResourceUpdateProperties model = new StandbyContainerGroupPoolResourceUpdateProperties() .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(73742112490406036L) + new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(1326110633733318383L) .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupPropertiesUpdate() + .withContainerGroupProperties(new ContainerGroupProperties() .withContainerGroupProfile( - new ContainerGroupProfileUpdate().withId("znorcj").withRevision(3202297530026478124L)) - .withSubnetIds( - Arrays.asList(new Subnet().withId("xqabnmocpcysh"), new Subnet().withId("rzafbljjgpbtoqcj"), - new Subnet().withId("klj"), new Subnet().withId("vbqid")))); + new ContainerGroupProfile().withId("muouqfp").withRevision(1346703559786740146L)) + .withSubnetIds(Arrays.asList(new Subnet().withId("g"), new Subnet().withId("itnwuizgazxufi"), + new Subnet().withId("uckyf"), new Subnet().withId("hr")))); model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolResourceUpdateProperties.class); - Assertions.assertEquals(73742112490406036L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(1326110633733318383L, model.elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.elasticityProfile().refillPolicy()); - Assertions.assertEquals("znorcj", model.containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(3202297530026478124L, + Assertions.assertEquals("muouqfp", model.containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(1346703559786740146L, model.containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("xqabnmocpcysh", model.containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("g", model.containerGroupProperties().subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdateTests.java index d6b2e15e148ca..c62032e950e56 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdateTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolResourceUpdateTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate; -import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile; +import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties; import com.azure.resourcemanager.standbypool.models.RefillPolicy; -import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdate; import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.Subnet; @@ -21,38 +21,36 @@ public final class StandbyContainerGroupPoolResourceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyContainerGroupPoolResourceUpdate model = BinaryData.fromString( - "{\"tags\":{\"jcmmxdcufufsrp\":\"km\",\"sgfyccsnew\":\"mzidnsezcxtb\",\"oosflnr\":\"dwzjeiach\",\"vypyqrimzinpv\":\"sfqpteehz\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2324275574179750664,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"qxhcrmn\",\"revision\":661111027301241875},\"subnetIds\":[{\"id\":\"whdsoifiyip\"}]}}}") + "{\"tags\":{\"fqawrlyxw\":\"eju\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4891061322345208982,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"b\",\"revision\":85796477749100882},\"subnetIds\":[{\"id\":\"vpys\"},{\"id\":\"zdn\"}]}}}") .toObject(StandbyContainerGroupPoolResourceUpdate.class); - Assertions.assertEquals("km", model.tags().get("jcmmxdcufufsrp")); - Assertions.assertEquals(2324275574179750664L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("eju", model.tags().get("fqawrlyxw")); + Assertions.assertEquals(4891061322345208982L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("qxhcrmn", model.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(661111027301241875L, + Assertions.assertEquals("b", model.properties().containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(85796477749100882L, model.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("whdsoifiyip", model.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("vpys", model.properties().containerGroupProperties().subnetIds().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyContainerGroupPoolResourceUpdate model = new StandbyContainerGroupPoolResourceUpdate() - .withTags(mapOf("jcmmxdcufufsrp", "km", "sgfyccsnew", "mzidnsezcxtb", "oosflnr", "dwzjeiach", - "vypyqrimzinpv", "sfqpteehz")) + .withTags(mapOf("fqawrlyxw", "eju")) .withProperties(new StandbyContainerGroupPoolResourceUpdateProperties() .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(2324275574179750664L) + new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(4891061322345208982L) .withRefillPolicy(RefillPolicy.ALWAYS)) - .withContainerGroupProperties(new ContainerGroupPropertiesUpdate() - .withContainerGroupProfile( - new ContainerGroupProfileUpdate().withId("qxhcrmn").withRevision(661111027301241875L)) - .withSubnetIds(Arrays.asList(new Subnet().withId("whdsoifiyip"))))); + .withContainerGroupProperties(new ContainerGroupProperties() + .withContainerGroupProfile(new ContainerGroupProfile().withId("b").withRevision(85796477749100882L)) + .withSubnetIds(Arrays.asList(new Subnet().withId("vpys"), new Subnet().withId("zdn"))))); model = BinaryData.fromObject(model).toObject(StandbyContainerGroupPoolResourceUpdate.class); - Assertions.assertEquals("km", model.tags().get("jcmmxdcufufsrp")); - Assertions.assertEquals(2324275574179750664L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("eju", model.tags().get("fqawrlyxw")); + Assertions.assertEquals(4891061322345208982L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, model.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("qxhcrmn", model.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(661111027301241875L, + Assertions.assertEquals("b", model.properties().containerGroupProperties().containerGroupProfile().id()); + Assertions.assertEquals(85796477749100882L, model.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("whdsoifiyip", model.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("vpys", model.properties().containerGroupProperties().subnetIds().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateMockTests.java index c6be1bcdede0f..f36879cdd52f0 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -30,7 +30,7 @@ public final class StandbyContainerGroupPoolsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4792633562836558207,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"fsfksymddyst\",\"revision\":4210428974417603700},\"subnetIds\":[{\"id\":\"qyud\"},{\"id\":\"o\"},{\"id\":\"rq\"},{\"id\":\"b\"}]},\"provisioningState\":\"Succeeded\"},\"location\":\"vyifqrvkdvjsl\",\"tags\":{\"xxbczwtr\":\"vvdfwatkpnpul\"},\"id\":\"wiqzbqjvsovmyo\",\"name\":\"acspkwl\",\"type\":\"zdobpxjmflbvvnch\"}"; + = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1554730688618106722,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"rjcxerfuwu\",\"revision\":3193420375672203078},\"subnetIds\":[{\"id\":\"jrbirphxepcyv\"},{\"id\":\"hfnljkyq\"},{\"id\":\"j\"},{\"id\":\"uujqgidokgjljyo\"}]},\"provisioningState\":\"Succeeded\"},\"location\":\"ltbgsncghkj\",\"tags\":{\"xbf\":\"zhbijhtxfv\"},\"id\":\"mxnehmp\",\"name\":\"ec\",\"type\":\"godebfqkkrbmpu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,30 +40,31 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); StandbyContainerGroupPoolResource response = manager.standbyContainerGroupPools() - .define("hcjrefovgmk") - .withRegion("yhltrpmopjmcm") - .withExistingResourceGroup("eypvhezrkg") - .withTags(mapOf("uiuaodsfcpkvxodp", "okth")) + .define("oqqnwvlryav") + .withRegion("hwlrsf") + .withExistingResourceGroup("zlsico") + .withTags(mapOf("biqylihkaet", "pwvlqdq")) .withProperties(new StandbyContainerGroupPoolResourceProperties() .withElasticityProfile( - new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(6110578012532965907L) + new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(4251439564125915731L) .withRefillPolicy(RefillPolicy.ALWAYS)) .withContainerGroupProperties(new ContainerGroupProperties() .withContainerGroupProfile( - new ContainerGroupProfile().withId("vxyqjpkcattpngjc").withRevision(789439383784435473L)) + new ContainerGroupProfile().withId("mmqhgyxzkonocuk").withRevision(5997568094746061182L)) .withSubnetIds( - Arrays.asList(new Subnet().withId("pjhvmdajvnys"), new Subnet().withId("unqecanoae"))))) + Arrays.asList(new Subnet().withId("uconuqszfkbey"), new Subnet().withId("ewrmjmwvvjektc"))))) .create(); - Assertions.assertEquals("vyifqrvkdvjsl", response.location()); - Assertions.assertEquals("vvdfwatkpnpul", response.tags().get("xxbczwtr")); - Assertions.assertEquals(4792633562836558207L, response.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("ltbgsncghkj", response.location()); + Assertions.assertEquals("zhbijhtxfv", response.tags().get("xbf")); + Assertions.assertEquals(1554730688618106722L, response.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, response.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("fsfksymddyst", + Assertions.assertEquals("rjcxerfuwu", response.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(4210428974417603700L, + Assertions.assertEquals(3193420375672203078L, response.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("qyud", response.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("jrbirphxepcyv", + response.properties().containerGroupProperties().subnetIds().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupWithResponseMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupWithResponseMockTests.java index 24508e483805b..eb7bf5912afe3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -22,7 +22,7 @@ public final class StandbyContainerGroupPoolsGetByResourceGroupWithResponseMockT @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4922956716051761075,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"ehxnltyfsop\",\"revision\":7526436990032126640},\"subnetIds\":[{\"id\":\"nzwdejba\"},{\"id\":\"orxzdmohctbqvud\"}]},\"provisioningState\":\"Failed\"},\"location\":\"dnvowg\",\"tags\":{\"kcglhslaz\":\"ugw\",\"fqweykhmene\":\"dyggdtjixhbku\",\"cibvyvdcsitynn\":\"fyexfwhy\"},\"id\":\"amdecte\",\"name\":\"f\",\"type\":\"qsc\"}"; + = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2005682789733735628,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"fuaxbe\",\"revision\":1834993457183141824},\"subnetIds\":[{\"id\":\"ktwh\"},{\"id\":\"dxwzywqsmbsurexi\"},{\"id\":\"o\"}]},\"provisioningState\":\"Succeeded\"},\"location\":\"fsfksymddyst\",\"tags\":{\"yudxorrqnbp\":\"uxh\",\"vkd\":\"czvyifq\",\"d\":\"jsllrmv\"},\"id\":\"watkpnpulexxb\",\"name\":\"zwtruwiqzbqjvsov\",\"type\":\"yokacspkw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); StandbyContainerGroupPoolResource response = manager.standbyContainerGroupPools() - .getByResourceGroupWithResponse("wmc", "npwlbjnpg", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("atuokthfuiu", "odsfcpkvxodpuozm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dnvowg", response.location()); - Assertions.assertEquals("ugw", response.tags().get("kcglhslaz")); - Assertions.assertEquals(4922956716051761075L, response.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("fsfksymddyst", response.location()); + Assertions.assertEquals("uxh", response.tags().get("yudxorrqnbp")); + Assertions.assertEquals(2005682789733735628L, response.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, response.properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("ehxnltyfsop", + Assertions.assertEquals("fuaxbe", response.properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(7526436990032126640L, + Assertions.assertEquals(1834993457183141824L, response.properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("nzwdejba", response.properties().containerGroupProperties().subnetIds().get(0).id()); + Assertions.assertEquals("ktwh", response.properties().containerGroupProperties().subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupMockTests.java index fe519eb5442c0..3b7a047cc5d9c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -23,7 +23,7 @@ public final class StandbyContainerGroupPoolsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":7743628540054408847,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"xrjfeallnwsub\",\"revision\":6252291528456824174},\"subnetIds\":[{\"id\":\"pmng\"},{\"id\":\"zscxaqwo\"},{\"id\":\"chcbonqvpkvlrxnj\"},{\"id\":\"ase\"}]},\"provisioningState\":\"Deleting\"},\"location\":\"oflokey\",\"tags\":{\"dlwtgrhpdj\":\"nj\",\"zj\":\"jumasx\",\"alhbx\":\"qyeg\"},\"id\":\"hejjz\",\"name\":\"v\",\"type\":\"udgwdslfho\"}]}"; + = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5158769929678256713,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"wwzjuqkhrsajiwku\",\"revision\":4177110548609250713},\"subnetIds\":[{\"id\":\"hsauuimjmvxied\"},{\"id\":\"ugidyjrr\"},{\"id\":\"byao\"},{\"id\":\"v\"}]},\"provisioningState\":\"Canceled\"},\"location\":\"onpc\",\"tags\":{\"eggzfb\":\"cohslkev\",\"ithlvmezyvshxm\":\"hfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.standbyContainerGroupPools() - .listByResourceGroup("ebxetqgtzxdp", com.azure.core.util.Context.NONE); + .listByResourceGroup("hzdobpxjmflbvvnc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("oflokey", response.iterator().next().location()); - Assertions.assertEquals("nj", response.iterator().next().tags().get("dlwtgrhpdj")); - Assertions.assertEquals(7743628540054408847L, + Assertions.assertEquals("onpc", response.iterator().next().location()); + Assertions.assertEquals("cohslkev", response.iterator().next().tags().get("eggzfb")); + Assertions.assertEquals(5158769929678256713L, response.iterator().next().properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, response.iterator().next().properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("xrjfeallnwsub", + Assertions.assertEquals("wwzjuqkhrsajiwku", response.iterator().next().properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(6252291528456824174L, + Assertions.assertEquals(4177110548609250713L, response.iterator().next().properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("pmng", + Assertions.assertEquals("hsauuimjmvxied", response.iterator().next().properties().containerGroupProperties().subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListMockTests.java index 2a04a8ee903d5..e423b7d8716fa 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyContainerGroupPoolsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -23,7 +23,7 @@ public final class StandbyContainerGroupPoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":3404066285578031182,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"h\",\"revision\":1650647626366334623},\"subnetIds\":[{\"id\":\"skanyk\"}]},\"provisioningState\":\"Deleting\"},\"location\":\"u\",\"tags\":{\"nhzgpphrcgyn\":\"gqywgndrv\",\"fsxlzevgbmqjqa\":\"ocpecfvmmco\"},\"id\":\"c\",\"name\":\"pmivkwlzu\",\"type\":\"ccfwnfnbacfion\"}]}"; + = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":8016442937915577150,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"ukgjnpiucgygevq\",\"revision\":8593387531235795839},\"subnetIds\":[{\"id\":\"rbpizc\"},{\"id\":\"r\"},{\"id\":\"j\"}]},\"provisioningState\":\"Succeeded\"},\"location\":\"dnfyhxdeoejzicwi\",\"tags\":{\"cbkhajdeyeamdph\":\"ttgzfbis\",\"lpbuxwgipwhonowk\":\"g\"},\"id\":\"shwankixzbinje\",\"name\":\"uttmrywnuzoqft\",\"type\":\"yqzrnkcqvyxlw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,17 +35,17 @@ public void testList() throws Exception { PagedIterable response = manager.standbyContainerGroupPools().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("u", response.iterator().next().location()); - Assertions.assertEquals("gqywgndrv", response.iterator().next().tags().get("nhzgpphrcgyn")); - Assertions.assertEquals(3404066285578031182L, + Assertions.assertEquals("dnfyhxdeoejzicwi", response.iterator().next().location()); + Assertions.assertEquals("ttgzfbis", response.iterator().next().tags().get("cbkhajdeyeamdph")); + Assertions.assertEquals(8016442937915577150L, response.iterator().next().properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(RefillPolicy.ALWAYS, response.iterator().next().properties().elasticityProfile().refillPolicy()); - Assertions.assertEquals("h", + Assertions.assertEquals("ukgjnpiucgygevq", response.iterator().next().properties().containerGroupProperties().containerGroupProfile().id()); - Assertions.assertEquals(1650647626366334623L, + Assertions.assertEquals(8593387531235795839L, response.iterator().next().properties().containerGroupProperties().containerGroupProfile().revision()); - Assertions.assertEquals("skanyk", + Assertions.assertEquals("rbpizc", response.iterator().next().properties().containerGroupProperties().subnetIds().get(0).id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileTests.java index bf62f233fc6e2..fb955cd4ffed6 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -12,16 +12,16 @@ public final class StandbyVirtualMachinePoolElasticityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolElasticityProfile model - = BinaryData.fromString("{\"maxReadyCapacity\":3118515299888046221}") + = BinaryData.fromString("{\"maxReadyCapacity\":4068506387778200139}") .toObject(StandbyVirtualMachinePoolElasticityProfile.class); - Assertions.assertEquals(3118515299888046221L, model.maxReadyCapacity()); + Assertions.assertEquals(4068506387778200139L, model.maxReadyCapacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyVirtualMachinePoolElasticityProfile model - = new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(3118515299888046221L); + = new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(4068506387778200139L); model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolElasticityProfile.class); - Assertions.assertEquals(3118515299888046221L, model.maxReadyCapacity()); + Assertions.assertEquals(4068506387778200139L, model.maxReadyCapacity()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileUpdateTests.java deleted file mode 100644 index b4feb6fadacbc..0000000000000 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolElasticityProfileUpdateTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.standbypool.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate; -import org.junit.jupiter.api.Assertions; - -public final class StandbyVirtualMachinePoolElasticityProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StandbyVirtualMachinePoolElasticityProfileUpdate model - = BinaryData.fromString("{\"maxReadyCapacity\":1133583588147425789}") - .toObject(StandbyVirtualMachinePoolElasticityProfileUpdate.class); - Assertions.assertEquals(1133583588147425789L, model.maxReadyCapacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyVirtualMachinePoolElasticityProfileUpdate model - = new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(1133583588147425789L); - model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolElasticityProfileUpdate.class); - Assertions.assertEquals(1133583588147425789L, model.maxReadyCapacity()); - } -} diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceInnerTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceInnerTests.java index 5cc0c8e62f404..83b20a63ab6e2 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceInnerTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -17,31 +17,31 @@ public final class StandbyVirtualMachinePoolResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolResourceInner model = BinaryData.fromString( - "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":7928784198213019505},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"vlejuvfqa\",\"provisioningState\":\"Deleting\"},\"location\":\"xwjkcprbnwbxg\",\"tags\":{\"dnrujqguhmuouqfp\":\"bvpyss\",\"uizga\":\"wzwbnguitn\",\"fizuckyf\":\"x\"},\"id\":\"hr\",\"name\":\"idf\",\"type\":\"zwdzuh\"}") + "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5470433313051888734},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"vg\",\"provisioningState\":\"Deleting\"},\"location\":\"ymglzufcyz\",\"tags\":{\"s\":\"dbihanufhfcbj\",\"xqhabi\":\"git\"},\"id\":\"pikxwczbyscnpqxu\",\"name\":\"ivyqniwbybrkxvd\",\"type\":\"mjgr\"}") .toObject(StandbyVirtualMachinePoolResourceInner.class); - Assertions.assertEquals("xwjkcprbnwbxg", model.location()); - Assertions.assertEquals("bvpyss", model.tags().get("dnrujqguhmuouqfp")); - Assertions.assertEquals(7928784198213019505L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("ymglzufcyz", model.location()); + Assertions.assertEquals("dbihanufhfcbj", model.tags().get("s")); + Assertions.assertEquals(5470433313051888734L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.properties().virtualMachineState()); - Assertions.assertEquals("vlejuvfqa", model.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("vg", model.properties().attachedVirtualMachineScaleSetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyVirtualMachinePoolResourceInner model - = new StandbyVirtualMachinePoolResourceInner().withLocation("xwjkcprbnwbxg") - .withTags(mapOf("dnrujqguhmuouqfp", "bvpyss", "uizga", "wzwbnguitn", "fizuckyf", "x")) + = new StandbyVirtualMachinePoolResourceInner().withLocation("ymglzufcyz") + .withTags(mapOf("s", "dbihanufhfcbj", "xqhabi", "git")) .withProperties(new StandbyVirtualMachinePoolResourceProperties() .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(7928784198213019505L)) + new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(5470433313051888734L)) .withVirtualMachineState(VirtualMachineState.DEALLOCATED) - .withAttachedVirtualMachineScaleSetId("vlejuvfqa")); + .withAttachedVirtualMachineScaleSetId("vg")); model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolResourceInner.class); - Assertions.assertEquals("xwjkcprbnwbxg", model.location()); - Assertions.assertEquals("bvpyss", model.tags().get("dnrujqguhmuouqfp")); - Assertions.assertEquals(7928784198213019505L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("ymglzufcyz", model.location()); + Assertions.assertEquals("dbihanufhfcbj", model.tags().get("s")); + Assertions.assertEquals(5470433313051888734L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.properties().virtualMachineState()); - Assertions.assertEquals("vlejuvfqa", model.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("vg", model.properties().attachedVirtualMachineScaleSetId()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceListResultTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceListResultTests.java index 0791046dd84ea..841aa52e7617c 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceListResultTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceListResultTests.java @@ -1,85 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachinePoolResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceListResult; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceProperties; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachinePoolResourceListResult; import com.azure.resourcemanager.standbypool.models.VirtualMachineState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class StandbyVirtualMachinePoolResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4988388139114001122},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"rljdouskcqv\",\"provisioningState\":\"Succeeded\"},\"location\":\"cjdkwtnhxbnjbi\",\"tags\":{\"nzl\":\"rglssainqpj\",\"pee\":\"jfm\",\"yqduujit\":\"vmgxsab\",\"rwpdappdsbdkvwrw\":\"jczdzevndh\"},\"id\":\"feusnhut\",\"name\":\"eltmrldhugjzzdat\",\"type\":\"xhocdgeablgphuti\"},{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":8186282377812445874},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"zwyiftyhxhur\",\"provisioningState\":\"Canceled\"},\"location\":\"yxolniwp\",\"tags\":{\"awxklr\":\"kjfkg\",\"ypnddhsgcb\":\"plwckbas\",\"jkot\":\"cph\",\"wyqkgfgibm\":\"nqgoulzndli\"},\"id\":\"dgak\",\"name\":\"qsrxybzqqed\",\"type\":\"ytb\"},{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5546315024826838939},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"lmmnkzsmodmglo\",\"provisioningState\":\"Failed\"},\"location\":\"kwtmutduqktapspw\",\"tags\":{\"vqwhbmdgbbjfd\":\"ertumkdo\",\"q\":\"gmbmbexppbh\"},\"id\":\"rolfpfp\",\"name\":\"algbquxigjyjg\",\"type\":\"jaoyfhrtx\"}],\"nextLink\":\"n\"}") + "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":795979604807829548},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"jsprozvcpute\",\"provisioningState\":\"Succeeded\"},\"location\":\"mfdatscmdvpj\",\"tags\":{\"kjozkrwfnd\":\"suuv\",\"vwryoqpso\":\"odjpslwejd\",\"yffdfdos\":\"cctazakljlahbc\",\"hcrzevd\":\"gexpaojakhmsbz\"},\"id\":\"hlxaolthqtr\",\"name\":\"qjbpfzfsin\",\"type\":\"gvfcj\"},{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4223016472097191780},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"tfell\",\"provisioningState\":\"Failed\"},\"location\":\"it\",\"tags\":{\"jlxofpdvhpfxxyp\":\"eqfpj\",\"kpode\":\"ninmayhuyb\",\"ognarxzxtheotus\":\"ooginuvamih\"},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"},{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":9010569490634453588},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"emv\",\"provisioningState\":\"Failed\"},\"location\":\"ufubl\",\"tags\":{\"v\":\"xqeofjaeqjhqjba\",\"zgcwrw\":\"smjqulngsntnbyb\"},\"id\":\"lxxwrljdouskc\",\"name\":\"vkocrcjdkwtn\",\"type\":\"xbnjbiksq\"}],\"nextLink\":\"lssai\"}") .toObject(StandbyVirtualMachinePoolResourceListResult.class); - Assertions.assertEquals("cjdkwtnhxbnjbi", model.value().get(0).location()); - Assertions.assertEquals("rglssainqpj", model.value().get(0).tags().get("nzl")); - Assertions.assertEquals(4988388139114001122L, + Assertions.assertEquals("mfdatscmdvpj", model.value().get(0).location()); + Assertions.assertEquals("suuv", model.value().get(0).tags().get("kjozkrwfnd")); + Assertions.assertEquals(795979604807829548L, model.value().get(0).properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.value().get(0).properties().virtualMachineState()); - Assertions.assertEquals("rljdouskcqv", model.value().get(0).properties().attachedVirtualMachineScaleSetId()); - Assertions.assertEquals("n", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyVirtualMachinePoolResourceListResult model - = new StandbyVirtualMachinePoolResourceListResult().withValue(Arrays - .asList( - new StandbyVirtualMachinePoolResourceInner().withLocation("cjdkwtnhxbnjbi") - .withTags(mapOf("nzl", "rglssainqpj", "pee", "jfm", "yqduujit", "vmgxsab", "rwpdappdsbdkvwrw", - "jczdzevndh")) - .withProperties(new StandbyVirtualMachinePoolResourceProperties() - .withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile() - .withMaxReadyCapacity(4988388139114001122L)) - .withVirtualMachineState(VirtualMachineState.DEALLOCATED) - .withAttachedVirtualMachineScaleSetId("rljdouskcqv")), - new StandbyVirtualMachinePoolResourceInner().withLocation("yxolniwp") - .withTags(mapOf("awxklr", "kjfkg", "ypnddhsgcb", "plwckbas", "jkot", "cph", "wyqkgfgibm", - "nqgoulzndli")) - .withProperties(new StandbyVirtualMachinePoolResourceProperties() - .withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile() - .withMaxReadyCapacity(8186282377812445874L)) - .withVirtualMachineState(VirtualMachineState.DEALLOCATED) - .withAttachedVirtualMachineScaleSetId("zwyiftyhxhur")), - new StandbyVirtualMachinePoolResourceInner().withLocation("kwtmutduqktapspw") - .withTags(mapOf("vqwhbmdgbbjfd", "ertumkdo", "q", "gmbmbexppbh")) - .withProperties(new StandbyVirtualMachinePoolResourceProperties() - .withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile() - .withMaxReadyCapacity(5546315024826838939L)) - .withVirtualMachineState(VirtualMachineState.RUNNING) - .withAttachedVirtualMachineScaleSetId("lmmnkzsmodmglo")))) - .withNextLink("n"); - model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolResourceListResult.class); - Assertions.assertEquals("cjdkwtnhxbnjbi", model.value().get(0).location()); - Assertions.assertEquals("rglssainqpj", model.value().get(0).tags().get("nzl")); - Assertions.assertEquals(4988388139114001122L, - model.value().get(0).properties().elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.DEALLOCATED, - model.value().get(0).properties().virtualMachineState()); - Assertions.assertEquals("rljdouskcqv", model.value().get(0).properties().attachedVirtualMachineScaleSetId()); - Assertions.assertEquals("n", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("jsprozvcpute", model.value().get(0).properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("lssai", model.nextLink()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourcePropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourcePropertiesTests.java index eec669f833c4b..ab2aabfae15f4 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourcePropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourcePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -14,23 +14,23 @@ public final class StandbyVirtualMachinePoolResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolResourceProperties model = BinaryData.fromString( - "{\"elasticityProfile\":{\"maxReadyCapacity\":6116347242940995661},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"dkfthwxmnt\",\"provisioningState\":\"Deleting\"}") + "{\"elasticityProfile\":{\"maxReadyCapacity\":4836526931131367321},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"xgaudccs\",\"provisioningState\":\"Succeeded\"}") .toObject(StandbyVirtualMachinePoolResourceProperties.class); - Assertions.assertEquals(6116347242940995661L, model.elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.virtualMachineState()); - Assertions.assertEquals("dkfthwxmnt", model.attachedVirtualMachineScaleSetId()); + Assertions.assertEquals(4836526931131367321L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(VirtualMachineState.RUNNING, model.virtualMachineState()); + Assertions.assertEquals("xgaudccs", model.attachedVirtualMachineScaleSetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyVirtualMachinePoolResourceProperties model = new StandbyVirtualMachinePoolResourceProperties() .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(6116347242940995661L)) - .withVirtualMachineState(VirtualMachineState.DEALLOCATED) - .withAttachedVirtualMachineScaleSetId("dkfthwxmnt"); + new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(4836526931131367321L)) + .withVirtualMachineState(VirtualMachineState.RUNNING) + .withAttachedVirtualMachineScaleSetId("xgaudccs"); model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolResourceProperties.class); - Assertions.assertEquals(6116347242940995661L, model.elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.virtualMachineState()); - Assertions.assertEquals("dkfthwxmnt", model.attachedVirtualMachineScaleSetId()); + Assertions.assertEquals(4836526931131367321L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(VirtualMachineState.RUNNING, model.virtualMachineState()); + Assertions.assertEquals("xgaudccs", model.attachedVirtualMachineScaleSetId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdatePropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdatePropertiesTests.java index 793c406dc054b..acc36dac61be3 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdatePropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdatePropertiesTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.VirtualMachineState; import org.junit.jupiter.api.Assertions; @@ -14,11 +14,11 @@ public final class StandbyVirtualMachinePoolResourceUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolResourceUpdateProperties model = BinaryData.fromString( - "{\"elasticityProfile\":{\"maxReadyCapacity\":1699471784577737162},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"ppofmxaxcfjpgdd\"}") + "{\"elasticityProfile\":{\"maxReadyCapacity\":5389262344407745261},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"inpm\"}") .toObject(StandbyVirtualMachinePoolResourceUpdateProperties.class); - Assertions.assertEquals(1699471784577737162L, model.elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.RUNNING, model.virtualMachineState()); - Assertions.assertEquals("ppofmxaxcfjpgdd", model.attachedVirtualMachineScaleSetId()); + Assertions.assertEquals(5389262344407745261L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.virtualMachineState()); + Assertions.assertEquals("inpm", model.attachedVirtualMachineScaleSetId()); } @org.junit.jupiter.api.Test @@ -26,12 +26,12 @@ public void testSerialize() throws Exception { StandbyVirtualMachinePoolResourceUpdateProperties model = new StandbyVirtualMachinePoolResourceUpdateProperties() .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(1699471784577737162L)) - .withVirtualMachineState(VirtualMachineState.RUNNING) - .withAttachedVirtualMachineScaleSetId("ppofmxaxcfjpgdd"); + new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(5389262344407745261L)) + .withVirtualMachineState(VirtualMachineState.DEALLOCATED) + .withAttachedVirtualMachineScaleSetId("inpm"); model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolResourceUpdateProperties.class); - Assertions.assertEquals(1699471784577737162L, model.elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.RUNNING, model.virtualMachineState()); - Assertions.assertEquals("ppofmxaxcfjpgdd", model.attachedVirtualMachineScaleSetId()); + Assertions.assertEquals(5389262344407745261L, model.elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals(VirtualMachineState.DEALLOCATED, model.virtualMachineState()); + Assertions.assertEquals("inpm", model.attachedVirtualMachineScaleSetId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdateTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdateTests.java index 6c85bf067099f..000108446094f 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdateTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolResourceUpdateTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate; +import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdate; import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties; import com.azure.resourcemanager.standbypool.models.VirtualMachineState; @@ -17,28 +17,28 @@ public final class StandbyVirtualMachinePoolResourceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachinePoolResourceUpdate model = BinaryData.fromString( - "{\"tags\":{\"jionpimexgstxgc\":\"odxobnbdxkqpxok\",\"lovmclwhijcoe\":\"odgmaajrmvdjwz\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5381243547184167814},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"sycbkbfk\"}}") + "{\"tags\":{\"tnapczwlokjyemkk\":\"ejhkry\",\"joxzjnchgejspodm\":\"ni\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":3873613065529551563},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"o\"}}") .toObject(StandbyVirtualMachinePoolResourceUpdate.class); - Assertions.assertEquals("odxobnbdxkqpxok", model.tags().get("jionpimexgstxgc")); - Assertions.assertEquals(5381243547184167814L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("ejhkry", model.tags().get("tnapczwlokjyemkk")); + Assertions.assertEquals(3873613065529551563L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.RUNNING, model.properties().virtualMachineState()); - Assertions.assertEquals("sycbkbfk", model.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("o", model.properties().attachedVirtualMachineScaleSetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StandbyVirtualMachinePoolResourceUpdate model = new StandbyVirtualMachinePoolResourceUpdate() - .withTags(mapOf("jionpimexgstxgc", "odxobnbdxkqpxok", "lovmclwhijcoe", "odgmaajrmvdjwz")) + .withTags(mapOf("tnapczwlokjyemkk", "ejhkry", "joxzjnchgejspodm", "ni")) .withProperties(new StandbyVirtualMachinePoolResourceUpdateProperties() .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(5381243547184167814L)) + new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(3873613065529551563L)) .withVirtualMachineState(VirtualMachineState.RUNNING) - .withAttachedVirtualMachineScaleSetId("sycbkbfk")); + .withAttachedVirtualMachineScaleSetId("o")); model = BinaryData.fromObject(model).toObject(StandbyVirtualMachinePoolResourceUpdate.class); - Assertions.assertEquals("odxobnbdxkqpxok", model.tags().get("jionpimexgstxgc")); - Assertions.assertEquals(5381243547184167814L, model.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("ejhkry", model.tags().get("tnapczwlokjyemkk")); + Assertions.assertEquals(3873613065529551563L, model.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.RUNNING, model.properties().virtualMachineState()); - Assertions.assertEquals("sycbkbfk", model.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("o", model.properties().attachedVirtualMachineScaleSetId()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateMockTests.java index 0c662a9bea28c..9edad22a3527e 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -26,7 +26,7 @@ public final class StandbyVirtualMachinePoolsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2490972425788067979},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"tcktvfcivfsnky\",\"provisioningState\":\"Succeeded\"},\"location\":\"qhjfbebr\",\"tags\":{\"fvjrbirphxepcy\":\"erfuwuttt\"},\"id\":\"ahfn\",\"name\":\"jky\",\"type\":\"xjvuujqgidokg\"}"; + = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":8219003189774073818},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"jnpg\",\"provisioningState\":\"Succeeded\"},\"location\":\"adehxnltyfsopp\",\"tags\":{\"bavo\":\"esnzwde\",\"vudwx\":\"xzdmohctb\",\"gujjugwdkcglh\":\"ndnvo\",\"ofqweykhmenevfye\":\"lazjdyggdtjixhbk\"},\"id\":\"fwhybcibvy\",\"name\":\"dcsi\",\"type\":\"ynnaam\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,22 +36,22 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); StandbyVirtualMachinePoolResource response = manager.standbyVirtualMachinePools() - .define("kix") - .withRegion("rnkcqvyxlw") - .withExistingResourceGroup("wkgshwa") - .withTags(mapOf("vwhheunmmqhgyx", "sicohoqqnwvlry", "oklyaxuconuq", "konocu", "beypewrmjmw", "zf")) + .define("ebxetqgtzxdp") + .withRegion("ngnzscxaqwoochc") + .withExistingResourceGroup("ccfwnfnbacfion") + .withTags(mapOf("eo", "qvpkvlrxnjeaseip", "enjbdlwtgrhp", "lokeyy", "umasxazjpq", "jp")) .withProperties(new StandbyVirtualMachinePoolResourceProperties() .withElasticityProfile( - new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(3557258922827746247L)) + new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(3640331879972668788L)) .withVirtualMachineState(VirtualMachineState.DEALLOCATED) - .withAttachedVirtualMachineScaleSetId("uttmrywnuzoqft")) + .withAttachedVirtualMachineScaleSetId("rjfeallnwsubisnj")) .create(); - Assertions.assertEquals("qhjfbebr", response.location()); - Assertions.assertEquals("erfuwuttt", response.tags().get("fvjrbirphxepcy")); - Assertions.assertEquals(2490972425788067979L, response.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("adehxnltyfsopp", response.location()); + Assertions.assertEquals("esnzwde", response.tags().get("bavo")); + Assertions.assertEquals(8219003189774073818L, response.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.DEALLOCATED, response.properties().virtualMachineState()); - Assertions.assertEquals("tcktvfcivfsnky", response.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("jnpg", response.properties().attachedVirtualMachineScaleSetId()); } // Use "Map.of" if available diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupWithResponseMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupWithResponseMockTests.java index a5046e439cb26..dc838f36521ee 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -22,7 +22,7 @@ public final class StandbyVirtualMachinePoolsGetByResourceGroupWithResponseMockT @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5310628995485261293},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"cipazyxoegukgjnp\",\"provisioningState\":\"Failed\"},\"location\":\"ygevqzntypmrbpiz\",\"tags\":{\"jzicwifsjt\":\"qjsdpydnfyhxdeo\"},\"id\":\"gzfbishcbk\",\"name\":\"ajdeyeamdphaga\",\"type\":\"pbuxwgipwhon\"}"; + = "{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":3760414146947165367},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"xscpaierhhbc\",\"provisioningState\":\"Succeeded\"},\"location\":\"mmajtjaodx\",\"tags\":{\"onpimexgstxg\":\"bdxkqpxokaj\",\"gmaajrm\":\"po\"},\"id\":\"djwzrlov\",\"name\":\"clwhijcoejctbz\",\"type\":\"qsqsy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); StandbyVirtualMachinePoolResource response = manager.standbyVirtualMachinePools() - .getByResourceGroupWithResponse("ou", "nvudwtiukb", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("yulpkudjkr", "khbzhfepgzg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ygevqzntypmrbpiz", response.location()); - Assertions.assertEquals("qjsdpydnfyhxdeo", response.tags().get("jzicwifsjt")); - Assertions.assertEquals(5310628995485261293L, response.properties().elasticityProfile().maxReadyCapacity()); + Assertions.assertEquals("mmajtjaodx", response.location()); + Assertions.assertEquals("bdxkqpxokaj", response.tags().get("onpimexgstxg")); + Assertions.assertEquals(3760414146947165367L, response.properties().elasticityProfile().maxReadyCapacity()); Assertions.assertEquals(VirtualMachineState.DEALLOCATED, response.properties().virtualMachineState()); - Assertions.assertEquals("cipazyxoegukgjnp", response.properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("xscpaierhhbc", response.properties().attachedVirtualMachineScaleSetId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupMockTests.java index 4f8e75ebdf9c8..d3e175c401937 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -23,7 +23,7 @@ public final class StandbyVirtualMachinePoolsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":5326513191162029025},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"x\",\"provisioningState\":\"Canceled\"},\"location\":\"iith\",\"tags\":{\"v\":\"ez\"},\"id\":\"hxmzsbbzoggig\",\"name\":\"xwburvjxxjns\",\"type\":\"ydptkoen\"}]}"; + = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":4492808256673380449},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"axcfjpgddtocjjx\",\"provisioningState\":\"Canceled\"},\"location\":\"o\",\"tags\":{\"xibqeojnx\":\"hd\",\"dntwndeicbtw\":\"bzv\",\"cffcyddglmj\":\"pzaoqvuhr\",\"wpyeicxmqciwqvh\":\"hjq\"},\"id\":\"hix\",\"name\":\"igdtopbob\",\"type\":\"og\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,16 @@ public void testListByResourceGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.standbyVirtualMachinePools().listByResourceGroup("eggzfb", com.azure.core.util.Context.NONE); + PagedIterable response = manager.standbyVirtualMachinePools() + .listByResourceGroup("bkbfkgukdkex", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iith", response.iterator().next().location()); - Assertions.assertEquals("ez", response.iterator().next().tags().get("v")); - Assertions.assertEquals(5326513191162029025L, + Assertions.assertEquals("o", response.iterator().next().location()); + Assertions.assertEquals("hd", response.iterator().next().tags().get("xibqeojnx")); + Assertions.assertEquals(4492808256673380449L, response.iterator().next().properties().elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.DEALLOCATED, + Assertions.assertEquals(VirtualMachineState.RUNNING, response.iterator().next().properties().virtualMachineState()); - Assertions.assertEquals("x", response.iterator().next().properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("axcfjpgddtocjjx", + response.iterator().next().properties().attachedVirtualMachineScaleSetId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListMockTests.java index 504fc8832986d..6260197c14537 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinePoolsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -23,7 +23,7 @@ public final class StandbyVirtualMachinePoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2932423974497497873},\"virtualMachineState\":\"Deallocated\",\"attachedVirtualMachineScaleSetId\":\"zjuqkhrsaj\",\"provisioningState\":\"Succeeded\"},\"location\":\"ofoskghs\",\"tags\":{\"xieduugidyjrr\":\"imjm\",\"v\":\"byao\"},\"id\":\"xc\",\"name\":\"onpc\",\"type\":\"hocohslkev\"}]}"; + = "{\"value\":[{\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":87946417642997689},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"a\",\"provisioningState\":\"Failed\"},\"location\":\"ayvvtpgvdf\",\"tags\":{\"efgugnxk\":\"tkftutqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"id\":\"fsxlzevgbmqjqa\",\"name\":\"c\",\"type\":\"pmivkwlzu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,13 +35,12 @@ public void testList() throws Exception { PagedIterable response = manager.standbyVirtualMachinePools().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ofoskghs", response.iterator().next().location()); - Assertions.assertEquals("imjm", response.iterator().next().tags().get("xieduugidyjrr")); - Assertions.assertEquals(2932423974497497873L, + Assertions.assertEquals("ayvvtpgvdf", response.iterator().next().location()); + Assertions.assertEquals("tkftutqxlngx", response.iterator().next().tags().get("efgugnxk")); + Assertions.assertEquals(87946417642997689L, response.iterator().next().properties().elasticityProfile().maxReadyCapacity()); - Assertions.assertEquals(VirtualMachineState.DEALLOCATED, + Assertions.assertEquals(VirtualMachineState.RUNNING, response.iterator().next().properties().virtualMachineState()); - Assertions.assertEquals("zjuqkhrsaj", - response.iterator().next().properties().attachedVirtualMachineScaleSetId()); + Assertions.assertEquals("a", response.iterator().next().properties().attachedVirtualMachineScaleSetId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceInnerTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceInnerTests.java index 9397e05392bce..e1464d94dc56e 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceInnerTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceInnerTests.java @@ -1,28 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceProperties; import org.junit.jupiter.api.Assertions; public final class StandbyVirtualMachineResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachineResourceInner model = BinaryData.fromString( - "{\"properties\":{\"virtualMachineResourceId\":\"uhrhcffcyddgl\",\"provisioningState\":\"Succeeded\"},\"id\":\"jqkwpyeicx\",\"name\":\"qciwqvhkhixuigdt\",\"type\":\"pbobjo\"}") + "{\"properties\":{\"virtualMachineResourceId\":\"p\",\"provisioningState\":\"Succeeded\"},\"id\":\"lljfmppeeb\",\"name\":\"mgxsab\",\"type\":\"yqduujit\"}") .toObject(StandbyVirtualMachineResourceInner.class); - Assertions.assertEquals("uhrhcffcyddgl", model.properties().virtualMachineResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyVirtualMachineResourceInner model = new StandbyVirtualMachineResourceInner().withProperties( - new StandbyVirtualMachineResourceProperties().withVirtualMachineResourceId("uhrhcffcyddgl")); - model = BinaryData.fromObject(model).toObject(StandbyVirtualMachineResourceInner.class); - Assertions.assertEquals("uhrhcffcyddgl", model.properties().virtualMachineResourceId()); + Assertions.assertEquals("p", model.properties().virtualMachineResourceId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceListResultTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceListResultTests.java index d413347fbe1ea..c6ca59ad4bff2 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceListResultTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourceListResultTests.java @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.standbypool.fluent.models.StandbyVirtualMachineResourceInner; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceListResult; -import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachineResourceProperties; -import java.util.Arrays; +import com.azure.resourcemanager.standbypool.implementation.models.StandbyVirtualMachineResourceListResult; import org.junit.jupiter.api.Assertions; public final class StandbyVirtualMachineResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachineResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"virtualMachineResourceId\":\"hvpmoue\",\"provisioningState\":\"Deleting\"},\"id\":\"xibqeojnx\",\"name\":\"bzv\",\"type\":\"dntwndeicbtw\"}],\"nextLink\":\"zao\"}") + "{\"value\":[{\"properties\":{\"virtualMachineResourceId\":\"appd\",\"provisioningState\":\"Canceled\"},\"id\":\"vwrwj\",\"name\":\"eusnhutj\",\"type\":\"ltmrldh\"},{\"properties\":{\"virtualMachineResourceId\":\"jzzd\",\"provisioningState\":\"Deleting\"},\"id\":\"hocdgeab\",\"name\":\"gphuticndvka\",\"type\":\"zwyiftyhxhur\"}],\"nextLink\":\"ftyxolniw\"}") .toObject(StandbyVirtualMachineResourceListResult.class); - Assertions.assertEquals("hvpmoue", model.value().get(0).properties().virtualMachineResourceId()); - Assertions.assertEquals("zao", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyVirtualMachineResourceListResult model = new StandbyVirtualMachineResourceListResult() - .withValue(Arrays.asList(new StandbyVirtualMachineResourceInner() - .withProperties(new StandbyVirtualMachineResourceProperties().withVirtualMachineResourceId("hvpmoue")))) - .withNextLink("zao"); - model = BinaryData.fromObject(model).toObject(StandbyVirtualMachineResourceListResult.class); - Assertions.assertEquals("hvpmoue", model.value().get(0).properties().virtualMachineResourceId()); - Assertions.assertEquals("zao", model.nextLink()); + Assertions.assertEquals("appd", model.value().get(0).properties().virtualMachineResourceId()); + Assertions.assertEquals("ftyxolniw", model.nextLink()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourcePropertiesTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourcePropertiesTests.java index 4796a1c981609..168df8067d801 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourcePropertiesTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachineResourcePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -12,16 +12,8 @@ public final class StandbyVirtualMachineResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StandbyVirtualMachineResourceProperties model - = BinaryData.fromString("{\"virtualMachineResourceId\":\"hm\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"virtualMachineResourceId\":\"jczdzevndh\",\"provisioningState\":\"Canceled\"}") .toObject(StandbyVirtualMachineResourceProperties.class); - Assertions.assertEquals("hm", model.virtualMachineResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StandbyVirtualMachineResourceProperties model - = new StandbyVirtualMachineResourceProperties().withVirtualMachineResourceId("hm"); - model = BinaryData.fromObject(model).toObject(StandbyVirtualMachineResourceProperties.class); - Assertions.assertEquals("hm", model.virtualMachineResourceId()); + Assertions.assertEquals("jczdzevndh", model.virtualMachineResourceId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetWithResponseMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetWithResponseMockTests.java index 897a0102889fc..85a2e71c0f2f2 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetWithResponseMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -21,7 +21,7 @@ public final class StandbyVirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"virtualMachineResourceId\":\"dhibnuq\",\"provisioningState\":\"Failed\"},\"id\":\"kadrgvt\",\"name\":\"agnb\",\"type\":\"ynhijggme\"}"; + = "{\"properties\":{\"virtualMachineResourceId\":\"c\",\"provisioningState\":\"Failed\"},\"id\":\"o\",\"name\":\"gm\",\"type\":\"qsl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); StandbyVirtualMachineResource response = manager.standbyVirtualMachines() - .getWithResponse("gr", "wflzlfbxzpuzy", "ispnqzahmgkbrp", com.azure.core.util.Context.NONE) + .getWithResponse("ectehf", "qsc", "eypvhezrkg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dhibnuq", response.properties().virtualMachineResourceId()); + Assertions.assertEquals("c", response.properties().virtualMachineResourceId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceMockTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceMockTests.java index 6084018cda10f..7a0c787cb14dc 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceMockTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -22,7 +22,7 @@ public final class StandbyVirtualMachinesListByStandbyVirtualMachinePoolResource @Test public void testListByStandbyVirtualMachinePoolResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"virtualMachineResourceId\":\"ijhtxf\",\"provisioningState\":\"Succeeded\"},\"id\":\"fsm\",\"name\":\"nehmpvecx\",\"type\":\"odebfqkkrbmpu\"}]}"; + = "{\"value\":[{\"properties\":{\"virtualMachineResourceId\":\"nysounqe\",\"provisioningState\":\"Succeeded\"},\"id\":\"ae\",\"name\":\"pfhyhl\",\"type\":\"rpmopjmc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,9 @@ public void testListByStandbyVirtualMachinePoolResource() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.standbyVirtualMachines() - .listByStandbyVirtualMachinePoolResource("ljyoxgvcltb", "sncghkjeszz", com.azure.core.util.Context.NONE); + .listByStandbyVirtualMachinePoolResource("yyvxyqjpkcattpn", "jcrcczsqpjhvmda", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("ijhtxf", response.iterator().next().properties().virtualMachineResourceId()); + Assertions.assertEquals("nysounqe", response.iterator().next().properties().virtualMachineResourceId()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/SubnetTests.java b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/SubnetTests.java index 0bc1f322548c3..5fe7d067166f8 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/SubnetTests.java +++ b/sdk/standbypool/azure-resourcemanager-standbypool/src/test/java/com/azure/resourcemanager/standbypool/generated/SubnetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.standbypool.generated; @@ -11,14 +11,14 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Subnet model = BinaryData.fromString("{\"id\":\"qulngsntnbybkzgc\"}").toObject(Subnet.class); - Assertions.assertEquals("qulngsntnbybkzgc", model.id()); + Subnet model = BinaryData.fromString("{\"id\":\"rkujy\"}").toObject(Subnet.class); + Assertions.assertEquals("rkujy", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withId("qulngsntnbybkzgc"); + Subnet model = new Subnet().withId("rkujy"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("qulngsntnbybkzgc", model.id()); + Assertions.assertEquals("rkujy", model.id()); } } diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/tsp-location.yaml b/sdk/standbypool/azure-resourcemanager-standbypool/tsp-location.yaml new file mode 100644 index 0000000000000..5435fbb813ac9 --- /dev/null +++ b/sdk/standbypool/azure-resourcemanager-standbypool/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/standbypool/StandbyPool.Management +commit: a6678df297b43c8fb2b450e93f5c79cc556fd33a +repo: Azure/azure-rest-api-specs