diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5524744f7694..3691df72fdc6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -70,7 +70,7 @@ /sdk/identity/ @christothes @JonathanCrd @Azure/azure-sdk-write-identity # ServiceLabel: %Azure.Identity -# AzureSdkOwners: @christothes @JonathanCrd +# AzureSdkOwners: @JonathanCrd # PRLabel: %Extensions /sdk/extensions/ @jsquire @@ -818,30 +818,6 @@ # ServiceLabel: %SignalR # ServiceOwners: @chenkennt @vicancy @JialinXin @Y-Sindo -# PRLabel: %SQL -/sdk/sqlmanagement/ @ericshape @jeremyfrosti - -# ServiceLabel: %SQL -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - Backup & Restore -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - Data Security -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - Elastic Jobs -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - Managed Instance -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - Replication & Failover -# ServiceOwners: @ericshape @jeremyfrosti - -# ServiceLabel: %SQL - VM -# ServiceOwners: @ericshape @jeremyfrosti - # PRLabel: %Storage /sdk/storage*/ @seanmcc-msft @amnguye @jaschrep-msft @jalauzon-msft @nickliu-msft @@ -1144,14 +1120,38 @@ # PRLabel: %Service Fabric /sdk/servicefabric/Azure.ResourceManager.*/ @QingChenmsft @vaishnavk @juhacket -# ServiceLabel: %Service Fabric +# ServiceLabel: %Service Fabric %Mgmt # ServiceOwners: @QingChenmsft @vaishnavk @juhacket # PRLabel: %SiteManager -/sdk/sitemanager/Azure.ResourceManager.*/ @bsomeshekar +/sdk/sitemanager/Azure.ResourceManager.*/ @bsomeshekar @ArcturusZhang @ArthurMa1978 # ServiceLabel: %SiteManager %Mgmt -# ServiceOwners: @bsomeshekar +# ServiceOwners: @bsomeshekar @ArcturusZhang @ArthurMa1978 + +# PRLabel: %SQL +/sdk/sqlmanagement/ @ericshape @ArcturusZhang @ArthurMa1978 + +# ServiceLabel: %SQL %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - Backup & Restore %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - Data Security %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - Elastic Jobs %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - Managed Instance %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - Replication & Failover %Mgmt +# ServiceOwners: @ericshape + +# ServiceLabel: %SQL - VM %Mgmt +# ServiceOwners: @ericshape # ServiceLabel: %Virtual Enclaves %Mgmt # ServiceOwners: @jchavaherrera diff --git a/.gitignore b/.gitignore index a700a4869611..de5cb2f5f42e 100644 --- a/.gitignore +++ b/.gitignore @@ -178,6 +178,7 @@ artifacts # Temporary typespec folders for typespec generation TempTypeSpecFiles/ +tsp_client_metadata.yaml # Common toolchain intermediate files temp diff --git a/doc/GeneratorMigration/Library_Inventory.md b/doc/GeneratorMigration/Library_Inventory.md index 7663385a7272..0a0578f84e34 100644 --- a/doc/GeneratorMigration/Library_Inventory.md +++ b/doc/GeneratorMigration/Library_Inventory.md @@ -4,9 +4,9 @@ - Total libraries: 417 - Management Plane (Swagger): 163 -- Management Plane (TSP-Old): 45 +- Management Plane (TSP-Old): 44 - Management Plane (TypeSpec - @azure-typespec/http-client-csharp): 0 -- Management Plane (TypeSpec - @azure-typespec/http-client-csharp-mgmt): 17 +- Management Plane (TypeSpec - @azure-typespec/http-client-csharp-mgmt): 18 - Management Plane (TypeSpec - @typespec/http-client-csharp): 0 - Management Plane (TypeSpec - Unknown TypeSpec Generator: eng/emitter-package.json): 0 - Data Plane (Swagger): 110 @@ -203,7 +203,7 @@ Total: 110 ## Management Plane Libraries using TypeSpec (@azure-typespec/http-client-csharp-mgmt) -TypeSpec with @azure-typespec/http-client-csharp-mgmt generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing @azure-typespec/http-client-csharp-mgmt, or through special handling for specific libraries. Total: 17 +TypeSpec with @azure-typespec/http-client-csharp-mgmt generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing @azure-typespec/http-client-csharp-mgmt, or through special handling for specific libraries. Total: 18 | Service | Library | Path | | ------- | ------- | ---- | @@ -211,7 +211,9 @@ TypeSpec with @azure-typespec/http-client-csharp-mgmt generator is detected by t | arizeaiobservabilityeval | Azure.ResourceManager.ArizeAIObservabilityEval | sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval | | computerecommender | Azure.ResourceManager.Compute.Recommender | sdk/computerecommender/Azure.ResourceManager.Compute.Recommender | | dellstorage | Azure.ResourceManager.Dell.Storage | sdk/dellstorage/Azure.ResourceManager.Dell.Storage | +| dependencymap | Azure.ResourceManager.DependencyMap | sdk/dependencymap/Azure.ResourceManager.DependencyMap | | deviceregistry | Azure.ResourceManager.DeviceRegistry | sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry | +| durabletask | Azure.ResourceManager.DurableTask | sdk/durabletask/Azure.ResourceManager.DurableTask | | healthdataaiservices | Azure.ResourceManager.HealthDataAIServices | sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices | | hybridkubernetes | Azure.ResourceManager.Kubernetes | sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes | | informaticadatamanagement | Azure.ResourceManager.InformaticaDataManagement | sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement | @@ -228,7 +230,7 @@ TypeSpec with @azure-typespec/http-client-csharp-mgmt generator is detected by t ## Management Plane Libraries using TypeSpec (Old Generator) -TypeSpec with old generator is detected by the presence of a tsp-location.yaml file without an emitterPackageJsonPath value, tspconfig.yaml file, tsp directory, or *.tsp files. Total: 45 +TypeSpec with old generator is detected by the presence of a tsp-location.yaml file without an emitterPackageJsonPath value, tspconfig.yaml file, tsp directory, or *.tsp files. Total: 44 | Service | Library | Path | | ------- | ------- | ---- | @@ -243,11 +245,9 @@ TypeSpec with old generator is detected by the presence of a tsp-location.yaml f | containerorchestratorruntime | Azure.ResourceManager.ContainerOrchestratorRuntime | sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime | | databasewatcher | Azure.ResourceManager.DatabaseWatcher | sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher | | databox | Azure.ResourceManager.DataBox | sdk/databox/Azure.ResourceManager.DataBox | -| dependencymap | Azure.ResourceManager.DependencyMap | sdk/dependencymap/Azure.ResourceManager.DependencyMap | | deviceprovisioningservices | Azure.ResourceManager.DeviceProvisioningServices | sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices | | devopsinfrastructure | Azure.ResourceManager.DevOpsInfrastructure | sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure | | disconnectedoperations | Azure.ResourceManager.DisconnectedOperations | sdk/disconnectedoperations/Azure.ResourceManager.DisconnectedOperations | -| durabletask | Azure.ResourceManager.DurableTask | sdk/durabletask/Azure.ResourceManager.DurableTask | | elasticsan | Azure.ResourceManager.ElasticSan | sdk/elasticsan/Azure.ResourceManager.ElasticSan | | fabric | Azure.ResourceManager.Fabric | sdk/fabric/Azure.ResourceManager.Fabric | | grafana | Azure.ResourceManager.Grafana | sdk/grafana/Azure.ResourceManager.Grafana | diff --git a/eng/CodeGeneration.targets b/eng/CodeGeneration.targets index 78883666bd68..289f789d2c6a 100644 --- a/eng/CodeGeneration.targets +++ b/eng/CodeGeneration.targets @@ -21,7 +21,11 @@ - + + + + + diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index e4d1ed942d12..2289ec286ae1 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -86,7 +86,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -204,15 +204,15 @@ - + - + - + @@ -409,6 +409,7 @@ + @@ -430,6 +431,7 @@ + @@ -444,7 +446,8 @@ - + + @@ -458,6 +461,7 @@ + @@ -477,7 +481,7 @@ 1.0.0-dev.20250930.1 - 1.0.0-alpha.20251029.3 + 1.0.0-alpha.20251103.8 1.0.0-alpha.20251022.3 \ No newline at end of file diff --git a/eng/azure-typespec-http-client-csharp-emitter-package-lock.json b/eng/azure-typespec-http-client-csharp-emitter-package-lock.json index 7035ff5c3d0d..02729f97f60d 100644 --- a/eng/azure-typespec-http-client-csharp-emitter-package-lock.json +++ b/eng/azure-typespec-http-client-csharp-emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20251029.2" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20251105.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.61.0", @@ -125,12 +125,12 @@ } }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20251029.2", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.2.tgz", - "integrity": "sha512-bl/vqKEgrwaXTchmh+M/6+3yIdD0irds3hWbmXOz7sly+/KE3XwwGkdVgq2KSfzxjATs/jpk4SILD8CZ0ZOzJg==", + "version": "1.0.0-alpha.20251105.1", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251105.1.tgz", + "integrity": "sha512-oUbqU3Kh8dPQ+3Le3p3z07vR/przIdhqbDiFBftJZmeY6ZAeaS55Rn7iOI2WRQRARMf9sgKvemqNuhyfWuPeqw==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20251029.2" + "@typespec/http-client-csharp": "1.0.0-alpha.20251103.8" } }, "node_modules/@babel/code-frame": { @@ -613,9 +613,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20251029.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.2.tgz", - "integrity": "sha512-ooiEChGSqnNZ3QO38ZR2y0WGbWNe9/rSh8wJnK+2jg5UonTAsK2L3U08qOUhMlGExs3wnuccBM5mWr7DeMv5jg==", + "version": "1.0.0-alpha.20251103.8", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251103.8.tgz", + "integrity": "sha512-axVV4R4LSIRHl8Cczg93XQDmHEzTAlgWk/X40B9oNIT8TfHqDa1qIeyGG5OPcAh0sbrtOc5VNqb1LPmKQn765Q==", "license": "MIT", "peerDependencies": { "@azure-tools/typespec-client-generator-core": ">=0.61.0 < 0.62.0 || ~0.62.0-0", @@ -1373,10 +1373,10 @@ } }, "node_modules/tar": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", - "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", diff --git a/eng/azure-typespec-http-client-csharp-emitter-package.json b/eng/azure-typespec-http-client-csharp-emitter-package.json index d52f65447c5a..15dc2e1e804f 100644 --- a/eng/azure-typespec-http-client-csharp-emitter-package.json +++ b/eng/azure-typespec-http-client-csharp-emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20251029.2" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20251105.1" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.61.0", diff --git a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json index ddc2cfe8c44c..a23a0156e723 100644 --- a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json +++ b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251026.2" + "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251103.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.61.0", @@ -142,9 +142,9 @@ } }, "node_modules/@azure-typespec/http-client-csharp-mgmt": { - "version": "1.0.0-alpha.20251026.2", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20251026.2.tgz", - "integrity": "sha512-d4xu8LlLBi7i7VO7gqrEVzEdFQTymYDntWYjwJtaFNehpkHg+2YZ5MBGrt8FTzUfQJlUDvnNJh2HwRHSuFGiyA==", + "version": "1.0.0-alpha.20251103.1", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20251103.1.tgz", + "integrity": "sha512-6NVMZqHaqQ1cGn7zj9kt4ulCETMtQy0DsyXcFRyri9GKlCt+CM1oL1I1icVN7b4Vl3mMdwLjw+06nfmj9eLcEQ==", "license": "MIT", "dependencies": { "@azure-typespec/http-client-csharp": "1.0.0-alpha.20251022.3" @@ -783,9 +783,9 @@ "license": "MIT" }, "node_modules/chardet": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", - "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", "license": "MIT" }, "node_modules/chownr": { @@ -1390,10 +1390,10 @@ } }, "node_modules/tar": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", - "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", diff --git a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json index b91a929c081a..a37ec93322a1 100644 --- a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json +++ b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251026.2" + "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251103.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.61.0", diff --git a/eng/common/instructions/azsdk-tools/check-package-validation.instructions.md b/eng/common/instructions/azsdk-tools/check-package-validation.instructions.md new file mode 100644 index 000000000000..8a1238c81f09 --- /dev/null +++ b/eng/common/instructions/azsdk-tools/check-package-validation.instructions.md @@ -0,0 +1,23 @@ +--- +description: 'Run the package validation checks for the SDK package.' +--- +## Goal +Run the validation checks for the SDK package by collecting the required information from the user and executing the `azsdk_package_run_check` tool. + +## Instructions +1. **Collect Required Information**: + - Prompt the user for the absolute package path to the package directory for the SDK package they want to check. + - Prompt the user to specify values for each of the parameters required by the azsdk_package_run_check tool. Present the user with options to pick from for the allowed values specified by the parameter schema. + +2. **Execute Check**: + - Use the `azsdk_package_run_check` tool with the package path and check type. + +3. **Present Results**: + - If the package has passed all validation checks, highlight and finish + - If the package is not ready, display the specific check types that need to be fixed for each language. + +## Expected User Interaction Flow +1. Ask: "What is the exact path of the package you want to check for validation?" +2. Ask: "Please specify the check type you want to run (e.g., 'all', 'linting', 'format', etc.)" +3. Execute the check using the provided information +4. Display results and next steps \ No newline at end of file diff --git a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md new file mode 100644 index 000000000000..284e38417701 --- /dev/null +++ b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md @@ -0,0 +1,20 @@ +--- +description: 'Verify Setup' +--- + +## Goal +This tool verifies the developer's environment for SDK development and release tasks. It returns what requirements are missing for the specified languages and repo. + +Your goal is to identify the project repo root, and pass in the `packagePath` to the Verify Setup tool. For a language repo, pass in the language of the repo. + +## Examples +- in `azure-sdk-for-js`, run `azsdk_verify_setup` with `(langs=javascript, packagePath=/azure-sdk-for-js)`. +- in `azure-sdk-for-python`, run `azsdk_verify_setup` with `(langs=python, packagePath=/azure-sdk-for-python, venvPath=)`. + +## Parameter Requirements +WHENEVER Python is included in `langs`, BEFORE RUNNING `azsdk_verify_setup`, you MUST ASK THE USER TO SPECIFY WHICH virtual environment they want to check. DO NOT ASSUME THE VENV WITHOUT ASKING THE USER. After obtaining the `venvPath`, you can run the tool. + +The user can specify multiple languages to check. If the user wants to check all languages, pass in ALL supported languages and STILL ASK for a `venvPath`. Passing in no languages will only check the core requirements. + +## Output +Display results in a user-friendly and concise format, highlighting any missing dependencies that need to be addressed. diff --git a/eng/http-client-csharp-emitter-package-lock.json b/eng/http-client-csharp-emitter-package-lock.json index b9c72cc9885c..6c9f9167e74c 100644 --- a/eng/http-client-csharp-emitter-package-lock.json +++ b/eng/http-client-csharp-emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3", + "@typespec/http-client-csharp": "1.0.0-alpha.20251103.8", "client-plugin": "file:../../../../eng/packages/plugins/client" }, "devDependencies": { @@ -607,9 +607,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20251029.3", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.3.tgz", - "integrity": "sha512-MfbuD67sfkPf14vtulmtn57z3tmKRnSXeBYEV7lbs+AFkGHggBOuV1wloFdwqPSYudZVjIJk/flkNiXbZXKrVA==", + "version": "1.0.0-alpha.20251103.8", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251103.8.tgz", + "integrity": "sha512-axVV4R4LSIRHl8Cczg93XQDmHEzTAlgWk/X40B9oNIT8TfHqDa1qIeyGG5OPcAh0sbrtOc5VNqb1LPmKQn765Q==", "license": "MIT", "peerDependencies": { "@azure-tools/typespec-client-generator-core": ">=0.61.0 < 0.62.0 || ~0.62.0-0", @@ -1370,10 +1370,10 @@ } }, "node_modules/tar": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz", - "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==", - "license": "ISC", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", @@ -1600,4 +1600,4 @@ } } } -} +} \ No newline at end of file diff --git a/eng/http-client-csharp-emitter-package.json b/eng/http-client-csharp-emitter-package.json index 90bacbf5bcdb..984273db5fdd 100644 --- a/eng/http-client-csharp-emitter-package.json +++ b/eng/http-client-csharp-emitter-package.json @@ -2,7 +2,7 @@ "main": "dist/src/index.js", "dependencies": { "client-plugin": "file:../../../../eng/packages/plugins/client", - "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3" + "@typespec/http-client-csharp": "1.0.0-alpha.20251103.8" }, "devDependencies": { "@azure-tools/typespec-client-generator-core": "0.61.0", diff --git a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-detection.ts b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-detection.ts index 06adaa6496b7..1154e70fd602 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-detection.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-detection.ts @@ -369,6 +369,8 @@ function getOperationScope(path: string): ResourceScope { return ResourceScope.ResourceGroup; } else if (path.startsWith("/subscriptions/{subscriptionId}/")) { return ResourceScope.Subscription; + } else if (path.startsWith("/providers/Microsoft.Management/managementGroups/{managementGroupId}/")) { + return ResourceScope.ManagementGroup; } return ResourceScope.Tenant; // all the templates work as if there is a tenant decorator when there is no such decorator } diff --git a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts index 360e6d51b041..8d1022d74c4f 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts @@ -5,6 +5,7 @@ const ResourceGroupScopePrefix = "/subscriptions/{subscriptionId}/resourceGroups"; const SubscriptionScopePrefix = "/subscriptions"; const TenantScopePrefix = "/tenants"; +const ManagementGroupScopePrefix = "/providers/Microsoft.Management/managementGroups"; const Providers = "/providers"; export function calculateResourceTypeFromPath(path: string): string { @@ -16,6 +17,8 @@ export function calculateResourceTypeFromPath(path: string): string { return "Microsoft.Resources/subscriptions"; } else if (path.startsWith(TenantScopePrefix)) { return "Microsoft.Resources/tenants"; + } else if (path.startsWith(ManagementGroupScopePrefix)) { + return "Microsoft.Resources/managementGroups"; } throw `Path ${path} doesn't have resource type`; } @@ -33,7 +36,8 @@ export function calculateResourceTypeFromPath(path: string): string { export enum ResourceScope { Tenant = "Tenant", Subscription = "Subscription", - ResourceGroup = "ResourceGroup" + ResourceGroup = "ResourceGroup", + ManagementGroup = "ManagementGroup" } export interface ResourceMetadata { diff --git a/eng/packages/http-client-csharp-mgmt/emitter/test/resource-detection.test.ts b/eng/packages/http-client-csharp-mgmt/emitter/test/resource-detection.test.ts index bba765563d78..5f623487fc17 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/test/resource-detection.test.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/test/resource-detection.test.ts @@ -1147,4 +1147,55 @@ interface Employees { ); ok(listByParentEntry); }); + + it("resource scope as ManagementGroup", async () => { + const program = await typeSpecCompile( + ` +/** An Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { + /** Age of employee */ + age?: int32; + + /** City of employee */ + city?: string; +} + +interface Operations extends Azure.ResourceManager.Operations {} + +@armResourceOperations +interface Employees { + get is Extension.Read< + Extension.ManagementGroup<"managementGroupId">, + Employee + >; +} +`, + runner + ); + const context = createEmitterContext(program); + const sdkContext = await createCSharpSdkContext(context); + const root = createModel(sdkContext); + updateClients(root, sdkContext); + + const employeeClient = getAllClients(root).find((c) => c.name === "Employees"); + ok(employeeClient); + + const employeeModel = root.models.find((m) => m.name === "Employee"); + ok(employeeModel); + + // Validate Employee resource metadata should be null (no CRUD operations) + const employeeResourceMetadataDecorator = employeeModel.decorators?.find( + (d) => d.name === resourceMetadata + ); + ok(employeeResourceMetadataDecorator); + strictEqual( + employeeResourceMetadataDecorator.arguments.resourceScope, + "ManagementGroup" + ); + }); }); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs deleted file mode 100644 index 392ca7533fcc..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Humanizer; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Generator.Management.Extensions -{ - internal static class StringExtensions - { - public static IEnumerable SplitByCamelCase(this string camelCase) - { - return camelCase.Humanize().Split(' ').Select(w => w.FirstCharToUpperCase()); - } - - public static string FirstCharToUpperCase(this string str) - { - if (string.IsNullOrEmpty(str) || char.IsUpper(str[0])) - return str; - - return char.ToUpper(str[0]) + str.Substring(1); - } - } -} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs index 99480cc4832d..26925c2ce34d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs @@ -46,6 +46,7 @@ internal class KnownManagementTypes ["Azure.ResourceManager.CommonTypes.SystemData"] = typeof(SystemData), ["Azure.ResourceManager.CommonTypes.UserAssignedIdentity"] = typeof(UserAssignedIdentity), ["Azure.ResourceManager.Models.SubResource"] = typeof(SubResource), + ["Azure.ResourceManager.CommonTypes.ErrorDetail"] = typeof(ResponseError), }; private static readonly Dictionary _idToPrimitiveTypeMap = new Dictionary() diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs index fe35d7e737f3..85c9d0643943 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; using Azure.Generator.Management.Snippets; using Azure.Generator.Management.Utilities; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs index d3a18a4224e1..7eeb2e7e8fb5 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using Azure.Core; -using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Snippets; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/UpdateOperationMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/UpdateOperationMethodProvider.cs index cb274f40372a..61f14130e717 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/UpdateOperationMethodProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/UpdateOperationMethodProvider.cs @@ -16,8 +16,9 @@ public UpdateOperationMethodProvider( RestClientInfo restClientInfo, InputServiceMethod method, bool isAsync, - ResourceOperationKind methodKind) - : base(resource, contextualPath, restClientInfo, method, isAsync, methodName: isAsync ? "UpdateAsync" : "Update", description: GetDescription(resource, methodKind)) + ResourceOperationKind methodKind, + bool forceLro = false) + : base(resource, contextualPath, restClientInfo, method, isAsync, methodName: isAsync ? "UpdateAsync" : "Update", description: GetDescription(resource, methodKind), forceLro: forceLro) { } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs index d8c181800c4b..7f89f2382f79 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs @@ -3,7 +3,6 @@ using Azure.Core; using Azure.Core.Pipeline; -using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; using Azure.Generator.Management.Providers.OperationMethodProviders; using Azure.Generator.Management.Providers.TagMethodProviders; @@ -434,10 +433,10 @@ protected override MethodProvider[] BuildMethods() if (isUpdateOperation) { - var updateAsyncMethodProvider = new UpdateOperationMethodProvider(this, _contextualPath, restClientInfo, method, true, methodKind); + var updateAsyncMethodProvider = new UpdateOperationMethodProvider(this, _contextualPath, restClientInfo, method, true, methodKind, isFakeLro); operationMethods.Add(updateAsyncMethodProvider); - updateMethodProvider = new UpdateOperationMethodProvider(this, _contextualPath, restClientInfo, method, false, methodKind); + updateMethodProvider = new UpdateOperationMethodProvider(this, _contextualPath, restClientInfo, method, false, methodKind, isFakeLro); operationMethods.Add(updateMethodProvider); } else diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs index ab099be124fe..970f345c3e8e 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using Azure.Core; using Azure.Core.Pipeline; -using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Providers.OperationMethodProviders; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs index c3ebd94d95a9..8d654627606d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.Generator.Management.Extensions; using Azure.Generator.Management.Models; using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Providers.OperationMethodProviders; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs similarity index 94% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs index f6a9a209476b..146a8a07be07 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs @@ -5,7 +5,7 @@ using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Providers; -namespace Azure.Generator.Management.Extensions +namespace Azure.Generator.Management.Utilities { internal static class ClientProviderExtensions { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ContextualParameterBuilder.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ContextualParameterBuilder.cs index 824b91a263b5..6f88a8dee4fc 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ContextualParameterBuilder.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ContextualParameterBuilder.cs @@ -105,9 +105,10 @@ private static void BuildContextualParameterHierarchy(RequestPathPattern current } else // in this branch value is a constant { - if (key.IsProvidersSegment) + if (!key.IsProvidersSegment) { - // if the key is not providers, we need to skip this level and increment the parent hierarchy + // When the value is a constant (e.g., a singleton resource name) and the key is not providers, + // we need to skip this level and increment the parent hierarchy so that parameters from parent segments get the correct .Parent reference appendParent = true; } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs index 3aafc46e1a5e..b2d2c06b0c80 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.Generator.Management.Extensions; using Humanizer; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs index e2f5b3723720..bf9e46fbd5ec 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs @@ -1,7 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Humanizer; using System; +using System.Collections.Generic; +using System.Linq; namespace Azure.Generator.Management.Utilities { @@ -14,5 +17,17 @@ public static string FirstCharToLowerCase(this string str) return string.Concat(char.ToLower(str[0]), str.AsSpan(1).ToString()); } + public static IEnumerable SplitByCamelCase(this string camelCase) + { + return camelCase.Humanize().Split(' ').Select(w => w.FirstCharToUpperCase()); + } + + public static string FirstCharToUpperCase(this string str) + { + if (string.IsNullOrEmpty(str) || char.IsUpper(str[0])) + return str; + + return char.ToUpper(str[0]) + str.Substring(1); + } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs index 3496fa189ea3..c9d6264f6117 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs @@ -215,21 +215,25 @@ private ValueExpression[] BuildConstructorParameters(CSharpType propertyType, Li fullConstructorParameterIndex++; } var (isOverriddenValueType, flattenedProperty) = flattenedProperties[flattenedPropertyIndex]; - var propertyParameter = flattenedProperty.AsParameter; var flattenedPropertyType = flattenedProperty.Type; var constructorParameterType = fullConstructorParameters[fullConstructorParameterIndex].Type; // If the internal property type is the same as the property type, we can use the flattened property directly. if (constructorParameterType.AreNamesEqual(flattenedPropertyType)) { - if (parameterMap.TryGetValue(propertyParameter, out var updatedParameter)) - { - parameters.Add(isOverriddenValueType ? updatedParameter.Property("Value") : updatedParameter); - } - else - { - parameters.Add(isOverriddenValueType ? propertyParameter.Property("Value") : propertyParameter); - } + var propertyParameter = flattenedProperty.AsParameter; + var parameter = (parameterMap.TryGetValue(propertyParameter, out var updatedParameter) + ? updatedParameter + : propertyParameter); + + // TODO: Ideally we could just call parameter.ToPublicInputParameter() to build the input type parameter, which is not working properly + // update the parameter type to match the constructor parameter type for now + parameter.Update(type: parameter.Type.InputType); + + parameters.Add(isOverriddenValueType + ? parameter.Property("Value") + : IsNonReadOnlyMemoryList(parameter) ? parameter.ToList() : parameter); + // only increase flattenedPropertyIndex when we use a flattened property flattenedPropertyIndex++; } @@ -268,6 +272,9 @@ int GetAdditionalPropertyIndex() } return additionalPropertyIndex; } + + bool IsNonReadOnlyMemoryList(ParameterProvider parameter) => + parameter.Type is { IsList: true, IsReadOnlyMemory: false }; } // This dictionary holds the flattened model types, where the key is the CSharpType of the model and the value is a dictionary of property names to flattened PropertyProvider. @@ -366,7 +373,7 @@ private bool PropertyFlatten(ModelProvider model, Dictionary; + + createOrUpdate is ArmResourceCreateOrReplaceSync; } \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResource.cs index 11ca11f61571..d2d081c45d2b 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BarSettingsResource.cs @@ -128,7 +128,7 @@ public virtual async Task> CreateOrUpdateAsync { CancellationToken = cancellationToken }; - HttpMessage message = _barSettingsOperationsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, BarSettingsResourceData.ToRequestContent(data), context); + HttpMessage message = _barSettingsOperationsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, BarSettingsResourceData.ToRequestContent(data), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); TestsArmOperation operation = new TestsArmOperation( new BarSettingsResourceOperationSource(Client), @@ -187,7 +187,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn { CancellationToken = cancellationToken }; - HttpMessage message = _barSettingsOperationsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, BarSettingsResourceData.ToRequestContent(data), context); + HttpMessage message = _barSettingsOperationsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, BarSettingsResourceData.ToRequestContent(data), context); Response response = Pipeline.ProcessMessage(message, context); TestsArmOperation operation = new TestsArmOperation( new BarSettingsResourceOperationSource(Client), @@ -241,7 +241,7 @@ public virtual async Task> GetAsync(CancellationTo { CancellationToken = cancellationToken }; - HttpMessage message = _barSettingsOperationsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + HttpMessage message = _barSettingsOperationsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(BarSettingsResourceData.FromResponse(result), result); if (response.Value == null) @@ -289,7 +289,7 @@ public virtual Response Get(CancellationToken cancellationT { CancellationToken = cancellationToken }; - HttpMessage message = _barSettingsOperationsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + HttpMessage message = _barSettingsOperationsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(BarSettingsResourceData.FromResponse(result), result); if (response.Value == null) diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs index 87249d4d62fa..749a9f3ee268 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/AzureGeneratorMgmtTypeSpecTestsExtensions.cs @@ -13,6 +13,7 @@ using Azure.Generator.MgmtTypeSpec.Tests.Mocking; using Azure.Generator.MgmtTypeSpec.Tests.Models; using Azure.ResourceManager; +using Azure.ResourceManager.ManagementGroups; using Azure.ResourceManager.Resources; namespace Azure.Generator.MgmtTypeSpec.Tests @@ -44,6 +45,12 @@ private static MockableAzureGeneratorMgmtTypeSpecTestsTenantResource GetMockable return tenantResource.GetCachedClient(client => new MockableAzureGeneratorMgmtTypeSpecTestsTenantResource(client, tenantResource.Id)); } + /// + private static MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(ManagementGroupResource managementGroupResource) + { + return managementGroupResource.GetCachedClient(client => new MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(client, managementGroupResource.Id)); + } + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The the method will execute against. /// The resource ID of the resource to get. @@ -591,66 +598,63 @@ public static Response PreviewActions(this SubscriptionResourc return GetMockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource(subscriptionResource).PreviewActions(location, body, cancellationToken); } - /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the . + /// Starts a failed runtime resource. /// The the method will execute against. - /// The managementGroupId for the resource. + /// The cancellation token to use. /// is null. - /// An object representing collection of GroupQuotaSubscriptionRequestStatuses and their operations over a GroupQuotaSubscriptionRequestStatusResource. - public static GroupQuotaSubscriptionRequestStatusCollection GetGroupQuotaSubscriptionRequestStatuses(this TenantResource tenantResource, string managementGroupId) + public static async Task StartFailedServerlessRuntimeAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).GetGroupQuotaSubscriptionRequestStatuses(managementGroupId); + return await GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).StartFailedServerlessRuntimeAsync(cancellationToken).ConfigureAwait(false); } - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// Starts a failed runtime resource. /// The the method will execute against. - /// The managementGroupId for the resource. - /// The name of the GroupQuotaSubscriptionRequestStatus. /// The cancellation token to use. /// is null. - [ForwardsClientCalls] - public static async Task> GetGroupQuotaSubscriptionRequestStatusAsync(this TenantResource tenantResource, string managementGroupId, string requestId, CancellationToken cancellationToken = default) + public static Response StartFailedServerlessRuntime(this TenantResource tenantResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return await GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).GetGroupQuotaSubscriptionRequestStatusAsync(managementGroupId, requestId, cancellationToken).ConfigureAwait(false); + return GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).StartFailedServerlessRuntime(cancellationToken); } - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. - /// The the method will execute against. - /// The managementGroupId for the resource. - /// The name of the GroupQuotaSubscriptionRequestStatus. - /// The cancellation token to use. - /// is null. - [ForwardsClientCalls] - public static Response GetGroupQuotaSubscriptionRequestStatus(this TenantResource tenantResource, string managementGroupId, string requestId, CancellationToken cancellationToken = default) + /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the . + /// The the method will execute against. + /// is null. + /// An object representing collection of GroupQuotaSubscriptionRequestStatuses and their operations over a GroupQuotaSubscriptionRequestStatusResource. + public static GroupQuotaSubscriptionRequestStatusCollection GetGroupQuotaSubscriptionRequestStatuses(this ManagementGroupResource managementGroupResource) { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).GetGroupQuotaSubscriptionRequestStatus(managementGroupId, requestId, cancellationToken); + return GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(managementGroupResource).GetGroupQuotaSubscriptionRequestStatuses(); } - /// Starts a failed runtime resource. - /// The the method will execute against. + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// The the method will execute against. + /// The name of the GroupQuotaSubscriptionRequestStatus. /// The cancellation token to use. - /// is null. - public static async Task StartFailedServerlessRuntimeAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + /// is null. + [ForwardsClientCalls] + public static async Task> GetGroupQuotaSubscriptionRequestStatusAsync(this ManagementGroupResource managementGroupResource, string requestId, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return await GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).StartFailedServerlessRuntimeAsync(cancellationToken).ConfigureAwait(false); + return await GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(managementGroupResource).GetGroupQuotaSubscriptionRequestStatusAsync(requestId, cancellationToken).ConfigureAwait(false); } - /// Starts a failed runtime resource. - /// The the method will execute against. + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// The the method will execute against. + /// The name of the GroupQuotaSubscriptionRequestStatus. /// The cancellation token to use. - /// is null. - public static Response StartFailedServerlessRuntime(this TenantResource tenantResource, CancellationToken cancellationToken = default) + /// is null. + [ForwardsClientCalls] + public static Response GetGroupQuotaSubscriptionRequestStatus(this ManagementGroupResource managementGroupResource, string requestId, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return GetMockableAzureGeneratorMgmtTypeSpecTestsTenantResource(tenantResource).StartFailedServerlessRuntime(cancellationToken); + return GetMockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(managementGroupResource).GetGroupQuotaSubscriptionRequestStatus(requestId, cancellationToken); } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource.cs new file mode 100644 index 000000000000..d4b9d296c719 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Generator.MgmtTypeSpec.Tests; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagementGroups; + +namespace Azure.Generator.MgmtTypeSpec.Tests.Mocking +{ + /// A class to add extension methods to . + public partial class MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource : ArmResource + { + /// Initializes a new instance of MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource for mocking. + protected MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableAzureGeneratorMgmtTypeSpecTestsManagementGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the . + /// An object representing collection of GroupQuotaSubscriptionRequestStatuses and their operations over a GroupQuotaSubscriptionRequestStatusResource. + public virtual GroupQuotaSubscriptionRequestStatusCollection GetGroupQuotaSubscriptionRequestStatuses() + { + return GetCachedClient(client => new GroupQuotaSubscriptionRequestStatusCollection(client, Id)); + } + + /// + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// + /// Request Path. + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}. + /// + /// + /// Operation Id. + /// GroupQuotaSubscriptionRequestStatuses_Get. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// + /// The name of the GroupQuotaSubscriptionRequestStatus. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGroupQuotaSubscriptionRequestStatusAsync(string requestId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestId, nameof(requestId)); + + return await GetGroupQuotaSubscriptionRequestStatuses().GetAsync(requestId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. + /// + /// + /// Request Path. + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}. + /// + /// + /// Operation Id. + /// GroupQuotaSubscriptionRequestStatuses_Get. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// + /// The name of the GroupQuotaSubscriptionRequestStatus. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGroupQuotaSubscriptionRequestStatus(string requestId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestId, nameof(requestId)); + + return GetGroupQuotaSubscriptionRequestStatuses().Get(requestId, cancellationToken); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource.cs index 5bbb3eeed082..a68b5f2c2bf1 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsResourceGroupResource.cs @@ -47,7 +47,7 @@ public virtual FooCollection GetFoos() /// /// /// Operation Id. - /// Get. + /// Foos_Get. /// /// /// Default Api Version. @@ -76,7 +76,7 @@ public virtual async Task> GetFooAsync(string fooName, Can /// /// /// Operation Id. - /// Get. + /// Foos_Get. /// /// /// Default Api Version. @@ -105,7 +105,7 @@ public virtual Response GetFoo(string fooName, CancellationToken ca /// /// /// Operation Id. - /// Get. + /// FooSettingsOperations_Get. /// /// /// Default Api Version. @@ -139,7 +139,7 @@ public virtual BazCollection GetBazs() /// /// /// Operation Id. - /// Get. + /// Bazs_Get. /// /// /// Default Api Version. @@ -168,7 +168,7 @@ public virtual async Task> GetBazAsync(string bazName, Can /// /// /// Operation Id. - /// Get. + /// Bazs_Get. /// /// /// Default Api Version. @@ -204,7 +204,7 @@ public virtual ZooCollection GetZoos() /// /// /// Operation Id. - /// Get. + /// Zoos_Get. /// /// /// Default Api Version. @@ -233,7 +233,7 @@ public virtual async Task> GetZooAsync(string zooName, Can /// /// /// Operation Id. - /// Get. + /// Zoos_Get. /// /// /// Default Api Version. @@ -269,7 +269,7 @@ public virtual JobResourceCollection GetJobResources() /// /// /// Operation Id. - /// Get. + /// JobResources_Get. /// /// /// Default Api Version. @@ -299,7 +299,7 @@ public virtual async Task> GetJobResourceAsync(string jobN /// /// /// Operation Id. - /// Get. + /// JobResources_Get. /// /// /// Default Api Version. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource.cs index ced3a2623ae8..95cb9aebd165 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsSubscriptionResource.cs @@ -75,7 +75,7 @@ public virtual PlaywrightQuotaCollection GetAllPlaywrightQuota(AzureLocation loc /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -101,7 +101,7 @@ public virtual async Task> GetPlaywrightQuotaA /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsTenantResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsTenantResource.cs index 7bbffdc3fef4..ec2fca6fd45f 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsTenantResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Extensions/MockableAzureGeneratorMgmtTypeSpecTestsTenantResource.cs @@ -39,74 +39,6 @@ internal MockableAzureGeneratorMgmtTypeSpecTestsTenantResource(ArmClient client, private PrivateLinks PrivateLinksRestClient => _privateLinksRestClient ??= new PrivateLinks(PrivateLinksClientDiagnostics, Pipeline, Endpoint, "2024-05-01"); - /// Gets a collection of GroupQuotaSubscriptionRequestStatuses in the . - /// The managementGroupId for the resource. - /// An object representing collection of GroupQuotaSubscriptionRequestStatuses and their operations over a GroupQuotaSubscriptionRequestStatusResource. - public virtual GroupQuotaSubscriptionRequestStatusCollection GetGroupQuotaSubscriptionRequestStatuses(string managementGroupId) - { - return GetCachedClient(client => new GroupQuotaSubscriptionRequestStatusCollection(client, Id, managementGroupId)); - } - - /// - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. - /// - /// - /// Request Path. - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}. - /// - /// - /// Operation Id. - /// Get. - /// - /// - /// Default Api Version. - /// 2024-05-01. - /// - /// - /// - /// The managementGroupId for the resource. - /// The name of the GroupQuotaSubscriptionRequestStatus. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetGroupQuotaSubscriptionRequestStatusAsync(string managementGroupId, string requestId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(requestId, nameof(requestId)); - - return await GetGroupQuotaSubscriptionRequestStatuses(managementGroupId).GetAsync(requestId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. - /// - /// - /// Request Path. - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}. - /// - /// - /// Operation Id. - /// Get. - /// - /// - /// Default Api Version. - /// 2024-05-01. - /// - /// - /// - /// The managementGroupId for the resource. - /// The name of the GroupQuotaSubscriptionRequestStatus. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetGroupQuotaSubscriptionRequestStatus(string managementGroupId, string requestId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(requestId, nameof(requestId)); - - return GetGroupQuotaSubscriptionRequestStatuses(managementGroupId).Get(requestId, cancellationToken); - } - /// /// Starts a failed runtime resource /// diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusCollection.cs index f446e700ea39..b457c4a4bd77 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusCollection.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusCollection.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.Resources; namespace Azure.Generator.MgmtTypeSpec.Tests { @@ -26,8 +25,6 @@ public partial class GroupQuotaSubscriptionRequestStatusCollection : ArmCollecti { private readonly ClientDiagnostics _groupQuotaSubscriptionRequestStatusesClientDiagnostics; private readonly GroupQuotaSubscriptionRequestStatuses _groupQuotaSubscriptionRequestStatusesRestClient; - /// The managementGroupId. - private readonly string _managementGroupId; /// Initializes a new instance of GroupQuotaSubscriptionRequestStatusCollection for mocking. protected GroupQuotaSubscriptionRequestStatusCollection() @@ -37,11 +34,9 @@ protected GroupQuotaSubscriptionRequestStatusCollection() /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - /// The managementGroupId for the resource. - internal GroupQuotaSubscriptionRequestStatusCollection(ArmClient client, ResourceIdentifier id, string managementGroupId) : base(client, id) + internal GroupQuotaSubscriptionRequestStatusCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { TryGetApiVersion(GroupQuotaSubscriptionRequestStatusResource.ResourceType, out string groupQuotaSubscriptionRequestStatusApiVersion); - _managementGroupId = managementGroupId; _groupQuotaSubscriptionRequestStatusesClientDiagnostics = new ClientDiagnostics("Azure.Generator.MgmtTypeSpec.Tests", GroupQuotaSubscriptionRequestStatusResource.ResourceType.Namespace, Diagnostics); _groupQuotaSubscriptionRequestStatusesRestClient = new GroupQuotaSubscriptionRequestStatuses(_groupQuotaSubscriptionRequestStatusesClientDiagnostics, Pipeline, Endpoint, groupQuotaSubscriptionRequestStatusApiVersion ?? "2024-05-01"); ValidateResourceId(id); @@ -51,9 +46,9 @@ internal GroupQuotaSubscriptionRequestStatusCollection(ArmClient client, Resourc [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != TenantResource.ResourceType) + if (id.ResourceType != GroupQuotaSubscriptionRequestStatusResource.ResourceType) { - throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, TenantResource.ResourceType), id); + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, GroupQuotaSubscriptionRequestStatusResource.ResourceType), id); } } @@ -90,7 +85,7 @@ public virtual async Task> { CancellationToken = cancellationToken }; - HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(_managementGroupId, requestId, context); + HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(Id.Name, requestId, context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(GroupQuotaSubscriptionRequestStatusData.FromResponse(result), result); if (response.Value == null) @@ -139,7 +134,7 @@ public virtual Response Get(string { CancellationToken = cancellationToken }; - HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(_managementGroupId, requestId, context); + HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(Id.Name, requestId, context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(GroupQuotaSubscriptionRequestStatusData.FromResponse(result), result); if (response.Value == null) @@ -188,7 +183,7 @@ public virtual async Task> ExistsAsync(string requestId, Cancella { CancellationToken = cancellationToken }; - HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(_managementGroupId, requestId, context); + HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(Id.Name, requestId, context); await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); Response result = message.Response; Response response = default; @@ -245,7 +240,7 @@ public virtual Response Exists(string requestId, CancellationToken cancell { CancellationToken = cancellationToken }; - HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(_managementGroupId, requestId, context); + HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(Id.Name, requestId, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; @@ -302,7 +297,7 @@ public virtual async Task response = default; @@ -363,7 +358,7 @@ public virtual NullableResponse Get { CancellationToken = cancellationToken }; - HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(_managementGroupId, requestId, context); + HttpMessage message = _groupQuotaSubscriptionRequestStatusesRestClient.CreateGetRequest(Id.Name, requestId, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusResource.cs index ac3ca3d2341e..0cd3815b2448 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/GroupQuotaSubscriptionRequestStatusResource.cs @@ -13,14 +13,14 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.ManagementGroups; namespace Azure.Generator.MgmtTypeSpec.Tests { /// /// A class representing a GroupQuotaSubscriptionRequestStatus along with the instance operations that can be performed on it. /// If you have a you can construct a from an instance of using the GetResource method. - /// Otherwise you can get one from its parent resource using the GetGroupQuotaSubscriptionRequestStatuses method. + /// Otherwise you can get one from its parent resource using the GetGroupQuotaSubscriptionRequestStatuses method. /// public partial class GroupQuotaSubscriptionRequestStatusResource : ArmResource { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecTestsModelFactory.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecTestsModelFactory.cs index a41c42b19e5d..ca04b323afd5 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecTestsModelFactory.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecTestsModelFactory.cs @@ -46,7 +46,7 @@ public static FooPreviewAction FooPreviewAction(string action = default, string /// /// , or is null. /// A new instance for mocking. - public static FooData FooData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, Uri serviceUri = default, ManagedServiceIdentity something = default, bool? boolValue = default, float? floatValue = default, double? doubleValue = default, IList prop1 = default, IList prop2 = default, ETag? etag = default, FooProperties nestedPropertyProperties = default, ExtendedLocation extendedLocation = default) + public static FooData FooData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, Uri serviceUri = default, ManagedServiceIdentity something = default, bool? boolValue = default, float? floatValue = default, double? doubleValue = default, IEnumerable prop1 = default, IEnumerable prop2 = default, ETag? etag = default, FooProperties nestedPropertyProperties = default, ExtendedLocation extendedLocation = default) { tags ??= new ChangeTrackingDictionary(); @@ -64,8 +64,8 @@ public static FooData FooData(ResourceIdentifier id = default, string name = def boolValue, floatValue, doubleValue, - prop1, - prop2, + prop1.ToList(), + prop2.ToList(), new NestedFooModel(nestedPropertyProperties, new Dictionary()), etag, new Dictionary()), @@ -111,10 +111,11 @@ public static FooActionRequest FooActionRequest(string id = default) /// The FooActionResult. /// + /// /// A new instance for mocking. - public static FooActionResult FooActionResult(string msg = default) + public static FooActionResult FooActionResult(string msg = default, ResponseError error = default) { - return new FooActionResult(msg, additionalBinaryDataProperties: null); + return new FooActionResult(msg, error, additionalBinaryDataProperties: null); } /// Concrete proxy resource types can be created by aliasing this type using a specific property type. @@ -141,14 +142,14 @@ public static FooSettingsData FooSettingsData(ResourceIdentifier id = default, s /// /// Gets the MetaDatas. /// A new instance for mocking. - public static FooSettingsProperties FooSettingsProperties(MarketplaceDetails marketplace = default, UserDetails user = default, ResourceProvisioningState? provisioningState = default, bool? accessControlEnabled = default, IList metaDatas = default) + public static FooSettingsProperties FooSettingsProperties(MarketplaceDetails marketplace = default, UserDetails user = default, ResourceProvisioningState? provisioningState = default, bool? accessControlEnabled = default, IEnumerable metaDatas = default) { return new FooSettingsProperties( marketplace, user, provisioningState, accessControlEnabled, - metaDatas is null ? default : new FooSettingsPropertiesMetaData(metaDatas, new Dictionary()), + metaDatas is null ? default : new FooSettingsPropertiesMetaData(metaDatas.ToList(), new Dictionary()), additionalBinaryDataProperties: null); } @@ -227,7 +228,7 @@ public static BarData BarData(ResourceIdentifier id = default, string name = def /// Gets the RandomCollectionProp. /// /// A new instance for mocking. - public static BarSettingsResourceData BarSettingsResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, bool? isEnabled = default, IEnumerable stringArray = default, int? propertyLeft = default, int? anotherPropertyLeft = default, int? innerProp1 = default, string innerProp2 = default, int? middleProp1 = default, IDictionary middleProp2 = default, IList prop1 = default, int? prop2 = default, IList optionalFlattenPropertyRandomCollectionProp = default, LimitJsonObject discriminatorProperty = default) + public static BarSettingsResourceData BarSettingsResourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, bool? isEnabled = default, IEnumerable stringArray = default, int? propertyLeft = default, int? anotherPropertyLeft = default, int? innerProp1 = default, string innerProp2 = default, int? middleProp1 = default, IDictionary middleProp2 = default, IEnumerable prop1 = default, int? prop2 = default, IEnumerable optionalFlattenPropertyRandomCollectionProp = default, LimitJsonObject discriminatorProperty = default) { stringArray ??= new ChangeTrackingList(); @@ -247,9 +248,9 @@ public static BarSettingsResourceData BarSettingsResourceData(ResourceIdentifier new Dictionary(), middleProp1.Value, middleProp2, - prop1, + prop1.ToList(), prop2.Value), - optionalFlattenPropertyRandomCollectionProp is null ? default : new OptionalFlattenPropertyType(optionalFlattenPropertyRandomCollectionProp, new Dictionary()), + optionalFlattenPropertyRandomCollectionProp is null ? default : new OptionalFlattenPropertyType(optionalFlattenPropertyRandomCollectionProp.ToList(), new Dictionary()), discriminatorProperty); } @@ -509,7 +510,7 @@ public static GroupQuotaSubscriptionRequestStatusData GroupQuotaSubscriptionRequ /// The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). /// List of Group Quota Limit allocated to subscriptions. /// A new instance for mocking. - public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName = default, long? limit = default, string comment = default, string unit = default, long? availableLimit = default, IList allocatedToSubscriptionsValue = default) + public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourceName = default, long? limit = default, string comment = default, string unit = default, long? availableLimit = default, IEnumerable allocatedToSubscriptionsValue = default) { return new GroupQuotaLimitProperties( resourceName, @@ -517,7 +518,7 @@ public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourc comment, unit, availableLimit, - allocatedToSubscriptionsValue is null ? default : new AllocatedQuotaToSubscriptionList(allocatedToSubscriptionsValue, new Dictionary()), + allocatedToSubscriptionsValue is null ? default : new AllocatedQuotaToSubscriptionList(allocatedToSubscriptionsValue.ToList(), new Dictionary()), additionalBinaryDataProperties: null); } @@ -528,7 +529,7 @@ public static GroupQuotaLimitProperties GroupQuotaLimitProperties(string resourc /// The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s). /// List of Group Quota Limit allocated to subscriptions. /// A new instance for mocking. - public static GroupQuotaDetails GroupQuotaDetails(string resourceName = default, long? limit = default, string comment = default, string unit = default, long? availableLimit = default, IList allocatedToSubscriptionsValue = default) + public static GroupQuotaDetails GroupQuotaDetails(string resourceName = default, long? limit = default, string comment = default, string unit = default, long? availableLimit = default, IEnumerable allocatedToSubscriptionsValue = default) { return new GroupQuotaDetails( resourceName, @@ -536,7 +537,7 @@ public static GroupQuotaDetails GroupQuotaDetails(string resourceName = default, comment, unit, availableLimit, - allocatedToSubscriptionsValue is null ? default : new AllocatedQuotaToSubscriptionList(allocatedToSubscriptionsValue, new Dictionary()), + allocatedToSubscriptionsValue is null ? default : new AllocatedQuotaToSubscriptionList(allocatedToSubscriptionsValue.ToList(), new Dictionary()), additionalBinaryDataProperties: null); } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/AzureGeneratorMgmtTypeSpecTestsContext.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/AzureGeneratorMgmtTypeSpecTestsContext.cs index aee6cb6f8e97..b30b8a2739a0 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/AzureGeneratorMgmtTypeSpecTestsContext.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/AzureGeneratorMgmtTypeSpecTestsContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.Generator.MgmtTypeSpec.Tests.Models; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; @@ -76,6 +77,7 @@ namespace Azure.Generator.MgmtTypeSpec.Tests [ModelReaderWriterBuildable(typeof(PlaywrightQuotaListResult))] [ModelReaderWriterBuildable(typeof(PlaywrightQuotaProperties))] [ModelReaderWriterBuildable(typeof(PlaywrightQuotaResource))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SelfHelpResource))] [ModelReaderWriterBuildable(typeof(SelfHelpResourceData))] [ModelReaderWriterBuildable(typeof(SelfHelpResourceProperties))] diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.Serialization.cs index cb5fee4d80a7..540dfda3636a 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure; using Azure.Generator.MgmtTypeSpec.Tests; @@ -42,6 +43,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("msg"u8); writer.WriteStringValue(Msg); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + ((IJsonModel)Error).Write(writer, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -85,6 +91,7 @@ internal static FooActionResult DeserializeFooActionResult(JsonElement element, return null; } string msg = default; + ResponseError error = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -93,12 +100,21 @@ internal static FooActionResult DeserializeFooActionResult(JsonElement element, msg = prop.Value.GetString(); continue; } + if (prop.NameEquals("error"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureGeneratorMgmtTypeSpecTestsContext.Default); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FooActionResult(msg, additionalBinaryDataProperties); + return new FooActionResult(msg, error, additionalBinaryDataProperties); } /// The client options for reading and writing models. diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.cs index 0e80f2a8cac5..862bf643e512 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooActionResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure; using Azure.Generator.MgmtTypeSpec.Tests; namespace Azure.Generator.MgmtTypeSpec.Tests.Models @@ -26,15 +27,21 @@ internal FooActionResult(string msg) /// Initializes a new instance of . /// + /// /// Keeps track of any properties unknown to the library. - internal FooActionResult(string msg, IDictionary additionalBinaryDataProperties) + internal FooActionResult(string msg, ResponseError error, IDictionary additionalBinaryDataProperties) { Msg = msg; + Error = error; _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Gets the Msg. [WirePath("msg")] public string Msg { get; } + + /// Gets the Error. + [WirePath("error")] + public ResponseError Error { get; } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.cs index 830b4ffc7f3f..690caa5ef65f 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/PlaywrightQuotaProperties.cs @@ -18,7 +18,7 @@ public partial class PlaywrightQuotaProperties private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - internal PlaywrightQuotaProperties() + public PlaywrightQuotaProperties() { } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaCollection.cs index 95e28b4f86a5..a5efe46a9137 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaCollection.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaCollection.cs @@ -60,6 +60,112 @@ internal static void ValidateResourceId(ResourceIdentifier id) } } + /// + /// Create a PlaywrightQuota + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the PlaywrightQuota. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, PlaywrightQuotaName playwrightQuotaName, PlaywrightQuotaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), PlaywrightQuotaData.ToRequestContent(data), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + RequestUriBuilder uri = message.Request.Uri; + RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + TestsArmOperation operation = new TestsArmOperation(Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a PlaywrightQuota + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the PlaywrightQuota. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, PlaywrightQuotaName playwrightQuotaName, PlaywrightQuotaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), _location, playwrightQuotaName.ToString(), PlaywrightQuotaData.ToRequestContent(data), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + RequestUriBuilder uri = message.Request.Uri; + RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + TestsArmOperation operation = new TestsArmOperation(Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get subscription-level location-based Playwright quota resource by name. /// diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.Serialization.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.Serialization.cs index 7ac88ba4d69b..e87ba9162dff 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.Serialization.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.Serialization.cs @@ -174,6 +174,18 @@ protected virtual ResourceData PersistableModelCreateCore(BinaryData data, Model /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + /// The to serialize into . + internal static RequestContent ToRequestContent(PlaywrightQuotaData playwrightQuotaData) + { + if (playwrightQuotaData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(playwrightQuotaData, ModelSerializationExtensions.WireOptions); + return content; + } + /// The to deserialize the from. internal static PlaywrightQuotaData FromResponse(Response result) { diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.cs index 8272ca47fb1e..4277123125f7 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaData.cs @@ -20,7 +20,7 @@ public partial class PlaywrightQuotaData : ResourceData private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - internal PlaywrightQuotaData() + public PlaywrightQuotaData() { } @@ -39,6 +39,6 @@ internal PlaywrightQuotaData(ResourceIdentifier id, string name, ResourceType re /// The resource-specific properties for this resource. [WirePath("properties")] - public PlaywrightQuotaProperties Properties { get; } + public PlaywrightQuotaProperties Properties { get; set; } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.cs index 3662fe7c405b..5dcb6f463daf 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/PlaywrightQuotaResource.cs @@ -187,5 +187,117 @@ public virtual Response Get(CancellationToken cancellat throw; } } + + /// + /// Create a PlaywrightQuota + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PlaywrightQuotaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, Id.Name, PlaywrightQuotaData.ToRequestContent(data), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + RequestUriBuilder uri = message.Request.Uri; + RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + TestsArmOperation operation = new TestsArmOperation(Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a PlaywrightQuota + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2024-05-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PlaywrightQuotaData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _playwrightQuotasClientDiagnostics.CreateScope("PlaywrightQuotaResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _playwrightQuotasRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, Id.Name, PlaywrightQuotaData.ToRequestContent(data), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(PlaywrightQuotaData.FromResponse(result), result); + RequestUriBuilder uri = message.Request.Uri; + RehydrationToken rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + TestsArmOperation operation = new TestsArmOperation(Response.FromValue(new PlaywrightQuotaResource(Client, response.Value), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs index e45ec1c7d38f..d7aab660474d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/PlaywrightQuotasRestOperations.cs @@ -89,5 +89,26 @@ internal HttpMessage CreateNextGetBySubscriptionRequest(Uri nextPage, Guid subsc request.Headers.SetValue("Accept", "application/json"); return message; } + + internal HttpMessage CreateCreateOrUpdateRequest(Guid subscriptionId, AzureLocation location, string playwrightQuotaName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId.ToString(), true); + uri.AppendPath("/providers/MgmtTypeSpec/locations/", false); + uri.AppendPath(location.ToString(), true); + uri.AppendPath("/playwrightQuotas/", false); + uri.AppendPath(playwrightQuotaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; + return message; + } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/tspCodeModel.json b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/tspCodeModel.json index 25e6702a7897..1f3beae050bd 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/tspCodeModel.json +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/tspCodeModel.json @@ -1757,7 +1757,7 @@ { "$id": "192", "kind": "constant", - "name": "getContentType9", + "name": "createOrUpdateContentType24", "namespace": "", "usage": "None", "valueType": { @@ -1773,7 +1773,7 @@ { "$id": "194", "kind": "constant", - "name": "updateContentType16", + "name": "createOrUpdateContentType25", "namespace": "", "usage": "None", "valueType": { @@ -1789,7 +1789,7 @@ { "$id": "196", "kind": "constant", - "name": "updateContentType17", + "name": "getContentType9", "namespace": "", "usage": "None", "valueType": { @@ -1805,7 +1805,7 @@ { "$id": "198", "kind": "constant", - "name": "updateContentType18", + "name": "updateContentType16", "namespace": "", "usage": "None", "valueType": { @@ -1821,7 +1821,7 @@ { "$id": "200", "kind": "constant", - "name": "updateContentType19", + "name": "updateContentType17", "namespace": "", "usage": "None", "valueType": { @@ -1837,7 +1837,7 @@ { "$id": "202", "kind": "constant", - "name": "getContentType10", + "name": "updateContentType18", "namespace": "", "usage": "None", "valueType": { @@ -1853,7 +1853,7 @@ { "$id": "204", "kind": "constant", - "name": "getContentType11", + "name": "updateContentType19", "namespace": "", "usage": "None", "valueType": { @@ -1869,7 +1869,7 @@ { "$id": "206", "kind": "constant", - "name": "getContentType12", + "name": "getContentType10", "namespace": "", "usage": "None", "valueType": { @@ -1885,7 +1885,7 @@ { "$id": "208", "kind": "constant", - "name": "updateContentType20", + "name": "getContentType11", "namespace": "", "usage": "None", "valueType": { @@ -1901,7 +1901,7 @@ { "$id": "210", "kind": "constant", - "name": "updateContentType21", + "name": "getContentType12", "namespace": "", "usage": "None", "valueType": { @@ -1917,7 +1917,7 @@ { "$id": "212", "kind": "constant", - "name": "recommendContentType", + "name": "updateContentType20", "namespace": "", "usage": "None", "valueType": { @@ -1929,11 +1929,43 @@ }, "value": "application/json", "decorators": [] + }, + { + "$id": "214", + "kind": "constant", + "name": "updateContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "216", + "kind": "constant", + "name": "recommendContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] } ], "models": [ { - "$id": "214", + "$id": "218", "kind": "model", "name": "FooPreviewAction", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -1947,13 +1979,13 @@ ], "properties": [ { - "$id": "215", + "$id": "219", "kind": "property", "name": "action", "serializedName": "action", "doc": "The action to be performed.", "type": { - "$id": "216", + "$id": "220", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1973,12 +2005,12 @@ "isHttpMetadata": false }, { - "$id": "217", + "$id": "221", "kind": "property", "name": "result", "serializedName": "result", "type": { - "$id": "218", + "$id": "222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2000,7 +2032,7 @@ ] }, { - "$id": "219", + "$id": "223", "kind": "model", "name": "ErrorResponse", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2016,13 +2048,13 @@ ], "properties": [ { - "$id": "220", + "$id": "224", "kind": "property", "name": "error", "serializedName": "error", "doc": "The error object.", "type": { - "$id": "221", + "$id": "225", "kind": "model", "name": "ErrorDetail", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2037,13 +2069,13 @@ ], "properties": [ { - "$id": "222", + "$id": "226", "kind": "property", "name": "code", "serializedName": "code", "doc": "The error code.", "type": { - "$id": "223", + "$id": "227", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2063,13 +2095,13 @@ "isHttpMetadata": false }, { - "$id": "224", + "$id": "228", "kind": "property", "name": "message", "serializedName": "message", "doc": "The error message.", "type": { - "$id": "225", + "$id": "229", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2089,13 +2121,13 @@ "isHttpMetadata": false }, { - "$id": "226", + "$id": "230", "kind": "property", "name": "target", "serializedName": "target", "doc": "The error target.", "type": { - "$id": "227", + "$id": "231", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2115,17 +2147,17 @@ "isHttpMetadata": false }, { - "$id": "228", + "$id": "232", "kind": "property", "name": "details", "serializedName": "details", "doc": "The error details.", "type": { - "$id": "229", + "$id": "233", "kind": "array", "name": "ArrayErrorDetail", "valueType": { - "$ref": "221" + "$ref": "225" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2144,17 +2176,17 @@ "isHttpMetadata": false }, { - "$id": "230", + "$id": "234", "kind": "property", "name": "additionalInfo", "serializedName": "additionalInfo", "doc": "The error additional info.", "type": { - "$id": "231", + "$id": "235", "kind": "array", "name": "ArrayErrorAdditionalInfo", "valueType": { - "$id": "232", + "$id": "236", "kind": "model", "name": "ErrorAdditionalInfo", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2169,13 +2201,13 @@ ], "properties": [ { - "$id": "233", + "$id": "237", "kind": "property", "name": "type", "serializedName": "type", "doc": "The additional info type.", "type": { - "$id": "234", + "$id": "238", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2195,13 +2227,13 @@ "isHttpMetadata": false }, { - "$id": "235", + "$id": "239", "kind": "property", "name": "info", "serializedName": "info", "doc": "The additional info.", "type": { - "$id": "236", + "$id": "240", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2256,13 +2288,13 @@ ] }, { - "$ref": "221" + "$ref": "225" }, { - "$ref": "232" + "$ref": "236" }, { - "$id": "237", + "$id": "241", "kind": "model", "name": "OperationListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2277,17 +2309,17 @@ ], "properties": [ { - "$id": "238", + "$id": "242", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Operation items on this page", "type": { - "$id": "239", + "$id": "243", "kind": "array", "name": "ArrayOperation", "valueType": { - "$id": "240", + "$id": "244", "kind": "model", "name": "Operation", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2303,13 +2335,13 @@ ], "properties": [ { - "$id": "241", + "$id": "245", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", "type": { - "$id": "242", + "$id": "246", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2329,13 +2361,13 @@ "isHttpMetadata": false }, { - "$id": "243", + "$id": "247", "kind": "property", "name": "isDataAction", "serializedName": "isDataAction", "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", "type": { - "$id": "244", + "$id": "248", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -2355,13 +2387,13 @@ "isHttpMetadata": false }, { - "$id": "245", + "$id": "249", "kind": "property", "name": "display", "serializedName": "display", "doc": "Localized display information for this particular operation.", "type": { - "$id": "246", + "$id": "250", "kind": "model", "name": "OperationDisplay", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2376,13 +2408,13 @@ ], "properties": [ { - "$id": "247", + "$id": "251", "kind": "property", "name": "provider", "serializedName": "provider", "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", "type": { - "$id": "248", + "$id": "252", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2402,13 +2434,13 @@ "isHttpMetadata": false }, { - "$id": "249", + "$id": "253", "kind": "property", "name": "resource", "serializedName": "resource", "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", "type": { - "$id": "250", + "$id": "254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2428,13 +2460,13 @@ "isHttpMetadata": false }, { - "$id": "251", + "$id": "255", "kind": "property", "name": "operation", "serializedName": "operation", "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", "type": { - "$id": "252", + "$id": "256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2454,13 +2486,13 @@ "isHttpMetadata": false }, { - "$id": "253", + "$id": "257", "kind": "property", "name": "description", "serializedName": "description", "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", "type": { - "$id": "254", + "$id": "258", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2495,7 +2527,7 @@ "isHttpMetadata": false }, { - "$id": "255", + "$id": "259", "kind": "property", "name": "origin", "serializedName": "origin", @@ -2517,7 +2549,7 @@ "isHttpMetadata": false }, { - "$id": "256", + "$id": "260", "kind": "property", "name": "actionType", "serializedName": "actionType", @@ -2557,18 +2589,18 @@ "isHttpMetadata": false }, { - "$id": "257", + "$id": "261", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "258", + "$id": "262", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "259", + "$id": "263", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2592,13 +2624,13 @@ ] }, { - "$ref": "240" + "$ref": "244" }, { - "$ref": "246" + "$ref": "250" }, { - "$id": "260", + "$id": "264", "kind": "model", "name": "PrivateLinkListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2613,17 +2645,17 @@ ], "properties": [ { - "$id": "261", + "$id": "265", "kind": "property", "name": "value", "serializedName": "value", "doc": "The PrivateLink items on this page", "type": { - "$id": "262", + "$id": "266", "kind": "array", "name": "ArrayPrivateLink", "valueType": { - "$id": "263", + "$id": "267", "kind": "model", "name": "PrivateLink", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2641,7 +2673,7 @@ } ], "baseModel": { - "$id": "264", + "$id": "268", "kind": "model", "name": "ProxyResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2656,7 +2688,7 @@ } ], "baseModel": { - "$id": "265", + "$id": "269", "kind": "model", "name": "Resource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2672,18 +2704,18 @@ ], "properties": [ { - "$id": "266", + "$id": "270", "kind": "property", "name": "id", "serializedName": "id", "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", "type": { - "$id": "267", + "$id": "271", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "268", + "$id": "272", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2705,13 +2737,13 @@ "isHttpMetadata": false }, { - "$id": "269", + "$id": "273", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the resource", "type": { - "$id": "270", + "$id": "274", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2731,18 +2763,18 @@ "isHttpMetadata": false }, { - "$id": "271", + "$id": "275", "kind": "property", "name": "type", "serializedName": "type", "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", "type": { - "$id": "272", + "$id": "276", "kind": "string", "name": "armResourceType", "crossLanguageDefinitionId": "Azure.Core.armResourceType", "baseType": { - "$id": "273", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2764,13 +2796,13 @@ "isHttpMetadata": false }, { - "$id": "274", + "$id": "278", "kind": "property", "name": "systemData", "serializedName": "systemData", "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "type": { - "$id": "275", + "$id": "279", "kind": "model", "name": "SystemData", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2785,13 +2817,13 @@ ], "properties": [ { - "$id": "276", + "$id": "280", "kind": "property", "name": "createdBy", "serializedName": "createdBy", "doc": "The identity that created the resource.", "type": { - "$id": "277", + "$id": "281", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2811,7 +2843,7 @@ "isHttpMetadata": false }, { - "$id": "278", + "$id": "282", "kind": "property", "name": "createdByType", "serializedName": "createdByType", @@ -2833,18 +2865,18 @@ "isHttpMetadata": false }, { - "$id": "279", + "$id": "283", "kind": "property", "name": "createdAt", "serializedName": "createdAt", "doc": "The timestamp of resource creation (UTC).", "type": { - "$id": "280", + "$id": "284", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "281", + "$id": "285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2867,13 +2899,13 @@ "isHttpMetadata": false }, { - "$id": "282", + "$id": "286", "kind": "property", "name": "lastModifiedBy", "serializedName": "lastModifiedBy", "doc": "The identity that last modified the resource.", "type": { - "$id": "283", + "$id": "287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2893,7 +2925,7 @@ "isHttpMetadata": false }, { - "$id": "284", + "$id": "288", "kind": "property", "name": "lastModifiedByType", "serializedName": "lastModifiedByType", @@ -2915,18 +2947,18 @@ "isHttpMetadata": false }, { - "$id": "285", + "$id": "289", "kind": "property", "name": "lastModifiedAt", "serializedName": "lastModifiedAt", "doc": "The timestamp of resource last modification (UTC)", "type": { - "$id": "286", + "$id": "290", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "287", + "$id": "291", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2969,13 +3001,13 @@ }, "properties": [ { - "$id": "288", + "$id": "292", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "289", + "$id": "293", "kind": "model", "name": "PrivateLinkResourceProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -2990,13 +3022,13 @@ ], "properties": [ { - "$id": "290", + "$id": "294", "kind": "property", "name": "groupId", "serializedName": "groupId", "doc": "The private link resource group id.", "type": { - "$id": "291", + "$id": "295", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3016,17 +3048,17 @@ "isHttpMetadata": false }, { - "$id": "292", + "$id": "296", "kind": "property", "name": "requiredMembers", "serializedName": "requiredMembers", "doc": "The private link resource required member names.", "type": { - "$id": "293", + "$id": "297", "kind": "array", "name": "Array", "valueType": { - "$id": "294", + "$id": "298", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3049,13 +3081,13 @@ "isHttpMetadata": false }, { - "$id": "295", + "$id": "299", "kind": "property", "name": "requiredZoneNames", "serializedName": "requiredZoneNames", "doc": "The private link resource private link DNS zone name.", "type": { - "$ref": "293" + "$ref": "297" }, "optional": true, "readOnly": false, @@ -3086,13 +3118,13 @@ "isHttpMetadata": false }, { - "$id": "296", + "$id": "300", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "297", + "$id": "301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3112,13 +3144,13 @@ "isHttpMetadata": true }, { - "$id": "298", + "$id": "302", "kind": "property", "name": "identity", "serializedName": "identity", "doc": "The managed service identities assigned to this resource.", "type": { - "$id": "299", + "$id": "303", "kind": "model", "name": "ManagedServiceIdentity", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3133,18 +3165,18 @@ ], "properties": [ { - "$id": "300", + "$id": "304", "kind": "property", "name": "principalId", "serializedName": "principalId", "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", "type": { - "$id": "301", + "$id": "305", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "302", + "$id": "306", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3166,18 +3198,18 @@ "isHttpMetadata": false }, { - "$id": "303", + "$id": "307", "kind": "property", "name": "tenantId", "serializedName": "tenantId", "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", "type": { - "$id": "304", + "$id": "308", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "305", + "$id": "309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3199,7 +3231,7 @@ "isHttpMetadata": false }, { - "$id": "306", + "$id": "310", "kind": "property", "name": "type", "serializedName": "type", @@ -3221,26 +3253,26 @@ "isHttpMetadata": false }, { - "$id": "307", + "$id": "311", "kind": "property", "name": "userAssignedIdentities", "serializedName": "userAssignedIdentities", "doc": "The identities assigned to this resource by the user.", "type": { - "$id": "308", + "$id": "312", "kind": "dict", "keyType": { - "$id": "309", + "$id": "313", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "310", + "$id": "314", "kind": "nullable", "type": { - "$id": "311", + "$id": "315", "kind": "model", "name": "UserAssignedIdentity", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3255,18 +3287,18 @@ ], "properties": [ { - "$id": "312", + "$id": "316", "kind": "property", "name": "principalId", "serializedName": "principalId", "doc": "The principal ID of the assigned identity.", "type": { - "$id": "313", + "$id": "317", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "314", + "$id": "318", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3288,18 +3320,18 @@ "isHttpMetadata": false }, { - "$id": "315", + "$id": "319", "kind": "property", "name": "clientId", "serializedName": "clientId", "doc": "The client ID of the assigned identity.", "type": { - "$id": "316", + "$id": "320", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "317", + "$id": "321", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3373,18 +3405,18 @@ "isHttpMetadata": false }, { - "$id": "318", + "$id": "322", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "319", + "$id": "323", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "320", + "$id": "324", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -3408,28 +3440,28 @@ ] }, { - "$ref": "263" + "$ref": "267" }, { - "$ref": "289" + "$ref": "293" }, { - "$ref": "299" + "$ref": "303" }, { - "$ref": "311" + "$ref": "315" }, { - "$ref": "264" + "$ref": "268" }, { - "$ref": "265" + "$ref": "269" }, { - "$ref": "275" + "$ref": "279" }, { - "$id": "321", + "$id": "325", "kind": "model", "name": "StartParameterBody", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3443,12 +3475,12 @@ ], "properties": [ { - "$id": "322", + "$id": "326", "kind": "property", "name": "body", "doc": "SAP Application server instance start request body.", "type": { - "$id": "323", + "$id": "327", "kind": "model", "name": "StartRequest", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3463,13 +3495,13 @@ ], "properties": [ { - "$id": "324", + "$id": "328", "kind": "property", "name": "startVm", "serializedName": "startVm", "doc": "The boolean value indicates whether to start the virtual machines before starting the SAP instances.", "type": { - "$id": "325", + "$id": "329", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3502,10 +3534,10 @@ ] }, { - "$ref": "323" + "$ref": "327" }, { - "$id": "326", + "$id": "330", "kind": "model", "name": "OperationStatusResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3520,18 +3552,18 @@ ], "properties": [ { - "$id": "327", + "$id": "331", "kind": "property", "name": "id", "serializedName": "id", "doc": "Fully qualified ID for the async operation.", "type": { - "$id": "328", + "$id": "332", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "329", + "$id": "333", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3553,13 +3585,13 @@ "isHttpMetadata": false }, { - "$id": "330", + "$id": "334", "kind": "property", "name": "name", "serializedName": "name", "doc": "Name of the async operation.", "type": { - "$id": "331", + "$id": "335", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3579,13 +3611,13 @@ "isHttpMetadata": false }, { - "$id": "332", + "$id": "336", "kind": "property", "name": "status", "serializedName": "status", "doc": "Operation status.", "type": { - "$id": "333", + "$id": "337", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3605,13 +3637,13 @@ "isHttpMetadata": false }, { - "$id": "334", + "$id": "338", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "Percent of the operation that is complete.", "type": { - "$id": "335", + "$id": "339", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -3631,18 +3663,18 @@ "isHttpMetadata": false }, { - "$id": "336", + "$id": "340", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "The start time of the operation.", "type": { - "$id": "337", + "$id": "341", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "338", + "$id": "342", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3665,18 +3697,18 @@ "isHttpMetadata": false }, { - "$id": "339", + "$id": "343", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "The end time of the operation.", "type": { - "$id": "340", + "$id": "344", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "341", + "$id": "345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3699,17 +3731,17 @@ "isHttpMetadata": false }, { - "$id": "342", + "$id": "346", "kind": "property", "name": "operations", "serializedName": "operations", "doc": "The operations list.", "type": { - "$id": "343", + "$id": "347", "kind": "array", "name": "ArrayOperationStatusResult", "valueType": { - "$ref": "326" + "$ref": "330" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3728,13 +3760,13 @@ "isHttpMetadata": false }, { - "$id": "344", + "$id": "348", "kind": "property", "name": "error", "serializedName": "error", "doc": "If present, details of the operation error.", "type": { - "$ref": "221" + "$ref": "225" }, "optional": true, "readOnly": false, @@ -3750,18 +3782,18 @@ "isHttpMetadata": false }, { - "$id": "345", + "$id": "349", "kind": "property", "name": "resourceId", "serializedName": "resourceId", "doc": "Fully qualified ID of the resource against which the original async operation was started.", "type": { - "$id": "346", + "$id": "350", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "347", + "$id": "351", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3785,7 +3817,7 @@ ] }, { - "$id": "348", + "$id": "352", "kind": "model", "name": "ArmOperationStatusResourceProvisioningState", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -3800,7 +3832,7 @@ ], "properties": [ { - "$id": "349", + "$id": "353", "kind": "property", "name": "status", "serializedName": "status", @@ -3822,13 +3854,13 @@ "isHttpMetadata": false }, { - "$id": "350", + "$id": "354", "kind": "property", "name": "id", "serializedName": "id", "doc": "The unique identifier for the operationStatus resource", "type": { - "$id": "351", + "$id": "355", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3848,13 +3880,13 @@ "isHttpMetadata": true }, { - "$id": "352", + "$id": "356", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the operationStatus resource", "type": { - "$id": "353", + "$id": "357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3874,18 +3906,18 @@ "isHttpMetadata": false }, { - "$id": "354", + "$id": "358", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "Operation start time", "type": { - "$id": "355", + "$id": "359", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "356", + "$id": "360", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3908,18 +3940,18 @@ "isHttpMetadata": false }, { - "$id": "357", + "$id": "361", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "Operation complete time", "type": { - "$id": "358", + "$id": "362", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "359", + "$id": "363", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3942,13 +3974,13 @@ "isHttpMetadata": false }, { - "$id": "360", + "$id": "364", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "The progress made toward completing the operation", "type": { - "$id": "361", + "$id": "365", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -3968,13 +4000,13 @@ "isHttpMetadata": false }, { - "$id": "362", + "$id": "366", "kind": "property", "name": "error", "serializedName": "error", "doc": "Errors that occurred if the operation ended with Canceled or Failed status", "type": { - "$ref": "221" + "$ref": "225" }, "optional": true, "readOnly": true, @@ -3992,7 +4024,7 @@ ] }, { - "$id": "363", + "$id": "367", "kind": "model", "name": "Foo", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4015,7 +4047,7 @@ "resourceType": "MgmtTypeSpec/foos", "methods": [ { - "$id": "364", + "$id": "368", "methodId": "MgmtTypeSpec.Foos.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -4023,7 +4055,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "365", + "$id": "369", "methodId": "MgmtTypeSpec.Foos.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -4031,7 +4063,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "366", + "$id": "370", "methodId": "MgmtTypeSpec.Foos.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}", @@ -4039,21 +4071,21 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "367", + "$id": "371", "methodId": "MgmtTypeSpec.Foos.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos", "operationScope": "ResourceGroup" }, { - "$id": "368", + "$id": "372", "methodId": "MgmtTypeSpec.Foos.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/foos", "operationScope": "Subscription" }, { - "$id": "369", + "$id": "373", "methodId": "MgmtTypeSpec.Foos.fooAction", "kind": "Action", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/exportDependencies", @@ -4067,7 +4099,7 @@ } ], "baseModel": { - "$id": "370", + "$id": "374", "kind": "model", "name": "TrackedResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4082,27 +4114,27 @@ } ], "baseModel": { - "$ref": "265" + "$ref": "269" }, "properties": [ { - "$id": "371", + "$id": "375", "kind": "property", "name": "tags", "serializedName": "tags", "doc": "Resource tags.", "type": { - "$id": "372", + "$id": "376", "kind": "dict", "keyType": { - "$id": "373", + "$id": "377", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "374", + "$id": "378", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4124,18 +4156,18 @@ "isHttpMetadata": false }, { - "$id": "375", + "$id": "379", "kind": "property", "name": "location", "serializedName": "location", "doc": "The geo-location where the resource lives", "type": { - "$id": "376", + "$id": "380", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "377", + "$id": "381", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4160,13 +4192,13 @@ }, "properties": [ { - "$id": "378", + "$id": "382", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "379", + "$id": "383", "kind": "model", "name": "FooProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4186,13 +4218,13 @@ ], "properties": [ { - "$id": "380", + "$id": "384", "kind": "property", "name": "serviceUrl", "serializedName": "serviceUrl", "doc": "the service url", "type": { - "$id": "381", + "$id": "385", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -4212,13 +4244,13 @@ "isHttpMetadata": false }, { - "$id": "382", + "$id": "386", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$ref": "299" + "$ref": "303" }, "optional": false, "readOnly": false, @@ -4234,13 +4266,13 @@ "isHttpMetadata": false }, { - "$id": "383", + "$id": "387", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "384", + "$id": "388", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4260,13 +4292,13 @@ "isHttpMetadata": false }, { - "$id": "385", + "$id": "389", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "doc": "float value", "type": { - "$id": "386", + "$id": "390", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -4286,13 +4318,13 @@ "isHttpMetadata": false }, { - "$id": "387", + "$id": "391", "kind": "property", "name": "doubleValue", "serializedName": "doubleValue", "doc": "double value", "type": { - "$id": "388", + "$id": "392", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -4312,12 +4344,12 @@ "isHttpMetadata": false }, { - "$id": "389", + "$id": "393", "kind": "property", "name": "prop1", "serializedName": "prop1", "type": { - "$ref": "293" + "$ref": "297" }, "optional": false, "readOnly": false, @@ -4333,16 +4365,16 @@ "isHttpMetadata": false }, { - "$id": "390", + "$id": "394", "kind": "property", "name": "prop2", "serializedName": "prop2", "type": { - "$id": "391", + "$id": "395", "kind": "array", "name": "Array1", "valueType": { - "$id": "392", + "$id": "396", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4365,12 +4397,12 @@ "isHttpMetadata": false }, { - "$id": "393", + "$id": "397", "kind": "property", "name": "nestedProperty", "serializedName": "nestedProperty", "type": { - "$id": "394", + "$id": "398", "kind": "model", "name": "NestedFooModel", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4384,12 +4416,12 @@ ], "properties": [ { - "$id": "395", + "$id": "399", "kind": "property", "name": "properties", "serializedName": "properties", "type": { - "$ref": "379" + "$ref": "383" }, "optional": false, "readOnly": false, @@ -4420,18 +4452,18 @@ "isHttpMetadata": false }, { - "$id": "396", + "$id": "400", "kind": "property", "name": "etag", "serializedName": "etag", "doc": "ETag property for testing etag parameter name generation", "type": { - "$id": "397", + "$id": "401", "kind": "string", "name": "eTag", "crossLanguageDefinitionId": "Azure.Core.eTag", "baseType": { - "$id": "398", + "$id": "402", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4473,13 +4505,13 @@ "isHttpMetadata": false }, { - "$id": "399", + "$id": "403", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Foo", "type": { - "$id": "400", + "$id": "404", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4499,12 +4531,12 @@ "isHttpMetadata": true }, { - "$id": "401", + "$id": "405", "kind": "property", "name": "extendedLocation", "serializedName": "extendedLocation", "type": { - "$id": "402", + "$id": "406", "kind": "model", "name": "ExtendedLocation", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4519,13 +4551,13 @@ ], "properties": [ { - "$id": "403", + "$id": "407", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the extended location.", "type": { - "$id": "404", + "$id": "408", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4545,7 +4577,7 @@ "isHttpMetadata": false }, { - "$id": "405", + "$id": "409", "kind": "property", "name": "type", "serializedName": "type", @@ -4584,19 +4616,19 @@ ] }, { - "$ref": "379" + "$ref": "383" }, { - "$ref": "394" + "$ref": "398" }, { - "$ref": "402" + "$ref": "406" }, { - "$ref": "370" + "$ref": "374" }, { - "$id": "406", + "$id": "410", "kind": "model", "name": "FooListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4611,17 +4643,17 @@ ], "properties": [ { - "$id": "407", + "$id": "411", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Foo items on this page", "type": { - "$id": "408", + "$id": "412", "kind": "array", "name": "ArrayFoo", "valueType": { - "$ref": "363" + "$ref": "367" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4640,18 +4672,18 @@ "isHttpMetadata": false }, { - "$id": "409", + "$id": "413", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "410", + "$id": "414", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "411", + "$id": "415", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -4675,7 +4707,7 @@ ] }, { - "$id": "412", + "$id": "416", "kind": "model", "name": "FooActionRequest", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4689,12 +4721,12 @@ ], "properties": [ { - "$id": "413", + "$id": "417", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "414", + "$id": "418", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4716,7 +4748,7 @@ ] }, { - "$id": "415", + "$id": "419", "kind": "model", "name": "FooActionResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4730,12 +4762,12 @@ ], "properties": [ { - "$id": "416", + "$id": "420", "kind": "property", "name": "msg", "serializedName": "msg", "type": { - "$id": "417", + "$id": "421", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4753,11 +4785,32 @@ } }, "isHttpMetadata": false + }, + { + "$id": "422", + "kind": "property", + "name": "error", + "serializedName": "error", + "type": { + "$ref": "225" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.FooActionResult.error", + "serializationOptions": { + "json": { + "name": "error" + } + }, + "isHttpMetadata": false } ] }, { - "$id": "418", + "$id": "423", "kind": "model", "name": "FooSettings", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4784,7 +4837,7 @@ "resourceType": "MgmtTypeSpec/FooSettings", "methods": [ { - "$id": "419", + "$id": "424", "methodId": "MgmtTypeSpec.FooSettingsOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4792,7 +4845,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "420", + "$id": "425", "methodId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4800,7 +4853,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "421", + "$id": "426", "methodId": "MgmtTypeSpec.FooSettingsOperations.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4808,7 +4861,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default" }, { - "$id": "422", + "$id": "427", "methodId": "MgmtTypeSpec.FooSettingsOperations.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/FooSettings/default", @@ -4823,17 +4876,17 @@ } ], "baseModel": { - "$ref": "264" + "$ref": "268" }, "properties": [ { - "$id": "423", + "$id": "428", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "424", + "$id": "429", "kind": "model", "name": "FooSettingsProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4848,13 +4901,13 @@ ], "properties": [ { - "$id": "425", + "$id": "430", "kind": "property", "name": "marketplace", "serializedName": "marketplace", "doc": "Marketplace details of the resource.", "type": { - "$id": "426", + "$id": "431", "kind": "model", "name": "MarketplaceDetails", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4869,13 +4922,13 @@ ], "properties": [ { - "$id": "427", + "$id": "432", "kind": "property", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "Azure subscription id for the the marketplace offer is purchased from", "type": { - "$id": "428", + "$id": "433", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4895,7 +4948,7 @@ "isHttpMetadata": false }, { - "$id": "429", + "$id": "434", "kind": "property", "name": "subscriptionStatus", "serializedName": "subscriptionStatus", @@ -4917,13 +4970,13 @@ "isHttpMetadata": false }, { - "$id": "430", + "$id": "435", "kind": "property", "name": "offerDetails", "serializedName": "offerDetails", "doc": "Offer details for the marketplace that is selected by the user", "type": { - "$id": "431", + "$id": "436", "kind": "model", "name": "OfferDetails", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -4938,13 +4991,13 @@ ], "properties": [ { - "$id": "432", + "$id": "437", "kind": "property", "name": "publisherId", "serializedName": "publisherId", "doc": "Publisher Id for the marketplace offer", "type": { - "$id": "433", + "$id": "438", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4964,13 +5017,13 @@ "isHttpMetadata": false }, { - "$id": "434", + "$id": "439", "kind": "property", "name": "offerId", "serializedName": "offerId", "doc": "Offer Id for the marketplace offer", "type": { - "$id": "435", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4990,13 +5043,13 @@ "isHttpMetadata": false }, { - "$id": "436", + "$id": "441", "kind": "property", "name": "planId", "serializedName": "planId", "doc": "Plan Id for the marketplace offer", "type": { - "$id": "437", + "$id": "442", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5016,13 +5069,13 @@ "isHttpMetadata": false }, { - "$id": "438", + "$id": "443", "kind": "property", "name": "planName", "serializedName": "planName", "doc": "Plan Name for the marketplace offer", "type": { - "$id": "439", + "$id": "444", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5042,13 +5095,13 @@ "isHttpMetadata": false }, { - "$id": "440", + "$id": "445", "kind": "property", "name": "termUnit", "serializedName": "termUnit", "doc": "Plan Display Name for the marketplace offer", "type": { - "$id": "441", + "$id": "446", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5068,13 +5121,13 @@ "isHttpMetadata": false }, { - "$id": "442", + "$id": "447", "kind": "property", "name": "termId", "serializedName": "termId", "doc": "Plan Display Name for the marketplace offer", "type": { - "$id": "443", + "$id": "448", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5094,7 +5147,7 @@ "isHttpMetadata": false }, { - "$id": "444", + "$id": "449", "kind": "property", "name": "renewalMode", "serializedName": "renewalMode", @@ -5116,18 +5169,18 @@ "isHttpMetadata": false }, { - "$id": "445", + "$id": "450", "kind": "property", "name": "endDate", "serializedName": "endDate", "doc": "Current subscription end date and time", "type": { - "$id": "446", + "$id": "451", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "447", + "$id": "452", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5180,13 +5233,13 @@ "isHttpMetadata": false }, { - "$id": "448", + "$id": "453", "kind": "property", "name": "user", "serializedName": "user", "doc": "Details of the user.", "type": { - "$id": "449", + "$id": "454", "kind": "model", "name": "UserDetails", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5201,13 +5254,13 @@ ], "properties": [ { - "$id": "450", + "$id": "455", "kind": "property", "name": "firstName", "serializedName": "firstName", "doc": "First name of the user", "type": { - "$id": "451", + "$id": "456", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5227,13 +5280,13 @@ "isHttpMetadata": false }, { - "$id": "452", + "$id": "457", "kind": "property", "name": "lastName", "serializedName": "lastName", "doc": "Last name of the user", "type": { - "$id": "453", + "$id": "458", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5253,18 +5306,18 @@ "isHttpMetadata": false }, { - "$id": "454", + "$id": "459", "kind": "property", "name": "emailAddress", "serializedName": "emailAddress", "doc": "Email address of the user", "type": { - "$id": "455", + "$id": "460", "kind": "string", "name": "email", "crossLanguageDefinitionId": "LiftrBase.email", "baseType": { - "$id": "456", + "$id": "461", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5286,13 +5339,13 @@ "isHttpMetadata": false }, { - "$id": "457", + "$id": "462", "kind": "property", "name": "upn", "serializedName": "upn", "doc": "User's principal name", "type": { - "$id": "458", + "$id": "463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5312,13 +5365,13 @@ "isHttpMetadata": false }, { - "$id": "459", + "$id": "464", "kind": "property", "name": "phoneNumber", "serializedName": "phoneNumber", "doc": "User's phone number", "type": { - "$id": "460", + "$id": "465", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5353,7 +5406,7 @@ "isHttpMetadata": false }, { - "$id": "461", + "$id": "466", "kind": "property", "name": "provisioningState", "serializedName": "provisioningState", @@ -5375,12 +5428,12 @@ "isHttpMetadata": false }, { - "$id": "462", + "$id": "467", "kind": "property", "name": "accessControlEnabled", "serializedName": "accessControlEnabled", "type": { - "$id": "463", + "$id": "468", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -5400,12 +5453,12 @@ "isHttpMetadata": false }, { - "$id": "464", + "$id": "469", "kind": "property", "name": "metaData", "serializedName": "metaData", "type": { - "$id": "465", + "$id": "470", "kind": "model", "name": "FooSettingsPropertiesMetaData", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5419,12 +5472,12 @@ ], "properties": [ { - "$id": "466", + "$id": "471", "kind": "property", "name": "metaDatas", "serializedName": "metaDatas", "type": { - "$ref": "293" + "$ref": "297" }, "optional": true, "readOnly": false, @@ -5470,13 +5523,13 @@ "isHttpMetadata": false }, { - "$id": "467", + "$id": "472", "kind": "property", "name": "name", "serializedName": "name", "doc": "The default Foo settings.", "type": { - "$id": "468", + "$id": "473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5498,22 +5551,22 @@ ] }, { - "$ref": "424" + "$ref": "429" }, { - "$ref": "426" + "$ref": "431" }, { - "$ref": "431" + "$ref": "436" }, { - "$ref": "449" + "$ref": "454" }, { - "$ref": "465" + "$ref": "470" }, { - "$id": "469", + "$id": "474", "kind": "model", "name": "FooSettingsUpdate", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5528,13 +5581,13 @@ ], "properties": [ { - "$id": "470", + "$id": "475", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "471", + "$id": "476", "kind": "model", "name": "FooSettingsUpdateProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5549,13 +5602,13 @@ ], "properties": [ { - "$id": "472", + "$id": "477", "kind": "property", "name": "marketplace", "serializedName": "marketplace", "doc": "Marketplace details of the resource.", "type": { - "$ref": "426" + "$ref": "431" }, "optional": true, "readOnly": false, @@ -5571,13 +5624,13 @@ "isHttpMetadata": false }, { - "$id": "473", + "$id": "478", "kind": "property", "name": "user", "serializedName": "user", "doc": "Details of the user.", "type": { - "$ref": "449" + "$ref": "454" }, "optional": true, "readOnly": false, @@ -5593,12 +5646,12 @@ "isHttpMetadata": false }, { - "$id": "474", + "$id": "479", "kind": "property", "name": "accessControlEnabled", "serializedName": "accessControlEnabled", "type": { - "$id": "475", + "$id": "480", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -5635,10 +5688,10 @@ ] }, { - "$ref": "471" + "$ref": "476" }, { - "$id": "476", + "$id": "481", "kind": "model", "name": "Bar", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5665,7 +5718,7 @@ "resourceType": "MgmtTypeSpec/foos/bars", "methods": [ { - "$id": "477", + "$id": "482", "methodId": "MgmtTypeSpec.Bars.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -5673,7 +5726,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "478", + "$id": "483", "methodId": "MgmtTypeSpec.Bars.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -5681,7 +5734,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "479", + "$id": "484", "methodId": "MgmtTypeSpec.Bars.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars", @@ -5689,7 +5742,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}" }, { - "$id": "480", + "$id": "485", "methodId": "MgmtTypeSpec.Bars.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -5697,7 +5750,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "481", + "$id": "486", "methodId": "MgmtTypeSpec.Bars.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}", @@ -5705,7 +5758,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}" }, { - "$id": "482", + "$id": "487", "methodId": "MgmtTypeSpec.Employees.listByParent", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/employees", @@ -5720,17 +5773,17 @@ } ], "baseModel": { - "$ref": "370" + "$ref": "374" }, "properties": [ { - "$id": "483", + "$id": "488", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "484", + "$id": "489", "kind": "model", "name": "BarProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5744,13 +5797,13 @@ ], "properties": [ { - "$id": "485", + "$id": "490", "kind": "property", "name": "serviceUrl", "serializedName": "serviceUrl", "doc": "the service url", "type": { - "$id": "486", + "$id": "491", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -5770,13 +5823,13 @@ "isHttpMetadata": false }, { - "$id": "487", + "$id": "492", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "488", + "$id": "493", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5796,13 +5849,13 @@ "isHttpMetadata": false }, { - "$id": "489", + "$id": "494", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "490", + "$id": "495", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -5822,13 +5875,13 @@ "isHttpMetadata": false }, { - "$id": "491", + "$id": "496", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "doc": "float value", "type": { - "$id": "492", + "$id": "497", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -5848,13 +5901,13 @@ "isHttpMetadata": false }, { - "$id": "493", + "$id": "498", "kind": "property", "name": "doubleValue", "serializedName": "doubleValue", "doc": "double value", "type": { - "$id": "494", + "$id": "499", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -5889,13 +5942,13 @@ "isHttpMetadata": false }, { - "$id": "495", + "$id": "500", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Bar", "type": { - "$id": "496", + "$id": "501", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5917,10 +5970,10 @@ ] }, { - "$ref": "484" + "$ref": "489" }, { - "$id": "497", + "$id": "502", "kind": "model", "name": "BarListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -5935,17 +5988,17 @@ ], "properties": [ { - "$id": "498", + "$id": "503", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Bar items on this page", "type": { - "$id": "499", + "$id": "504", "kind": "array", "name": "ArrayBar", "valueType": { - "$ref": "476" + "$ref": "481" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5964,18 +6017,18 @@ "isHttpMetadata": false }, { - "$id": "500", + "$id": "505", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "501", + "$id": "506", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "502", + "$id": "507", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -5999,7 +6052,7 @@ ] }, { - "$id": "503", + "$id": "508", "kind": "model", "name": "BarSettingsResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6032,7 +6085,7 @@ "resourceType": "MgmtTypeSpec/foos/bars/settings", "methods": [ { - "$id": "504", + "$id": "509", "methodId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", @@ -6040,7 +6093,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current" }, { - "$id": "505", + "$id": "510", "methodId": "MgmtTypeSpec.BarSettingsOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/settings/current", @@ -6056,17 +6109,17 @@ } ], "baseModel": { - "$ref": "264" + "$ref": "268" }, "properties": [ { - "$id": "506", + "$id": "511", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "507", + "$id": "512", "kind": "model", "name": "BarSettingsProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6080,13 +6133,13 @@ ], "properties": [ { - "$id": "508", + "$id": "513", "kind": "property", "name": "isEnabled", "serializedName": "isEnabled", "doc": "enabled", "type": { - "$id": "509", + "$id": "514", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -6121,13 +6174,13 @@ "isHttpMetadata": false }, { - "$id": "510", + "$id": "515", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the BarSettingsResource", "type": { - "$id": "511", + "$id": "516", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6147,12 +6200,12 @@ "isHttpMetadata": true }, { - "$id": "512", + "$id": "517", "kind": "property", "name": "stringArray", "serializedName": "stringArray", "type": { - "$ref": "293" + "$ref": "297" }, "optional": true, "readOnly": false, @@ -6168,12 +6221,12 @@ "isHttpMetadata": false }, { - "$id": "513", + "$id": "518", "kind": "property", "name": "property", "serializedName": "property", "type": { - "$id": "514", + "$id": "519", "kind": "model", "name": "BarQuotaProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6187,13 +6240,13 @@ ], "properties": [ { - "$id": "515", + "$id": "520", "kind": "property", "name": "left", "serializedName": "left", "doc": "enabled", "type": { - "$id": "516", + "$id": "521", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6228,12 +6281,12 @@ "isHttpMetadata": false }, { - "$id": "517", + "$id": "522", "kind": "property", "name": "anotherProperty", "serializedName": "anotherProperty", "type": { - "$ref": "514" + "$ref": "519" }, "optional": false, "readOnly": false, @@ -6249,12 +6302,12 @@ "isHttpMetadata": false }, { - "$id": "518", + "$id": "523", "kind": "property", "name": "flattenedNestedProperty", "serializedName": "flattenedNestedProperty", "type": { - "$id": "519", + "$id": "524", "kind": "model", "name": "BarNestedQuotaProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6267,7 +6320,7 @@ } ], "baseModel": { - "$id": "520", + "$id": "525", "kind": "model", "name": "BarMiddleNestedQuotaProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6280,7 +6333,7 @@ } ], "baseModel": { - "$id": "521", + "$id": "526", "kind": "model", "name": "BarDeeplyNestedQuotaProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6294,12 +6347,12 @@ ], "properties": [ { - "$id": "522", + "$id": "527", "kind": "property", "name": "innerProp1", "serializedName": "innerProp1", "type": { - "$id": "523", + "$id": "528", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6319,12 +6372,12 @@ "isHttpMetadata": false }, { - "$id": "524", + "$id": "529", "kind": "property", "name": "innerProp2", "serializedName": "innerProp2", "type": { - "$id": "525", + "$id": "530", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6347,12 +6400,12 @@ }, "properties": [ { - "$id": "526", + "$id": "531", "kind": "property", "name": "middleProp1", "serializedName": "middleProp1", "type": { - "$id": "527", + "$id": "532", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6372,12 +6425,12 @@ "isHttpMetadata": false }, { - "$id": "528", + "$id": "533", "kind": "property", "name": "middleProp2", "serializedName": "middleProp2", "type": { - "$ref": "372" + "$ref": "376" }, "optional": false, "readOnly": false, @@ -6396,12 +6449,12 @@ }, "properties": [ { - "$id": "529", + "$id": "534", "kind": "property", "name": "prop1", "serializedName": "prop1", "type": { - "$ref": "293" + "$ref": "297" }, "optional": false, "readOnly": false, @@ -6417,12 +6470,12 @@ "isHttpMetadata": false }, { - "$id": "530", + "$id": "535", "kind": "property", "name": "prop2", "serializedName": "prop2", "type": { - "$id": "531", + "$id": "536", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6462,12 +6515,12 @@ "isHttpMetadata": false }, { - "$id": "532", + "$id": "537", "kind": "property", "name": "optionalFlattenProperty", "serializedName": "optionalFlattenProperty", "type": { - "$id": "533", + "$id": "538", "kind": "model", "name": "optionalFlattenPropertyType", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6481,12 +6534,12 @@ ], "properties": [ { - "$id": "534", + "$id": "539", "kind": "property", "name": "randomCollectionProp", "serializedName": "randomCollectionProp", "type": { - "$ref": "293" + "$ref": "297" }, "optional": false, "readOnly": false, @@ -6517,12 +6570,12 @@ "isHttpMetadata": false }, { - "$id": "535", + "$id": "540", "kind": "property", "name": "discriminatorProperty", "serializedName": "discriminatorProperty", "type": { - "$id": "536", + "$id": "541", "kind": "model", "name": "LimitJsonObject", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6536,7 +6589,7 @@ } ], "discriminatorProperty": { - "$id": "537", + "$id": "542", "kind": "property", "name": "limitObjectType", "serializedName": "limitObjectType", @@ -6559,7 +6612,7 @@ }, "properties": [ { - "$ref": "537" + "$ref": "542" } ] }, @@ -6579,28 +6632,28 @@ ] }, { - "$ref": "507" + "$ref": "512" }, { - "$ref": "514" + "$ref": "519" }, { - "$ref": "519" + "$ref": "524" }, { - "$ref": "520" + "$ref": "525" }, { - "$ref": "521" + "$ref": "526" }, { - "$ref": "533" + "$ref": "538" }, { - "$ref": "536" + "$ref": "541" }, { - "$id": "538", + "$id": "543", "kind": "model", "name": "BarQuotaResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6627,7 +6680,7 @@ "resourceType": "MgmtTypeSpec/foos/bars/quotas", "methods": [ { - "$id": "539", + "$id": "544", "methodId": "MgmtTypeSpec.BarQuotaOperations.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", @@ -6635,7 +6688,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}" }, { - "$id": "540", + "$id": "545", "methodId": "MgmtTypeSpec.BarQuotaOperations.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/foos/{fooName}/bars/{barName}/quotas/{barQuotaResourceName}", @@ -6650,17 +6703,17 @@ } ], "baseModel": { - "$ref": "264" + "$ref": "268" }, "properties": [ { - "$id": "541", + "$id": "546", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$ref": "514" + "$ref": "519" }, "optional": true, "readOnly": false, @@ -6676,7 +6729,7 @@ "isHttpMetadata": false }, { - "$id": "542", + "$id": "547", "kind": "property", "name": "name", "serializedName": "name", @@ -6700,7 +6753,7 @@ ] }, { - "$id": "543", + "$id": "548", "kind": "model", "name": "EmployeeListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6715,17 +6768,17 @@ ], "properties": [ { - "$id": "544", + "$id": "549", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Employee items on this page", "type": { - "$id": "545", + "$id": "550", "kind": "array", "name": "ArrayEmployee", "valueType": { - "$id": "546", + "$id": "551", "kind": "model", "name": "Employee", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6747,17 +6800,17 @@ } ], "baseModel": { - "$ref": "370" + "$ref": "374" }, "properties": [ { - "$id": "547", + "$id": "552", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "548", + "$id": "553", "kind": "model", "name": "EmployeeProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6772,13 +6825,13 @@ ], "properties": [ { - "$id": "549", + "$id": "554", "kind": "property", "name": "age", "serializedName": "age", "doc": "Age of employee", "type": { - "$id": "550", + "$id": "555", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6798,13 +6851,13 @@ "isHttpMetadata": false }, { - "$id": "551", + "$id": "556", "kind": "property", "name": "city", "serializedName": "city", "doc": "City of employee", "type": { - "$id": "552", + "$id": "557", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6839,13 +6892,13 @@ "isHttpMetadata": false }, { - "$id": "553", + "$id": "558", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Employee", "type": { - "$id": "554", + "$id": "559", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6883,18 +6936,18 @@ "isHttpMetadata": false }, { - "$id": "555", + "$id": "560", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "556", + "$id": "561", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "557", + "$id": "562", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -6918,13 +6971,13 @@ ] }, { - "$ref": "546" + "$ref": "551" }, { - "$ref": "548" + "$ref": "553" }, { - "$id": "558", + "$id": "563", "kind": "model", "name": "Baz", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -6947,7 +7000,7 @@ "resourceType": "MgmtTypeSpec/bazs", "methods": [ { - "$id": "559", + "$id": "564", "methodId": "MgmtTypeSpec.Bazs.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -6955,7 +7008,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "560", + "$id": "565", "methodId": "MgmtTypeSpec.Bazs.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -6963,7 +7016,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "561", + "$id": "566", "methodId": "MgmtTypeSpec.Bazs.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -6971,7 +7024,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "562", + "$id": "567", "methodId": "MgmtTypeSpec.Bazs.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}", @@ -6979,14 +7032,14 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs/{bazName}" }, { - "$id": "563", + "$id": "568", "methodId": "MgmtTypeSpec.Bazs.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/bazs", "operationScope": "ResourceGroup" }, { - "$id": "564", + "$id": "569", "methodId": "MgmtTypeSpec.Bazs.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/bazs", @@ -6999,17 +7052,17 @@ } ], "baseModel": { - "$ref": "370" + "$ref": "374" }, "properties": [ { - "$id": "565", + "$id": "570", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "566", + "$id": "571", "kind": "model", "name": "BazProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7023,13 +7076,13 @@ ], "properties": [ { - "$id": "567", + "$id": "572", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "568", + "$id": "573", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7049,13 +7102,13 @@ "isHttpMetadata": false }, { - "$id": "569", + "$id": "574", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "570", + "$id": "575", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -7090,13 +7143,13 @@ "isHttpMetadata": false }, { - "$id": "571", + "$id": "576", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Baz", "type": { - "$id": "572", + "$id": "577", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7118,10 +7171,10 @@ ] }, { - "$ref": "566" + "$ref": "571" }, { - "$id": "573", + "$id": "578", "kind": "model", "name": "BazListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7136,17 +7189,17 @@ ], "properties": [ { - "$id": "574", + "$id": "579", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Baz items on this page", "type": { - "$id": "575", + "$id": "580", "kind": "array", "name": "ArrayBaz", "valueType": { - "$ref": "558" + "$ref": "563" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7165,18 +7218,18 @@ "isHttpMetadata": false }, { - "$id": "576", + "$id": "581", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "577", + "$id": "582", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "578", + "$id": "583", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -7200,7 +7253,7 @@ ] }, { - "$id": "579", + "$id": "584", "kind": "model", "name": "Zoo", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7223,7 +7276,7 @@ "resourceType": "MgmtTypeSpec/zoos", "methods": [ { - "$id": "580", + "$id": "585", "methodId": "MgmtTypeSpec.Zoos.createOrUpdate", "kind": "Create", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -7231,7 +7284,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "581", + "$id": "586", "methodId": "MgmtTypeSpec.Zoos.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -7239,7 +7292,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "582", + "$id": "587", "methodId": "MgmtTypeSpec.Zoos.delete", "kind": "Delete", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -7247,7 +7300,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "583", + "$id": "588", "methodId": "MgmtTypeSpec.Zoos.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}", @@ -7255,21 +7308,21 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "584", + "$id": "589", "methodId": "MgmtTypeSpec.Zoos.list", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos", "operationScope": "ResourceGroup" }, { - "$id": "585", + "$id": "590", "methodId": "MgmtTypeSpec.Zoos.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/zoos", "operationScope": "Subscription" }, { - "$id": "586", + "$id": "591", "methodId": "MgmtTypeSpec.Zoos.zooAddressList", "kind": "Action", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/zooAddressList", @@ -7277,7 +7330,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}" }, { - "$id": "587", + "$id": "592", "methodId": "MgmtTypeSpec.Zoos.recommend", "kind": "Action", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/zoos/{zooName}/recommend", @@ -7291,17 +7344,17 @@ } ], "baseModel": { - "$ref": "370" + "$ref": "374" }, "properties": [ { - "$id": "588", + "$id": "593", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "589", + "$id": "594", "kind": "model", "name": "ZooProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7321,13 +7374,13 @@ ], "properties": [ { - "$id": "590", + "$id": "595", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "591", + "$id": "596", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7362,13 +7415,13 @@ "isHttpMetadata": false }, { - "$id": "592", + "$id": "597", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the Zoo", "type": { - "$id": "593", + "$id": "598", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7388,12 +7441,12 @@ "isHttpMetadata": true }, { - "$id": "594", + "$id": "599", "kind": "property", "name": "extendedLocation", "serializedName": "extendedLocation", "type": { - "$ref": "402" + "$ref": "406" }, "optional": true, "readOnly": false, @@ -7411,10 +7464,10 @@ ] }, { - "$ref": "589" + "$ref": "594" }, { - "$id": "595", + "$id": "600", "kind": "model", "name": "ZooUpdate", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7429,13 +7482,13 @@ ], "properties": [ { - "$id": "596", + "$id": "601", "kind": "property", "name": "tags", "serializedName": "tags", "doc": "Resource tags.", "type": { - "$ref": "372" + "$ref": "376" }, "optional": true, "readOnly": false, @@ -7451,13 +7504,13 @@ "isHttpMetadata": false }, { - "$id": "597", + "$id": "602", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "598", + "$id": "603", "kind": "model", "name": "ZooUpdateProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7472,13 +7525,13 @@ ], "properties": [ { - "$id": "599", + "$id": "604", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "600", + "$id": "605", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7515,10 +7568,10 @@ ] }, { - "$ref": "598" + "$ref": "603" }, { - "$id": "601", + "$id": "606", "kind": "model", "name": "ZooListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7533,17 +7586,17 @@ ], "properties": [ { - "$id": "602", + "$id": "607", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Zoo items on this page", "type": { - "$id": "603", + "$id": "608", "kind": "array", "name": "ArrayZoo", "valueType": { - "$ref": "579" + "$ref": "584" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -7562,18 +7615,18 @@ "isHttpMetadata": false }, { - "$id": "604", + "$id": "609", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "605", + "$id": "610", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "606", + "$id": "611", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -7597,7 +7650,7 @@ ] }, { - "$id": "607", + "$id": "612", "kind": "model", "name": "ZooAddressListListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7612,17 +7665,17 @@ ], "properties": [ { - "$id": "608", + "$id": "613", "kind": "property", "name": "value", "serializedName": "value", "doc": "The ZooAddress items on this page", "type": { - "$id": "609", + "$id": "614", "kind": "array", "name": "ArraySubResource", "valueType": { - "$id": "610", + "$id": "615", "kind": "model", "name": "SubResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7653,18 +7706,18 @@ "isHttpMetadata": false }, { - "$id": "611", + "$id": "616", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "612", + "$id": "617", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "613", + "$id": "618", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -7688,10 +7741,10 @@ ] }, { - "$ref": "610" + "$ref": "615" }, { - "$id": "614", + "$id": "619", "kind": "model", "name": "EndpointResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7714,7 +7767,7 @@ "resourceType": "MgmtTypeSpec/endpoints", "methods": [ { - "$id": "615", + "$id": "620", "methodId": "MgmtTypeSpec.EndpointResources.get", "kind": "Get", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -7722,7 +7775,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "616", + "$id": "621", "methodId": "MgmtTypeSpec.EndpointResources.createOrUpdate", "kind": "Create", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -7730,7 +7783,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "617", + "$id": "622", "methodId": "MgmtTypeSpec.EndpointResources.update", "kind": "Update", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -7738,7 +7791,7 @@ "resourceScope": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}" }, { - "$id": "618", + "$id": "623", "methodId": "MgmtTypeSpec.EndpointResources.delete", "kind": "Delete", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/endpoints/{endpointName}", @@ -7752,7 +7805,7 @@ } ], "baseModel": { - "$id": "619", + "$id": "624", "kind": "model", "name": "ExtensionResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7766,19 +7819,19 @@ } ], "baseModel": { - "$ref": "265" + "$ref": "269" }, "properties": [] }, "properties": [ { - "$id": "620", + "$id": "625", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "621", + "$id": "626", "kind": "model", "name": "EndpointProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7792,12 +7845,12 @@ ], "properties": [ { - "$id": "622", + "$id": "627", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "623", + "$id": "628", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7832,13 +7885,13 @@ "isHttpMetadata": false }, { - "$id": "624", + "$id": "629", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the EndpointResource", "type": { - "$id": "625", + "$id": "630", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7860,13 +7913,13 @@ ] }, { - "$ref": "621" + "$ref": "626" }, { - "$ref": "619" + "$ref": "624" }, { - "$id": "626", + "$id": "631", "kind": "model", "name": "SelfHelpResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7889,7 +7942,7 @@ "resourceType": "MgmtTypeSpec/selfHelps", "methods": [ { - "$id": "627", + "$id": "632", "methodId": "MgmtTypeSpec.SolutionResources.get", "kind": "Get", "operationPath": "/{scope}/providers/MgmtTypeSpec/selfHelps/{selfHelpName}", @@ -7903,17 +7956,17 @@ } ], "baseModel": { - "$ref": "619" + "$ref": "624" }, "properties": [ { - "$id": "628", + "$id": "633", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "629", + "$id": "634", "kind": "model", "name": "SelfHelpResourceProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -7927,12 +7980,12 @@ ], "properties": [ { - "$id": "630", + "$id": "635", "kind": "property", "name": "selfHelpId", "serializedName": "selfHelpId", "type": { - "$id": "631", + "$id": "636", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7967,13 +8020,13 @@ "isHttpMetadata": false }, { - "$id": "632", + "$id": "637", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the SelfHelpResource", "type": { - "$id": "633", + "$id": "638", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7995,15 +8048,15 @@ ] }, { - "$ref": "629" + "$ref": "634" }, { - "$id": "634", + "$id": "639", "kind": "model", "name": "PlaywrightQuota", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuota", - "usage": "Output,Json", + "usage": "Input,Output,Json", "doc": "Subscription-level location-based Playwright quota resource.", "decorators": [ { @@ -8025,7 +8078,7 @@ "resourceType": "MgmtTypeSpec/locations/playwrightQuotas", "methods": [ { - "$id": "635", + "$id": "640", "methodId": "MgmtTypeSpec.PlaywrightQuotas.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", @@ -8033,11 +8086,19 @@ "resourceScope": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}" }, { - "$id": "636", + "$id": "641", "methodId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription", "kind": "List", "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas", "operationScope": "Subscription" + }, + { + "$id": "642", + "methodId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate", + "kind": "Create", + "operationPath": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", + "operationScope": "Subscription", + "resourceScope": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}" } ], "resourceScope": "Subscription", @@ -8046,22 +8107,22 @@ } ], "baseModel": { - "$ref": "264" + "$ref": "268" }, "properties": [ { - "$id": "637", + "$id": "643", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "638", + "$id": "644", "kind": "model", "name": "PlaywrightQuotaProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotaProperties", - "usage": "Output,Json", + "usage": "Input,Output,Json", "doc": "Subscription-level location-based Playwright quota resource properties.", "decorators": [ { @@ -8071,13 +8132,13 @@ ], "properties": [ { - "$id": "639", + "$id": "645", "kind": "property", "name": "freeTrial", "serializedName": "freeTrial", "doc": "The subscription-level location-based Playwright quota resource free-trial properties.", "type": { - "$id": "640", + "$id": "646", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8097,13 +8158,13 @@ "isHttpMetadata": false }, { - "$id": "641", + "$id": "647", "kind": "property", "name": "provisioningState", "serializedName": "provisioningState", "doc": "The status of the last resource operation.", "type": { - "$id": "642", + "$id": "648", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8138,7 +8199,7 @@ "isHttpMetadata": false }, { - "$id": "643", + "$id": "649", "kind": "property", "name": "name", "serializedName": "name", @@ -8162,10 +8223,10 @@ ] }, { - "$ref": "638" + "$ref": "644" }, { - "$id": "644", + "$id": "650", "kind": "model", "name": "PlaywrightQuotaListResult", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8180,17 +8241,17 @@ ], "properties": [ { - "$id": "645", + "$id": "651", "kind": "property", "name": "value", "serializedName": "value", "doc": "The PlaywrightQuota items on this page", "type": { - "$id": "646", + "$id": "652", "kind": "array", "name": "ArrayPlaywrightQuota", "valueType": { - "$ref": "634" + "$ref": "639" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -8209,18 +8270,18 @@ "isHttpMetadata": false }, { - "$id": "647", + "$id": "653", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "648", + "$id": "654", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "649", + "$id": "655", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -8244,7 +8305,7 @@ ] }, { - "$id": "650", + "$id": "656", "kind": "model", "name": "JobResource", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8267,7 +8328,7 @@ "resourceType": "MgmtTypeSpec/jobs", "methods": [ { - "$id": "651", + "$id": "657", "methodId": "MgmtTypeSpec.JobResources.get", "kind": "Get", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", @@ -8275,7 +8336,7 @@ "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}" }, { - "$id": "652", + "$id": "658", "methodId": "MgmtTypeSpec.JobResources.update", "kind": "Update", "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MgmtTypeSpec/jobs/{jobName}", @@ -8289,17 +8350,17 @@ } ], "baseModel": { - "$ref": "370" + "$ref": "374" }, "properties": [ { - "$id": "653", + "$id": "659", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "654", + "$id": "660", "kind": "model", "name": "JobProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8313,12 +8374,12 @@ ], "properties": [ { - "$id": "655", + "$id": "661", "kind": "property", "name": "jobName", "serializedName": "jobName", "type": { - "$id": "656", + "$id": "662", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8353,13 +8414,13 @@ "isHttpMetadata": false }, { - "$id": "657", + "$id": "663", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the JobResource", "type": { - "$id": "658", + "$id": "664", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8381,10 +8442,10 @@ ] }, { - "$ref": "654" + "$ref": "660" }, { - "$id": "659", + "$id": "665", "kind": "model", "name": "JobResourceUpdateParameter", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8398,12 +8459,12 @@ ], "properties": [ { - "$id": "660", + "$id": "666", "kind": "property", "name": "properties", "serializedName": "properties", "type": { - "$ref": "654" + "$ref": "660" }, "optional": true, "readOnly": false, @@ -8419,12 +8480,12 @@ "isHttpMetadata": false }, { - "$id": "661", + "$id": "667", "kind": "property", "name": "tags", "serializedName": "tags", "type": { - "$ref": "372" + "$ref": "376" }, "optional": true, "readOnly": false, @@ -8442,7 +8503,7 @@ ] }, { - "$id": "662", + "$id": "668", "kind": "model", "name": "HciVmInstance", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8471,7 +8532,7 @@ "resourceType": "MgmtTypeSpec/virtualMachineInstances", "methods": [ { - "$id": "663", + "$id": "669", "methodId": "MgmtTypeSpec.HciVmInstances.get", "kind": "Get", "operationPath": "/{resourceUri}/providers/MgmtTypeSpec/virtualMachineInstances/default", @@ -8486,17 +8547,17 @@ } ], "baseModel": { - "$ref": "619" + "$ref": "624" }, "properties": [ { - "$id": "664", + "$id": "670", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "665", + "$id": "671", "kind": "model", "name": "HciVmInstanceProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8510,12 +8571,12 @@ ], "properties": [ { - "$id": "666", + "$id": "672", "kind": "property", "name": "sku", "serializedName": "sku", "type": { - "$id": "667", + "$id": "673", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8550,13 +8611,13 @@ "isHttpMetadata": false }, { - "$id": "668", + "$id": "674", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the HciVmInstance", "type": { - "$id": "669", + "$id": "675", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8578,10 +8639,10 @@ ] }, { - "$ref": "665" + "$ref": "671" }, { - "$id": "670", + "$id": "676", "kind": "model", "name": "GroupQuotaSubscriptionRequestStatus", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8604,31 +8665,31 @@ "resourceType": "MgmtTypeSpec/quotas", "methods": [ { - "$id": "671", + "$id": "677", "methodId": "MgmtTypeSpec.GroupQuotaSubscriptionRequestStatuses.get", "kind": "Get", "operationPath": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}", - "operationScope": "Tenant", + "operationScope": "ManagementGroup", "resourceScope": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/MgmtTypeSpec/quotas/{requestId}" } ], - "resourceScope": "Tenant", + "resourceScope": "ManagementGroup", "resourceName": "GroupQuotaSubscriptionRequestStatus" } } ], "baseModel": { - "$ref": "264" + "$ref": "268" }, "properties": [ { - "$id": "672", + "$id": "678", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "673", + "$id": "679", "kind": "model", "name": "GroupQuotaLimitProperties", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8641,7 +8702,7 @@ } ], "baseModel": { - "$id": "674", + "$id": "680", "kind": "model", "name": "GroupQuotaDetails", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8656,13 +8717,13 @@ ], "properties": [ { - "$id": "675", + "$id": "681", "kind": "property", "name": "resourceName", "serializedName": "resourceName", "doc": "The resource name, such as SKU name.", "type": { - "$id": "676", + "$id": "682", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8682,13 +8743,13 @@ "isHttpMetadata": false }, { - "$id": "677", + "$id": "683", "kind": "property", "name": "limit", "serializedName": "limit", "doc": "The current Group Quota Limit at the parentId level.", "type": { - "$id": "678", + "$id": "684", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -8708,13 +8769,13 @@ "isHttpMetadata": false }, { - "$id": "679", + "$id": "685", "kind": "property", "name": "comment", "serializedName": "comment", "doc": "Any comment related to quota request.", "type": { - "$id": "680", + "$id": "686", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8734,13 +8795,13 @@ "isHttpMetadata": false }, { - "$id": "681", + "$id": "687", "kind": "property", "name": "unit", "serializedName": "unit", "doc": "The usages units, such as Count and Bytes. When requesting quota, use the **unit** value returned in the GET response in the request body of your PUT operation.", "type": { - "$id": "682", + "$id": "688", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8760,13 +8821,13 @@ "isHttpMetadata": false }, { - "$id": "683", + "$id": "689", "kind": "property", "name": "availableLimit", "serializedName": "availableLimit", "doc": "The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s).", "type": { - "$id": "684", + "$id": "690", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -8786,13 +8847,13 @@ "isHttpMetadata": false }, { - "$id": "685", + "$id": "691", "kind": "property", "name": "allocatedToSubscriptions", "serializedName": "allocatedToSubscriptions", "doc": "Quota allocated to subscriptions", "type": { - "$id": "686", + "$id": "692", "kind": "model", "name": "AllocatedQuotaToSubscriptionList", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8807,17 +8868,17 @@ ], "properties": [ { - "$id": "687", + "$id": "693", "kind": "property", "name": "value", "serializedName": "value", "doc": "List of Group Quota Limit allocated to subscriptions.", "type": { - "$id": "688", + "$id": "694", "kind": "array", "name": "ArrayAllocatedToSubscription", "valueType": { - "$id": "689", + "$id": "695", "kind": "model", "name": "AllocatedToSubscription", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8832,13 +8893,13 @@ ], "properties": [ { - "$id": "690", + "$id": "696", "kind": "property", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "An Azure subscriptionId.", "type": { - "$id": "691", + "$id": "697", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8858,13 +8919,13 @@ "isHttpMetadata": false }, { - "$id": "692", + "$id": "698", "kind": "property", "name": "quotaAllocated", "serializedName": "quotaAllocated", "doc": "The amount of quota allocated to this subscriptionId from the GroupQuotasEntity.", "type": { - "$id": "693", + "$id": "699", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -8934,13 +8995,13 @@ "isHttpMetadata": false }, { - "$id": "694", + "$id": "700", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the GroupQuotaSubscriptionRequestStatus", "type": { - "$id": "695", + "$id": "701", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8962,19 +9023,19 @@ ] }, { - "$ref": "673" + "$ref": "679" }, { - "$ref": "674" + "$ref": "680" }, { - "$ref": "686" + "$ref": "692" }, { - "$ref": "689" + "$ref": "695" }, { - "$id": "696", + "$id": "702", "kind": "model", "name": "ZooRecommendation", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", @@ -8988,13 +9049,13 @@ ], "properties": [ { - "$id": "697", + "$id": "703", "kind": "property", "name": "recommendedValue", "serializedName": "recommendedValue", "doc": "The recommended value", "type": { - "$id": "698", + "$id": "704", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9014,13 +9075,13 @@ "isHttpMetadata": false }, { - "$id": "699", + "$id": "705", "kind": "property", "name": "reason", "serializedName": "reason", "doc": "The reason for the recommendation", "type": { - "$id": "700", + "$id": "706", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9044,13 +9105,13 @@ ], "clients": [ { - "$id": "701", + "$id": "707", "kind": "client", "name": "MgmtTypeSpecClient", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "702", + "$id": "708", "kind": "basic", "name": "previewActions", "accessibility": "public", @@ -9059,20 +9120,20 @@ ], "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", "operation": { - "$id": "703", + "$id": "709", "name": "previewActions", "resourceName": "MgmtTypeSpec", "doc": "Runs the input conditions against input object metadata properties and designates matched objects in response.", "accessibility": "public", "parameters": [ { - "$id": "704", + "$id": "710", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "705", + "$id": "711", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9082,7 +9143,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "706", + "$id": "712", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9096,18 +9157,18 @@ "readOnly": false }, { - "$id": "707", + "$id": "713", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "708", + "$id": "714", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "709", + "$id": "715", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9127,17 +9188,17 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.subscriptionId" }, { - "$id": "710", + "$id": "716", "kind": "path", "name": "location", "serializedName": "location", "type": { - "$id": "711", + "$id": "717", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "712", + "$id": "718", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9157,7 +9218,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.location" }, { - "$id": "713", + "$id": "719", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9174,7 +9235,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.contentType" }, { - "$id": "714", + "$id": "720", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9190,13 +9251,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.previewActions.accept" }, { - "$id": "715", + "$id": "721", "kind": "body", "name": "body", "serializedName": "body", "doc": "The request body", "type": { - "$ref": "214" + "$ref": "218" }, "isApiVersion": false, "contentTypes": [ @@ -9216,7 +9277,7 @@ 200 ], "bodyType": { - "$ref": "214" + "$ref": "218" }, "headers": [], "isErrorResponse": false, @@ -9239,17 +9300,17 @@ }, "parameters": [ { - "$id": "716", + "$id": "722", "kind": "method", "name": "location", "serializedName": "location", "type": { - "$id": "717", + "$id": "723", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "718", + "$id": "724", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9267,13 +9328,13 @@ "decorators": [] }, { - "$id": "719", + "$id": "725", "kind": "method", "name": "body", "serializedName": "body", "doc": "The request body", "type": { - "$ref": "214" + "$ref": "218" }, "location": "Body", "isApiVersion": false, @@ -9285,7 +9346,7 @@ "decorators": [] }, { - "$id": "720", + "$id": "726", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9303,7 +9364,7 @@ "decorators": [] }, { - "$id": "721", + "$id": "727", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9322,7 +9383,7 @@ ], "response": { "type": { - "$ref": "214" + "$ref": "218" } }, "isOverride": false, @@ -9333,13 +9394,13 @@ ], "parameters": [ { - "$id": "722", + "$id": "728", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "723", + "$id": "729", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9350,7 +9411,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "724", + "$id": "730", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9397,13 +9458,13 @@ ], "children": [ { - "$id": "725", + "$id": "731", "kind": "client", "name": "Operations", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "726", + "$id": "732", "kind": "paging", "name": "list", "accessibility": "public", @@ -9412,20 +9473,20 @@ ], "doc": "List the operations for the provider", "operation": { - "$id": "727", + "$id": "733", "name": "list", "resourceName": "Operations", "doc": "List the operations for the provider", "accessibility": "public", "parameters": [ { - "$id": "728", + "$id": "734", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "729", + "$id": "735", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9435,7 +9496,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "730", + "$id": "736", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9449,7 +9510,7 @@ "readOnly": false }, { - "$id": "731", + "$id": "737", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9471,7 +9532,7 @@ 200 ], "bodyType": { - "$ref": "237" + "$ref": "241" }, "headers": [], "isErrorResponse": false, @@ -9491,7 +9552,7 @@ }, "parameters": [ { - "$id": "732", + "$id": "738", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9510,7 +9571,7 @@ ], "response": { "type": { - "$ref": "239" + "$ref": "243" }, "resultSegments": [ "value" @@ -9535,13 +9596,13 @@ ], "parameters": [ { - "$id": "733", + "$id": "739", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "734", + "$id": "740", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9552,7 +9613,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "735", + "$id": "741", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9571,17 +9632,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "736", + "$id": "742", "kind": "client", "name": "PrivateLinks", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "737", + "$id": "743", "kind": "paging", "name": "GetAllPrivateLinkResources", "accessibility": "public", @@ -9590,20 +9651,20 @@ ], "doc": "list private links on the given resource", "operation": { - "$id": "738", + "$id": "744", "name": "GetAllPrivateLinkResources", "resourceName": "PrivateLink", "doc": "list private links on the given resource", "accessibility": "public", "parameters": [ { - "$id": "739", + "$id": "745", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "740", + "$id": "746", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9613,7 +9674,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "741", + "$id": "747", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9627,18 +9688,18 @@ "readOnly": false }, { - "$id": "742", + "$id": "748", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "743", + "$id": "749", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "744", + "$id": "750", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9658,13 +9719,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.subscriptionId" }, { - "$id": "745", + "$id": "751", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "746", + "$id": "752", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9682,7 +9743,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster.resourceGroupName" }, { - "$id": "747", + "$id": "753", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9704,7 +9765,7 @@ 200 ], "bodyType": { - "$ref": "260" + "$ref": "264" }, "headers": [], "isErrorResponse": false, @@ -9729,13 +9790,13 @@ }, "parameters": [ { - "$id": "748", + "$id": "754", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "749", + "$id": "755", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9751,7 +9812,7 @@ "decorators": [] }, { - "$id": "750", + "$id": "756", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9770,7 +9831,7 @@ ], "response": { "type": { - "$ref": "262" + "$ref": "266" }, "resultSegments": [ "value" @@ -9793,7 +9854,7 @@ } }, { - "$id": "751", + "$id": "757", "kind": "lro", "name": "start", "accessibility": "public", @@ -9802,20 +9863,20 @@ ], "doc": "Starts the SAP Application Server Instance.", "operation": { - "$id": "752", + "$id": "758", "name": "start", "resourceName": "PrivateLinks", "doc": "Starts the SAP Application Server Instance.", "accessibility": "public", "parameters": [ { - "$id": "753", + "$id": "759", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "754", + "$id": "760", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9825,7 +9886,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "755", + "$id": "761", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9839,18 +9900,18 @@ "readOnly": false }, { - "$id": "756", + "$id": "762", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "757", + "$id": "763", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "758", + "$id": "764", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9870,13 +9931,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.subscriptionId" }, { - "$id": "759", + "$id": "765", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "760", + "$id": "766", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9894,13 +9955,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.resourceGroupName" }, { - "$id": "761", + "$id": "767", "kind": "path", "name": "privateLinkResourceName", "serializedName": "privateLinkResourceName", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "762", + "$id": "768", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9918,7 +9979,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.privateLinkResourceName" }, { - "$id": "763", + "$id": "769", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9935,7 +9996,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.contentType" }, { - "$id": "764", + "$id": "770", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9951,13 +10012,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start.accept" }, { - "$id": "765", + "$id": "771", "kind": "body", "name": "body", "serializedName": "body", "doc": "SAP Application server instance start request body.", "type": { - "$ref": "323" + "$ref": "327" }, "isApiVersion": false, "contentTypes": [ @@ -9982,7 +10043,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "766", + "$id": "772", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9994,7 +10055,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "767", + "$id": "773", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10009,7 +10070,7 @@ 200 ], "bodyType": { - "$ref": "326" + "$ref": "330" }, "headers": [], "isErrorResponse": false, @@ -10037,13 +10098,13 @@ }, "parameters": [ { - "$id": "768", + "$id": "774", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "769", + "$id": "775", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10059,13 +10120,13 @@ "decorators": [] }, { - "$id": "770", + "$id": "776", "kind": "method", "name": "privateLinkResourceName", "serializedName": "privateLinkResourceName", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "771", + "$id": "777", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10081,13 +10142,13 @@ "decorators": [] }, { - "$id": "772", + "$id": "778", "kind": "method", "name": "body", "serializedName": "body", "doc": "The content of the action request", "type": { - "$ref": "321" + "$ref": "325" }, "location": "", "isApiVersion": false, @@ -10099,18 +10160,18 @@ "decorators": [] }, { - "$id": "773", + "$id": "779", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "774", + "$id": "780", "kind": "enum", "name": "startContentType", "crossLanguageDefinitionId": "", "valueType": { - "$id": "775", + "$id": "781", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10118,12 +10179,12 @@ }, "values": [ { - "$id": "776", + "$id": "782", "kind": "enumvalue", "name": "application/json", "value": "application/json", "valueType": { - "$id": "777", + "$id": "783", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -10131,7 +10192,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "774" + "$ref": "780" }, "decorators": [] } @@ -10152,7 +10213,7 @@ "decorators": [] }, { - "$id": "778", + "$id": "784", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10171,7 +10232,7 @@ ], "response": { "type": { - "$ref": "326" + "$ref": "330" } }, "isOverride": false, @@ -10185,13 +10246,13 @@ 200 ], "bodyType": { - "$ref": "326" + "$ref": "330" } } } }, { - "$id": "779", + "$id": "785", "kind": "basic", "name": "startFailedServerlessRuntime", "accessibility": "public", @@ -10200,7 +10261,7 @@ ], "doc": "Starts a failed runtime resource", "operation": { - "$id": "780", + "$id": "786", "name": "startFailedServerlessRuntime", "resourceName": "PrivateLinks", "doc": "Starts a failed runtime resource", @@ -10234,13 +10295,13 @@ ], "parameters": [ { - "$id": "781", + "$id": "787", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "782", + "$id": "788", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10251,7 +10312,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "783", + "$id": "789", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10275,17 +10336,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "784", + "$id": "790", "kind": "client", "name": "Foos", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "785", + "$id": "791", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -10294,20 +10355,20 @@ ], "doc": "Create a Foo", "operation": { - "$id": "786", + "$id": "792", "name": "createOrUpdate", "resourceName": "Foo", "doc": "Create a Foo", "accessibility": "public", "parameters": [ { - "$id": "787", + "$id": "793", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "788", + "$id": "794", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10317,7 +10378,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "789", + "$id": "795", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10331,18 +10392,18 @@ "readOnly": false }, { - "$id": "790", + "$id": "796", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "791", + "$id": "797", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "792", + "$id": "798", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10362,13 +10423,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.subscriptionId" }, { - "$id": "793", + "$id": "799", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "794", + "$id": "800", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10386,13 +10447,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.resourceGroupName" }, { - "$id": "795", + "$id": "801", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "796", + "$id": "802", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10410,7 +10471,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.fooName" }, { - "$id": "797", + "$id": "803", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -10427,7 +10488,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.contentType" }, { - "$id": "798", + "$id": "804", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10443,13 +10504,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate.accept" }, { - "$id": "799", + "$id": "805", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "363" + "$ref": "367" }, "isApiVersion": false, "contentTypes": [ @@ -10469,7 +10530,7 @@ 200 ], "bodyType": { - "$ref": "363" + "$ref": "367" }, "headers": [], "isErrorResponse": false, @@ -10482,7 +10543,7 @@ 201 ], "bodyType": { - "$ref": "363" + "$ref": "367" }, "headers": [ { @@ -10490,7 +10551,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "800", + "$id": "806", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10502,7 +10563,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "801", + "$id": "807", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -10535,13 +10596,13 @@ }, "parameters": [ { - "$id": "802", + "$id": "808", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "803", + "$id": "809", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10557,13 +10618,13 @@ "decorators": [] }, { - "$id": "804", + "$id": "810", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "805", + "$id": "811", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10579,13 +10640,13 @@ "decorators": [] }, { - "$id": "806", + "$id": "812", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "363" + "$ref": "367" }, "location": "Body", "isApiVersion": false, @@ -10597,7 +10658,7 @@ "decorators": [] }, { - "$id": "807", + "$id": "813", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -10615,7 +10676,7 @@ "decorators": [] }, { - "$id": "808", + "$id": "814", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10634,7 +10695,7 @@ ], "response": { "type": { - "$ref": "363" + "$ref": "367" } }, "isOverride": false, @@ -10648,13 +10709,13 @@ 200 ], "bodyType": { - "$ref": "363" + "$ref": "367" } } } }, { - "$id": "809", + "$id": "815", "kind": "basic", "name": "get", "accessibility": "public", @@ -10663,20 +10724,20 @@ ], "doc": "Get a Foo", "operation": { - "$id": "810", + "$id": "816", "name": "get", "resourceName": "Foo", "doc": "Get a Foo", "accessibility": "public", "parameters": [ { - "$id": "811", + "$id": "817", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "812", + "$id": "818", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10686,7 +10747,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "813", + "$id": "819", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10700,18 +10761,18 @@ "readOnly": false }, { - "$id": "814", + "$id": "820", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "815", + "$id": "821", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "816", + "$id": "822", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10731,13 +10792,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.subscriptionId" }, { - "$id": "817", + "$id": "823", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "818", + "$id": "824", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10755,13 +10816,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.resourceGroupName" }, { - "$id": "819", + "$id": "825", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "820", + "$id": "826", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10779,7 +10840,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get.fooName" }, { - "$id": "821", + "$id": "827", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10801,7 +10862,7 @@ 200 ], "bodyType": { - "$ref": "363" + "$ref": "367" }, "headers": [], "isErrorResponse": false, @@ -10826,13 +10887,13 @@ }, "parameters": [ { - "$id": "822", + "$id": "828", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "823", + "$id": "829", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10848,13 +10909,13 @@ "decorators": [] }, { - "$id": "824", + "$id": "830", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "825", + "$id": "831", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10870,7 +10931,7 @@ "decorators": [] }, { - "$id": "826", + "$id": "832", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10889,7 +10950,7 @@ ], "response": { "type": { - "$ref": "363" + "$ref": "367" } }, "isOverride": false, @@ -10898,7 +10959,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get" }, { - "$id": "827", + "$id": "833", "kind": "lro", "name": "delete", "accessibility": "public", @@ -10907,20 +10968,20 @@ ], "doc": "Delete a Foo", "operation": { - "$id": "828", + "$id": "834", "name": "delete", "resourceName": "Foo", "doc": "Delete a Foo", "accessibility": "public", "parameters": [ { - "$id": "829", + "$id": "835", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "830", + "$id": "836", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10930,7 +10991,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "831", + "$id": "837", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10944,18 +11005,18 @@ "readOnly": false }, { - "$id": "832", + "$id": "838", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "833", + "$id": "839", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "834", + "$id": "840", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10975,13 +11036,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.subscriptionId" }, { - "$id": "835", + "$id": "841", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "836", + "$id": "842", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10999,13 +11060,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete.resourceGroupName" }, { - "$id": "837", + "$id": "843", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "838", + "$id": "844", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11034,7 +11095,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "839", + "$id": "845", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11046,7 +11107,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "840", + "$id": "846", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -11080,13 +11141,13 @@ }, "parameters": [ { - "$id": "841", + "$id": "847", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "842", + "$id": "848", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11102,13 +11163,13 @@ "decorators": [] }, { - "$id": "843", + "$id": "849", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "844", + "$id": "850", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11139,7 +11200,7 @@ } }, { - "$id": "845", + "$id": "851", "kind": "paging", "name": "list", "accessibility": "public", @@ -11148,20 +11209,20 @@ ], "doc": "List Foo resources by resource group", "operation": { - "$id": "846", + "$id": "852", "name": "list", "resourceName": "Foo", "doc": "List Foo resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "847", + "$id": "853", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "848", + "$id": "854", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11171,7 +11232,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "849", + "$id": "855", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11185,18 +11246,18 @@ "readOnly": false }, { - "$id": "850", + "$id": "856", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "851", + "$id": "857", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "852", + "$id": "858", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11216,13 +11277,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.subscriptionId" }, { - "$id": "853", + "$id": "859", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "854", + "$id": "860", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11240,7 +11301,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.list.resourceGroupName" }, { - "$id": "855", + "$id": "861", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11262,7 +11323,7 @@ 200 ], "bodyType": { - "$ref": "406" + "$ref": "410" }, "headers": [], "isErrorResponse": false, @@ -11287,13 +11348,13 @@ }, "parameters": [ { - "$id": "856", + "$id": "862", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "857", + "$id": "863", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11309,7 +11370,7 @@ "decorators": [] }, { - "$id": "858", + "$id": "864", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11328,7 +11389,7 @@ ], "response": { "type": { - "$ref": "408" + "$ref": "412" }, "resultSegments": [ "value" @@ -11351,7 +11412,7 @@ } }, { - "$id": "859", + "$id": "865", "kind": "paging", "name": "listBySubscription", "accessibility": "public", @@ -11360,20 +11421,20 @@ ], "doc": "List Foo resources by subscription ID", "operation": { - "$id": "860", + "$id": "866", "name": "listBySubscription", "resourceName": "Foo", "doc": "List Foo resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "861", + "$id": "867", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "862", + "$id": "868", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11383,7 +11444,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "863", + "$id": "869", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11397,18 +11458,18 @@ "readOnly": false }, { - "$id": "864", + "$id": "870", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "865", + "$id": "871", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "866", + "$id": "872", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11428,7 +11489,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.listBySubscription.subscriptionId" }, { - "$id": "867", + "$id": "873", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11450,7 +11511,7 @@ 200 ], "bodyType": { - "$ref": "406" + "$ref": "410" }, "headers": [], "isErrorResponse": false, @@ -11475,7 +11536,7 @@ }, "parameters": [ { - "$id": "868", + "$id": "874", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11494,7 +11555,7 @@ ], "response": { "type": { - "$ref": "408" + "$ref": "412" }, "resultSegments": [ "value" @@ -11517,7 +11578,7 @@ } }, { - "$id": "869", + "$id": "875", "kind": "lro", "name": "fooAction", "accessibility": "public", @@ -11526,20 +11587,20 @@ ], "doc": "A long-running resource action.", "operation": { - "$id": "870", + "$id": "876", "name": "fooAction", "resourceName": "Foos", "doc": "A long-running resource action.", "accessibility": "public", "parameters": [ { - "$id": "871", + "$id": "877", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "872", + "$id": "878", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11549,7 +11610,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "873", + "$id": "879", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11563,18 +11624,18 @@ "readOnly": false }, { - "$id": "874", + "$id": "880", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "875", + "$id": "881", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "876", + "$id": "882", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11594,13 +11655,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.fooAction.subscriptionId" }, { - "$id": "877", + "$id": "883", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "878", + "$id": "884", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11618,13 +11679,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.fooAction.resourceGroupName" }, { - "$id": "879", + "$id": "885", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "880", + "$id": "886", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11642,7 +11703,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.fooAction.fooName" }, { - "$id": "881", + "$id": "887", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11659,7 +11720,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.fooAction.contentType" }, { - "$id": "882", + "$id": "888", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11675,13 +11736,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.fooAction.accept" }, { - "$id": "883", + "$id": "889", "kind": "body", "name": "body", "serializedName": "body", "doc": "The content of the action request", "type": { - "$ref": "412" + "$ref": "416" }, "isApiVersion": false, "contentTypes": [ @@ -11706,7 +11767,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "884", + "$id": "890", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11718,7 +11779,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "885", + "$id": "891", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11730,7 +11791,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "886", + "$id": "892", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -11745,7 +11806,7 @@ 200 ], "bodyType": { - "$ref": "415" + "$ref": "419" }, "headers": [], "isErrorResponse": false, @@ -11773,13 +11834,13 @@ }, "parameters": [ { - "$id": "887", + "$id": "893", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "888", + "$id": "894", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11795,13 +11856,13 @@ "decorators": [] }, { - "$id": "889", + "$id": "895", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "890", + "$id": "896", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11817,13 +11878,13 @@ "decorators": [] }, { - "$id": "891", + "$id": "897", "kind": "method", "name": "body", "serializedName": "body", "doc": "The content of the action request", "type": { - "$ref": "412" + "$ref": "416" }, "location": "Body", "isApiVersion": false, @@ -11835,7 +11896,7 @@ "decorators": [] }, { - "$id": "892", + "$id": "898", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11853,7 +11914,7 @@ "decorators": [] }, { - "$id": "893", + "$id": "899", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11872,7 +11933,7 @@ ], "response": { "type": { - "$ref": "415" + "$ref": "419" } }, "isOverride": false, @@ -11886,7 +11947,7 @@ 200 ], "bodyType": { - "$ref": "415" + "$ref": "419" } } } @@ -11894,13 +11955,13 @@ ], "parameters": [ { - "$id": "894", + "$id": "900", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "895", + "$id": "901", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -11911,7 +11972,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "896", + "$id": "902", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11935,17 +11996,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "897", + "$id": "903", "kind": "client", "name": "FooSettingsOperations", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "898", + "$id": "904", "kind": "basic", "name": "get", "accessibility": "public", @@ -11954,20 +12015,20 @@ ], "doc": "Get a FooSettings", "operation": { - "$id": "899", + "$id": "905", "name": "get", "resourceName": "FooSettings", "doc": "Get a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "900", + "$id": "906", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "901", + "$id": "907", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -11977,7 +12038,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "902", + "$id": "908", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -11991,18 +12052,18 @@ "readOnly": false }, { - "$id": "903", + "$id": "909", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "904", + "$id": "910", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "905", + "$id": "911", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12022,13 +12083,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.subscriptionId" }, { - "$id": "906", + "$id": "912", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "907", + "$id": "913", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12046,7 +12107,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get.resourceGroupName" }, { - "$id": "908", + "$id": "914", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -12068,7 +12129,7 @@ 200 ], "bodyType": { - "$ref": "418" + "$ref": "423" }, "headers": [], "isErrorResponse": false, @@ -12093,13 +12154,13 @@ }, "parameters": [ { - "$id": "909", + "$id": "915", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "910", + "$id": "916", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12115,7 +12176,7 @@ "decorators": [] }, { - "$id": "911", + "$id": "917", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -12134,7 +12195,7 @@ ], "response": { "type": { - "$ref": "418" + "$ref": "423" } }, "isOverride": false, @@ -12143,7 +12204,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.get" }, { - "$id": "912", + "$id": "918", "kind": "basic", "name": "createOrUpdate", "accessibility": "public", @@ -12152,20 +12213,20 @@ ], "doc": "Create a FooSettings", "operation": { - "$id": "913", + "$id": "919", "name": "createOrUpdate", "resourceName": "FooSettings", "doc": "Create a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "914", + "$id": "920", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "915", + "$id": "921", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12175,7 +12236,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "916", + "$id": "922", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12189,18 +12250,18 @@ "readOnly": false }, { - "$id": "917", + "$id": "923", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "918", + "$id": "924", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "919", + "$id": "925", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12220,13 +12281,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.subscriptionId" }, { - "$id": "920", + "$id": "926", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "921", + "$id": "927", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12244,7 +12305,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.resourceGroupName" }, { - "$id": "922", + "$id": "928", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -12261,7 +12322,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.contentType" }, { - "$id": "923", + "$id": "929", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -12277,13 +12338,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate.accept" }, { - "$id": "924", + "$id": "930", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "418" + "$ref": "423" }, "isApiVersion": false, "contentTypes": [ @@ -12303,7 +12364,7 @@ 200 ], "bodyType": { - "$ref": "418" + "$ref": "423" }, "headers": [], "isErrorResponse": false, @@ -12316,7 +12377,7 @@ 201 ], "bodyType": { - "$ref": "418" + "$ref": "423" }, "headers": [], "isErrorResponse": false, @@ -12344,13 +12405,13 @@ }, "parameters": [ { - "$id": "925", + "$id": "931", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "926", + "$id": "932", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12366,13 +12427,13 @@ "decorators": [] }, { - "$id": "927", + "$id": "933", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "418" + "$ref": "423" }, "location": "Body", "isApiVersion": false, @@ -12384,7 +12445,7 @@ "decorators": [] }, { - "$id": "928", + "$id": "934", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -12402,7 +12463,7 @@ "decorators": [] }, { - "$id": "929", + "$id": "935", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -12421,7 +12482,7 @@ ], "response": { "type": { - "$ref": "418" + "$ref": "423" } }, "isOverride": false, @@ -12430,7 +12491,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.createOrUpdate" }, { - "$id": "930", + "$id": "936", "kind": "basic", "name": "update", "accessibility": "public", @@ -12439,20 +12500,20 @@ ], "doc": "Update a FooSettings", "operation": { - "$id": "931", + "$id": "937", "name": "update", "resourceName": "FooSettings", "doc": "Update a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "932", + "$id": "938", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "933", + "$id": "939", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12462,7 +12523,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "934", + "$id": "940", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12476,18 +12537,18 @@ "readOnly": false }, { - "$id": "935", + "$id": "941", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "936", + "$id": "942", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "937", + "$id": "943", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12507,13 +12568,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.subscriptionId" }, { - "$id": "938", + "$id": "944", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "939", + "$id": "945", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12531,7 +12592,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.resourceGroupName" }, { - "$id": "940", + "$id": "946", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -12548,7 +12609,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.contentType" }, { - "$id": "941", + "$id": "947", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -12564,13 +12625,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update.accept" }, { - "$id": "942", + "$id": "948", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "469" + "$ref": "474" }, "isApiVersion": false, "contentTypes": [ @@ -12590,7 +12651,7 @@ 200 ], "bodyType": { - "$ref": "418" + "$ref": "423" }, "headers": [], "isErrorResponse": false, @@ -12618,13 +12679,13 @@ }, "parameters": [ { - "$id": "943", + "$id": "949", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "944", + "$id": "950", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12640,13 +12701,13 @@ "decorators": [] }, { - "$id": "945", + "$id": "951", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "469" + "$ref": "474" }, "location": "Body", "isApiVersion": false, @@ -12658,7 +12719,7 @@ "decorators": [] }, { - "$id": "946", + "$id": "952", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -12676,7 +12737,7 @@ "decorators": [] }, { - "$id": "947", + "$id": "953", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -12695,7 +12756,7 @@ ], "response": { "type": { - "$ref": "418" + "$ref": "423" } }, "isOverride": false, @@ -12704,7 +12765,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.update" }, { - "$id": "948", + "$id": "954", "kind": "basic", "name": "delete", "accessibility": "public", @@ -12713,20 +12774,20 @@ ], "doc": "Delete a FooSettings", "operation": { - "$id": "949", + "$id": "955", "name": "delete", "resourceName": "FooSettings", "doc": "Delete a FooSettings", "accessibility": "public", "parameters": [ { - "$id": "950", + "$id": "956", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "951", + "$id": "957", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12736,7 +12797,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "952", + "$id": "958", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12750,18 +12811,18 @@ "readOnly": false }, { - "$id": "953", + "$id": "959", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "954", + "$id": "960", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "955", + "$id": "961", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12781,13 +12842,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.FooSettingsOperations.delete.subscriptionId" }, { - "$id": "956", + "$id": "962", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "957", + "$id": "963", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12837,13 +12898,13 @@ }, "parameters": [ { - "$id": "958", + "$id": "964", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "959", + "$id": "965", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12868,13 +12929,13 @@ ], "parameters": [ { - "$id": "960", + "$id": "966", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "961", + "$id": "967", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12885,7 +12946,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "962", + "$id": "968", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12909,17 +12970,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "963", + "$id": "969", "kind": "client", "name": "Bars", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "964", + "$id": "970", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -12928,20 +12989,20 @@ ], "doc": "Create a Bar", "operation": { - "$id": "965", + "$id": "971", "name": "createOrUpdate", "resourceName": "Bar", "doc": "Create a Bar", "accessibility": "public", "parameters": [ { - "$id": "966", + "$id": "972", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "967", + "$id": "973", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12951,7 +13012,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "968", + "$id": "974", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -12965,18 +13026,18 @@ "readOnly": false }, { - "$id": "969", + "$id": "975", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "970", + "$id": "976", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "971", + "$id": "977", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -12996,13 +13057,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.subscriptionId" }, { - "$id": "972", + "$id": "978", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "973", + "$id": "979", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13020,13 +13081,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.resourceGroupName" }, { - "$id": "974", + "$id": "980", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "975", + "$id": "981", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13044,13 +13105,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.fooName" }, { - "$id": "976", + "$id": "982", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "977", + "$id": "983", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13068,7 +13129,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.barName" }, { - "$id": "978", + "$id": "984", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -13085,7 +13146,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.contentType" }, { - "$id": "979", + "$id": "985", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -13101,13 +13162,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.createOrUpdate.accept" }, { - "$id": "980", + "$id": "986", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "476" + "$ref": "481" }, "isApiVersion": false, "contentTypes": [ @@ -13127,7 +13188,7 @@ 200 ], "bodyType": { - "$ref": "476" + "$ref": "481" }, "headers": [], "isErrorResponse": false, @@ -13140,7 +13201,7 @@ 201 ], "bodyType": { - "$ref": "476" + "$ref": "481" }, "headers": [ { @@ -13148,7 +13209,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "981", + "$id": "987", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13160,7 +13221,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "982", + "$id": "988", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -13193,13 +13254,13 @@ }, "parameters": [ { - "$id": "983", + "$id": "989", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "984", + "$id": "990", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13215,13 +13276,13 @@ "decorators": [] }, { - "$id": "985", + "$id": "991", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "986", + "$id": "992", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13237,13 +13298,13 @@ "decorators": [] }, { - "$id": "987", + "$id": "993", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "988", + "$id": "994", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13259,13 +13320,13 @@ "decorators": [] }, { - "$id": "989", + "$id": "995", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "476" + "$ref": "481" }, "location": "Body", "isApiVersion": false, @@ -13277,7 +13338,7 @@ "decorators": [] }, { - "$id": "990", + "$id": "996", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -13295,7 +13356,7 @@ "decorators": [] }, { - "$id": "991", + "$id": "997", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -13314,7 +13375,7 @@ ], "response": { "type": { - "$ref": "476" + "$ref": "481" } }, "isOverride": false, @@ -13328,13 +13389,13 @@ 200 ], "bodyType": { - "$ref": "476" + "$ref": "481" } } } }, { - "$id": "992", + "$id": "998", "kind": "lro", "name": "delete", "accessibility": "public", @@ -13343,20 +13404,20 @@ ], "doc": "Delete a Bar", "operation": { - "$id": "993", + "$id": "999", "name": "delete", "resourceName": "Bar", "doc": "Delete a Bar", "accessibility": "public", "parameters": [ { - "$id": "994", + "$id": "1000", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "995", + "$id": "1001", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13366,7 +13427,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "996", + "$id": "1002", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13380,18 +13441,18 @@ "readOnly": false }, { - "$id": "997", + "$id": "1003", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "998", + "$id": "1004", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "999", + "$id": "1005", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13411,13 +13472,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.subscriptionId" }, { - "$id": "1000", + "$id": "1006", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1001", + "$id": "1007", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13435,13 +13496,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.resourceGroupName" }, { - "$id": "1002", + "$id": "1008", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1003", + "$id": "1009", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13459,13 +13520,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.delete.fooName" }, { - "$id": "1004", + "$id": "1010", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1005", + "$id": "1011", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13494,7 +13555,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1006", + "$id": "1012", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13506,7 +13567,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1007", + "$id": "1013", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -13540,13 +13601,13 @@ }, "parameters": [ { - "$id": "1008", + "$id": "1014", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1009", + "$id": "1015", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13562,13 +13623,13 @@ "decorators": [] }, { - "$id": "1010", + "$id": "1016", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1011", + "$id": "1017", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13584,13 +13645,13 @@ "decorators": [] }, { - "$id": "1012", + "$id": "1018", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1013", + "$id": "1019", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13621,7 +13682,7 @@ } }, { - "$id": "1014", + "$id": "1020", "kind": "paging", "name": "list", "accessibility": "public", @@ -13630,20 +13691,20 @@ ], "doc": "List Bar resources by Foo", "operation": { - "$id": "1015", + "$id": "1021", "name": "list", "resourceName": "Bar", "doc": "List Bar resources by Foo", "accessibility": "public", "parameters": [ { - "$id": "1016", + "$id": "1022", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1017", + "$id": "1023", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13653,7 +13714,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1018", + "$id": "1024", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13667,18 +13728,18 @@ "readOnly": false }, { - "$id": "1019", + "$id": "1025", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1020", + "$id": "1026", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1021", + "$id": "1027", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13698,13 +13759,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.subscriptionId" }, { - "$id": "1022", + "$id": "1028", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1023", + "$id": "1029", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13722,13 +13783,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.resourceGroupName" }, { - "$id": "1024", + "$id": "1030", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1025", + "$id": "1031", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13746,7 +13807,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.list.fooName" }, { - "$id": "1026", + "$id": "1032", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -13768,7 +13829,7 @@ 200 ], "bodyType": { - "$ref": "497" + "$ref": "502" }, "headers": [], "isErrorResponse": false, @@ -13793,13 +13854,13 @@ }, "parameters": [ { - "$id": "1027", + "$id": "1033", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1028", + "$id": "1034", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13815,13 +13876,13 @@ "decorators": [] }, { - "$id": "1029", + "$id": "1035", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1030", + "$id": "1036", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13837,7 +13898,7 @@ "decorators": [] }, { - "$id": "1031", + "$id": "1037", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -13856,7 +13917,7 @@ ], "response": { "type": { - "$ref": "499" + "$ref": "504" }, "resultSegments": [ "value" @@ -13881,13 +13942,13 @@ ], "parameters": [ { - "$id": "1032", + "$id": "1038", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1033", + "$id": "1039", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -13898,7 +13959,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1034", + "$id": "1040", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13922,17 +13983,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1035", + "$id": "1041", "kind": "client", "name": "BarSettingsOperations", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1036", + "$id": "1042", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -13941,20 +14002,20 @@ ], "doc": "Create a BarSettingsResource", "operation": { - "$id": "1037", + "$id": "1043", "name": "createOrUpdate", "resourceName": "BarSettingsResource", "doc": "Create a BarSettingsResource", "accessibility": "public", "parameters": [ { - "$id": "1038", + "$id": "1044", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1039", + "$id": "1045", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -13964,7 +14025,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1040", + "$id": "1046", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -13978,18 +14039,18 @@ "readOnly": false }, { - "$id": "1041", + "$id": "1047", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1042", + "$id": "1048", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1043", + "$id": "1049", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14009,13 +14070,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.subscriptionId" }, { - "$id": "1044", + "$id": "1050", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1045", + "$id": "1051", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14033,13 +14094,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.resourceGroupName" }, { - "$id": "1046", + "$id": "1052", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1047", + "$id": "1053", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14057,13 +14118,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.fooName" }, { - "$id": "1048", + "$id": "1054", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1049", + "$id": "1055", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14081,7 +14142,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.barName" }, { - "$id": "1050", + "$id": "1056", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -14098,7 +14159,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.contentType" }, { - "$id": "1051", + "$id": "1057", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -14114,13 +14175,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.createOrUpdate.accept" }, { - "$id": "1052", + "$id": "1058", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "503" + "$ref": "508" }, "isApiVersion": false, "contentTypes": [ @@ -14140,7 +14201,7 @@ 200 ], "bodyType": { - "$ref": "503" + "$ref": "508" }, "headers": [], "isErrorResponse": false, @@ -14153,7 +14214,7 @@ 201 ], "bodyType": { - "$ref": "503" + "$ref": "508" }, "headers": [ { @@ -14161,7 +14222,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "1053", + "$id": "1059", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14173,7 +14234,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1054", + "$id": "1060", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -14206,13 +14267,13 @@ }, "parameters": [ { - "$id": "1055", + "$id": "1061", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1056", + "$id": "1062", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14228,13 +14289,13 @@ "decorators": [] }, { - "$id": "1057", + "$id": "1063", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1058", + "$id": "1064", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14250,13 +14311,13 @@ "decorators": [] }, { - "$id": "1059", + "$id": "1065", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1060", + "$id": "1066", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14272,13 +14333,13 @@ "decorators": [] }, { - "$id": "1061", + "$id": "1067", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "503" + "$ref": "508" }, "location": "Body", "isApiVersion": false, @@ -14290,7 +14351,7 @@ "decorators": [] }, { - "$id": "1062", + "$id": "1068", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -14308,7 +14369,7 @@ "decorators": [] }, { - "$id": "1063", + "$id": "1069", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -14327,7 +14388,7 @@ ], "response": { "type": { - "$ref": "503" + "$ref": "508" } }, "isOverride": false, @@ -14341,13 +14402,13 @@ 200 ], "bodyType": { - "$ref": "503" + "$ref": "508" } } } }, { - "$id": "1064", + "$id": "1070", "kind": "basic", "name": "get", "accessibility": "public", @@ -14356,20 +14417,20 @@ ], "doc": "Get a BarSettingsResource", "operation": { - "$id": "1065", + "$id": "1071", "name": "get", "resourceName": "BarSettingsResource", "doc": "Get a BarSettingsResource", "accessibility": "public", "parameters": [ { - "$id": "1066", + "$id": "1072", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1067", + "$id": "1073", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14379,7 +14440,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1068", + "$id": "1074", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14393,18 +14454,18 @@ "readOnly": false }, { - "$id": "1069", + "$id": "1075", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1070", + "$id": "1076", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1071", + "$id": "1077", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14424,13 +14485,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.subscriptionId" }, { - "$id": "1072", + "$id": "1078", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1073", + "$id": "1079", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14448,13 +14509,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.resourceGroupName" }, { - "$id": "1074", + "$id": "1080", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1075", + "$id": "1081", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14472,13 +14533,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.fooName" }, { - "$id": "1076", + "$id": "1082", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1077", + "$id": "1083", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14496,7 +14557,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarSettingsOperations.get.barName" }, { - "$id": "1078", + "$id": "1084", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -14518,7 +14579,7 @@ 200 ], "bodyType": { - "$ref": "503" + "$ref": "508" }, "headers": [], "isErrorResponse": false, @@ -14543,13 +14604,13 @@ }, "parameters": [ { - "$id": "1079", + "$id": "1085", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1080", + "$id": "1086", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14565,13 +14626,13 @@ "decorators": [] }, { - "$id": "1081", + "$id": "1087", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1082", + "$id": "1088", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14587,13 +14648,13 @@ "decorators": [] }, { - "$id": "1083", + "$id": "1089", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1084", + "$id": "1090", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14609,7 +14670,7 @@ "decorators": [] }, { - "$id": "1085", + "$id": "1091", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -14628,7 +14689,7 @@ ], "response": { "type": { - "$ref": "503" + "$ref": "508" } }, "isOverride": false, @@ -14639,13 +14700,13 @@ ], "parameters": [ { - "$id": "1086", + "$id": "1092", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1087", + "$id": "1093", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -14656,7 +14717,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1088", + "$id": "1094", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14680,17 +14741,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1089", + "$id": "1095", "kind": "client", "name": "BarQuotaOperations", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1090", + "$id": "1096", "kind": "basic", "name": "get", "accessibility": "public", @@ -14699,20 +14760,20 @@ ], "doc": "Get a BarQuotaResource", "operation": { - "$id": "1091", + "$id": "1097", "name": "get", "resourceName": "BarQuotaResource", "doc": "Get a BarQuotaResource", "accessibility": "public", "parameters": [ { - "$id": "1092", + "$id": "1098", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1093", + "$id": "1099", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14722,7 +14783,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1094", + "$id": "1100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -14736,18 +14797,18 @@ "readOnly": false }, { - "$id": "1095", + "$id": "1101", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1096", + "$id": "1102", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1097", + "$id": "1103", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14767,13 +14828,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.subscriptionId" }, { - "$id": "1098", + "$id": "1104", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1099", + "$id": "1105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14791,13 +14852,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.resourceGroupName" }, { - "$id": "1100", + "$id": "1106", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1101", + "$id": "1107", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14815,13 +14876,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.fooName" }, { - "$id": "1102", + "$id": "1108", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1103", + "$id": "1109", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14839,7 +14900,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barName" }, { - "$id": "1104", + "$id": "1110", "kind": "path", "name": "barQuotaResourceName", "serializedName": "barQuotaResourceName", @@ -14859,7 +14920,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get.barQuotaResourceName" }, { - "$id": "1105", + "$id": "1111", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -14881,7 +14942,7 @@ 200 ], "bodyType": { - "$ref": "538" + "$ref": "543" }, "headers": [], "isErrorResponse": false, @@ -14906,13 +14967,13 @@ }, "parameters": [ { - "$id": "1106", + "$id": "1112", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1107", + "$id": "1113", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14928,13 +14989,13 @@ "decorators": [] }, { - "$id": "1108", + "$id": "1114", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1109", + "$id": "1115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14950,13 +15011,13 @@ "decorators": [] }, { - "$id": "1110", + "$id": "1116", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1111", + "$id": "1117", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -14972,7 +15033,7 @@ "decorators": [] }, { - "$id": "1112", + "$id": "1118", "kind": "method", "name": "barQuotaResourceName", "serializedName": "barQuotaResourceName", @@ -14990,7 +15051,7 @@ "decorators": [] }, { - "$id": "1113", + "$id": "1119", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -15009,7 +15070,7 @@ ], "response": { "type": { - "$ref": "538" + "$ref": "543" } }, "isOverride": false, @@ -15018,7 +15079,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.get" }, { - "$id": "1114", + "$id": "1120", "kind": "lro", "name": "update", "accessibility": "public", @@ -15027,20 +15088,20 @@ ], "doc": "Update a BarQuotaResource", "operation": { - "$id": "1115", + "$id": "1121", "name": "update", "resourceName": "BarQuotaResource", "doc": "Update a BarQuotaResource", "accessibility": "public", "parameters": [ { - "$id": "1116", + "$id": "1122", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1117", + "$id": "1123", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15050,7 +15111,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1118", + "$id": "1124", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15064,18 +15125,18 @@ "readOnly": false }, { - "$id": "1119", + "$id": "1125", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1120", + "$id": "1126", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1121", + "$id": "1127", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15095,13 +15156,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.subscriptionId" }, { - "$id": "1122", + "$id": "1128", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1123", + "$id": "1129", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15119,13 +15180,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.resourceGroupName" }, { - "$id": "1124", + "$id": "1130", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1125", + "$id": "1131", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15143,13 +15204,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.fooName" }, { - "$id": "1126", + "$id": "1132", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1127", + "$id": "1133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15167,7 +15228,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barName" }, { - "$id": "1128", + "$id": "1134", "kind": "path", "name": "barQuotaResourceName", "serializedName": "barQuotaResourceName", @@ -15187,7 +15248,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.barQuotaResourceName" }, { - "$id": "1129", + "$id": "1135", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -15204,7 +15265,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.contentType" }, { - "$id": "1130", + "$id": "1136", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -15220,13 +15281,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.BarQuotaOperations.update.accept" }, { - "$id": "1131", + "$id": "1137", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "538" + "$ref": "543" }, "isApiVersion": false, "contentTypes": [ @@ -15246,7 +15307,7 @@ 200 ], "bodyType": { - "$ref": "538" + "$ref": "543" }, "headers": [], "isErrorResponse": false, @@ -15264,7 +15325,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1132", + "$id": "1138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15276,7 +15337,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1133", + "$id": "1139", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -15306,13 +15367,13 @@ }, "parameters": [ { - "$id": "1134", + "$id": "1140", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1135", + "$id": "1141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15328,13 +15389,13 @@ "decorators": [] }, { - "$id": "1136", + "$id": "1142", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1137", + "$id": "1143", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15350,13 +15411,13 @@ "decorators": [] }, { - "$id": "1138", + "$id": "1144", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1139", + "$id": "1145", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15372,7 +15433,7 @@ "decorators": [] }, { - "$id": "1140", + "$id": "1146", "kind": "method", "name": "barQuotaResourceName", "serializedName": "barQuotaResourceName", @@ -15390,13 +15451,13 @@ "decorators": [] }, { - "$id": "1141", + "$id": "1147", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "538" + "$ref": "543" }, "location": "Body", "isApiVersion": false, @@ -15408,7 +15469,7 @@ "decorators": [] }, { - "$id": "1142", + "$id": "1148", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -15426,7 +15487,7 @@ "decorators": [] }, { - "$id": "1143", + "$id": "1149", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -15445,7 +15506,7 @@ ], "response": { "type": { - "$ref": "538" + "$ref": "543" } }, "isOverride": false, @@ -15459,7 +15520,7 @@ 200 ], "bodyType": { - "$ref": "538" + "$ref": "543" } } } @@ -15467,13 +15528,13 @@ ], "parameters": [ { - "$id": "1144", + "$id": "1150", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1145", + "$id": "1151", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -15484,7 +15545,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1146", + "$id": "1152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15508,17 +15569,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1147", + "$id": "1153", "kind": "client", "name": "Employees", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1148", + "$id": "1154", "kind": "paging", "name": "GetEmployees", "accessibility": "public", @@ -15527,20 +15588,20 @@ ], "doc": "List Employee resources by Bar", "operation": { - "$id": "1149", + "$id": "1155", "name": "GetEmployees", "resourceName": "Employee", "doc": "List Employee resources by Bar", "accessibility": "public", "parameters": [ { - "$id": "1150", + "$id": "1156", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1151", + "$id": "1157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15550,7 +15611,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1152", + "$id": "1158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15564,18 +15625,18 @@ "readOnly": false }, { - "$id": "1153", + "$id": "1159", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1154", + "$id": "1160", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1155", + "$id": "1161", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15595,13 +15656,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Employees.listByParent.subscriptionId" }, { - "$id": "1156", + "$id": "1162", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1157", + "$id": "1163", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15619,13 +15680,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Employees.listByParent.resourceGroupName" }, { - "$id": "1158", + "$id": "1164", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1159", + "$id": "1165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15643,13 +15704,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Employees.listByParent.fooName" }, { - "$id": "1160", + "$id": "1166", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1161", + "$id": "1167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15667,7 +15728,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Employees.listByParent.barName" }, { - "$id": "1162", + "$id": "1168", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -15689,7 +15750,7 @@ 200 ], "bodyType": { - "$ref": "543" + "$ref": "548" }, "headers": [], "isErrorResponse": false, @@ -15714,13 +15775,13 @@ }, "parameters": [ { - "$id": "1163", + "$id": "1169", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1164", + "$id": "1170", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15736,13 +15797,13 @@ "decorators": [] }, { - "$id": "1165", + "$id": "1171", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1166", + "$id": "1172", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15758,13 +15819,13 @@ "decorators": [] }, { - "$id": "1167", + "$id": "1173", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1168", + "$id": "1174", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15780,7 +15841,7 @@ "decorators": [] }, { - "$id": "1169", + "$id": "1175", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -15799,7 +15860,7 @@ ], "response": { "type": { - "$ref": "545" + "$ref": "550" }, "resultSegments": [ "value" @@ -15824,13 +15885,13 @@ ], "parameters": [ { - "$id": "1170", + "$id": "1176", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1171", + "$id": "1177", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -15841,7 +15902,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1172", + "$id": "1178", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15865,17 +15926,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1173", + "$id": "1179", "kind": "client", "name": "Bazs", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1174", + "$id": "1180", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -15884,20 +15945,20 @@ ], "doc": "Create a Baz", "operation": { - "$id": "1175", + "$id": "1181", "name": "createOrUpdate", "resourceName": "Baz", "doc": "Create a Baz", "accessibility": "public", "parameters": [ { - "$id": "1176", + "$id": "1182", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1177", + "$id": "1183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15907,7 +15968,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1178", + "$id": "1184", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -15921,18 +15982,18 @@ "readOnly": false }, { - "$id": "1179", + "$id": "1185", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1180", + "$id": "1186", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1181", + "$id": "1187", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15952,13 +16013,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.subscriptionId" }, { - "$id": "1182", + "$id": "1188", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1183", + "$id": "1189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -15976,13 +16037,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.resourceGroupName" }, { - "$id": "1184", + "$id": "1190", "kind": "path", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1185", + "$id": "1191", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16000,7 +16061,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.bazName" }, { - "$id": "1186", + "$id": "1192", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -16017,7 +16078,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.contentType" }, { - "$id": "1187", + "$id": "1193", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16033,13 +16094,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.createOrUpdate.accept" }, { - "$id": "1188", + "$id": "1194", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "558" + "$ref": "563" }, "isApiVersion": false, "contentTypes": [ @@ -16059,7 +16120,7 @@ 200 ], "bodyType": { - "$ref": "558" + "$ref": "563" }, "headers": [], "isErrorResponse": false, @@ -16072,7 +16133,7 @@ 201 ], "bodyType": { - "$ref": "558" + "$ref": "563" }, "headers": [ { @@ -16080,7 +16141,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "1189", + "$id": "1195", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16092,7 +16153,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1190", + "$id": "1196", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -16125,13 +16186,13 @@ }, "parameters": [ { - "$id": "1191", + "$id": "1197", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1192", + "$id": "1198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16147,13 +16208,13 @@ "decorators": [] }, { - "$id": "1193", + "$id": "1199", "kind": "method", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1194", + "$id": "1200", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16169,13 +16230,13 @@ "decorators": [] }, { - "$id": "1195", + "$id": "1201", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "558" + "$ref": "563" }, "location": "Body", "isApiVersion": false, @@ -16187,7 +16248,7 @@ "decorators": [] }, { - "$id": "1196", + "$id": "1202", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -16205,7 +16266,7 @@ "decorators": [] }, { - "$id": "1197", + "$id": "1203", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16224,7 +16285,7 @@ ], "response": { "type": { - "$ref": "558" + "$ref": "563" } }, "isOverride": false, @@ -16238,13 +16299,13 @@ 200 ], "bodyType": { - "$ref": "558" + "$ref": "563" } } } }, { - "$id": "1198", + "$id": "1204", "kind": "basic", "name": "get", "accessibility": "public", @@ -16253,20 +16314,20 @@ ], "doc": "Get a Baz", "operation": { - "$id": "1199", + "$id": "1205", "name": "get", "resourceName": "Baz", "doc": "Get a Baz", "accessibility": "public", "parameters": [ { - "$id": "1200", + "$id": "1206", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1201", + "$id": "1207", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16276,7 +16337,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1202", + "$id": "1208", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16290,18 +16351,18 @@ "readOnly": false }, { - "$id": "1203", + "$id": "1209", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1204", + "$id": "1210", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1205", + "$id": "1211", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16321,13 +16382,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.subscriptionId" }, { - "$id": "1206", + "$id": "1212", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1207", + "$id": "1213", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16345,13 +16406,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.resourceGroupName" }, { - "$id": "1208", + "$id": "1214", "kind": "path", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1209", + "$id": "1215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16369,7 +16430,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get.bazName" }, { - "$id": "1210", + "$id": "1216", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16391,7 +16452,7 @@ 200 ], "bodyType": { - "$ref": "558" + "$ref": "563" }, "headers": [], "isErrorResponse": false, @@ -16416,13 +16477,13 @@ }, "parameters": [ { - "$id": "1211", + "$id": "1217", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1212", + "$id": "1218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16438,13 +16499,13 @@ "decorators": [] }, { - "$id": "1213", + "$id": "1219", "kind": "method", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1214", + "$id": "1220", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16460,7 +16521,7 @@ "decorators": [] }, { - "$id": "1215", + "$id": "1221", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -16479,7 +16540,7 @@ ], "response": { "type": { - "$ref": "558" + "$ref": "563" } }, "isOverride": false, @@ -16488,7 +16549,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.get" }, { - "$id": "1216", + "$id": "1222", "kind": "lro", "name": "delete", "accessibility": "public", @@ -16497,20 +16558,20 @@ ], "doc": "Delete a Baz", "operation": { - "$id": "1217", + "$id": "1223", "name": "delete", "resourceName": "Baz", "doc": "Delete a Baz", "accessibility": "public", "parameters": [ { - "$id": "1218", + "$id": "1224", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1219", + "$id": "1225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16520,7 +16581,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1220", + "$id": "1226", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16534,18 +16595,18 @@ "readOnly": false }, { - "$id": "1221", + "$id": "1227", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1222", + "$id": "1228", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1223", + "$id": "1229", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16565,13 +16626,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.subscriptionId" }, { - "$id": "1224", + "$id": "1230", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1225", + "$id": "1231", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16589,13 +16650,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.delete.resourceGroupName" }, { - "$id": "1226", + "$id": "1232", "kind": "path", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1227", + "$id": "1233", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16624,7 +16685,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1228", + "$id": "1234", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16636,7 +16697,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1229", + "$id": "1235", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -16670,13 +16731,13 @@ }, "parameters": [ { - "$id": "1230", + "$id": "1236", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1231", + "$id": "1237", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16692,13 +16753,13 @@ "decorators": [] }, { - "$id": "1232", + "$id": "1238", "kind": "method", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1233", + "$id": "1239", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16729,7 +16790,7 @@ } }, { - "$id": "1234", + "$id": "1240", "kind": "lro", "name": "update", "accessibility": "public", @@ -16738,20 +16799,20 @@ ], "doc": "Update a Baz", "operation": { - "$id": "1235", + "$id": "1241", "name": "update", "resourceName": "Baz", "doc": "Update a Baz", "accessibility": "public", "parameters": [ { - "$id": "1236", + "$id": "1242", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1237", + "$id": "1243", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16761,7 +16822,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1238", + "$id": "1244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -16775,18 +16836,18 @@ "readOnly": false }, { - "$id": "1239", + "$id": "1245", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1240", + "$id": "1246", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1241", + "$id": "1247", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16806,13 +16867,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.subscriptionId" }, { - "$id": "1242", + "$id": "1248", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1243", + "$id": "1249", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16830,13 +16891,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.resourceGroupName" }, { - "$id": "1244", + "$id": "1250", "kind": "path", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1245", + "$id": "1251", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16854,7 +16915,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.bazName" }, { - "$id": "1246", + "$id": "1252", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -16871,7 +16932,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.contentType" }, { - "$id": "1247", + "$id": "1253", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -16887,13 +16948,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.update.accept" }, { - "$id": "1248", + "$id": "1254", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "558" + "$ref": "563" }, "isApiVersion": false, "contentTypes": [ @@ -16913,7 +16974,7 @@ 200 ], "bodyType": { - "$ref": "558" + "$ref": "563" }, "headers": [], "isErrorResponse": false, @@ -16931,7 +16992,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1249", + "$id": "1255", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16943,7 +17004,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1250", + "$id": "1256", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -16973,13 +17034,13 @@ }, "parameters": [ { - "$id": "1251", + "$id": "1257", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1252", + "$id": "1258", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -16995,13 +17056,13 @@ "decorators": [] }, { - "$id": "1253", + "$id": "1259", "kind": "method", "name": "bazName", "serializedName": "bazName", "doc": "The name of the Baz", "type": { - "$id": "1254", + "$id": "1260", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17017,13 +17078,13 @@ "decorators": [] }, { - "$id": "1255", + "$id": "1261", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "558" + "$ref": "563" }, "location": "Body", "isApiVersion": false, @@ -17035,7 +17096,7 @@ "decorators": [] }, { - "$id": "1256", + "$id": "1262", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17053,7 +17114,7 @@ "decorators": [] }, { - "$id": "1257", + "$id": "1263", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17072,7 +17133,7 @@ ], "response": { "type": { - "$ref": "558" + "$ref": "563" } }, "isOverride": false, @@ -17086,13 +17147,13 @@ 200 ], "bodyType": { - "$ref": "558" + "$ref": "563" } } } }, { - "$id": "1258", + "$id": "1264", "kind": "paging", "name": "list", "accessibility": "public", @@ -17101,20 +17162,20 @@ ], "doc": "List Baz resources by resource group", "operation": { - "$id": "1259", + "$id": "1265", "name": "list", "resourceName": "Baz", "doc": "List Baz resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "1260", + "$id": "1266", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1261", + "$id": "1267", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17124,7 +17185,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1262", + "$id": "1268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17138,18 +17199,18 @@ "readOnly": false }, { - "$id": "1263", + "$id": "1269", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1264", + "$id": "1270", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1265", + "$id": "1271", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17169,13 +17230,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.subscriptionId" }, { - "$id": "1266", + "$id": "1272", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1267", + "$id": "1273", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17193,7 +17254,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.list.resourceGroupName" }, { - "$id": "1268", + "$id": "1274", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17215,7 +17276,7 @@ 200 ], "bodyType": { - "$ref": "573" + "$ref": "578" }, "headers": [], "isErrorResponse": false, @@ -17240,13 +17301,13 @@ }, "parameters": [ { - "$id": "1269", + "$id": "1275", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1270", + "$id": "1276", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17262,7 +17323,7 @@ "decorators": [] }, { - "$id": "1271", + "$id": "1277", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17281,7 +17342,7 @@ ], "response": { "type": { - "$ref": "575" + "$ref": "580" }, "resultSegments": [ "value" @@ -17304,7 +17365,7 @@ } }, { - "$id": "1272", + "$id": "1278", "kind": "paging", "name": "listBySubscription", "accessibility": "public", @@ -17313,20 +17374,20 @@ ], "doc": "List Baz resources by subscription ID", "operation": { - "$id": "1273", + "$id": "1279", "name": "listBySubscription", "resourceName": "Baz", "doc": "List Baz resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "1274", + "$id": "1280", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1275", + "$id": "1281", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17336,7 +17397,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1276", + "$id": "1282", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17350,18 +17411,18 @@ "readOnly": false }, { - "$id": "1277", + "$id": "1283", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1278", + "$id": "1284", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1279", + "$id": "1285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17381,7 +17442,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bazs.listBySubscription.subscriptionId" }, { - "$id": "1280", + "$id": "1286", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17403,7 +17464,7 @@ 200 ], "bodyType": { - "$ref": "573" + "$ref": "578" }, "headers": [], "isErrorResponse": false, @@ -17428,7 +17489,7 @@ }, "parameters": [ { - "$id": "1281", + "$id": "1287", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17447,7 +17508,7 @@ ], "response": { "type": { - "$ref": "575" + "$ref": "580" }, "resultSegments": [ "value" @@ -17472,13 +17533,13 @@ ], "parameters": [ { - "$id": "1282", + "$id": "1288", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1283", + "$id": "1289", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -17489,7 +17550,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1284", + "$id": "1290", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17513,17 +17574,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1285", + "$id": "1291", "kind": "client", "name": "Zoos", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1286", + "$id": "1292", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -17532,20 +17593,20 @@ ], "doc": "Create a Zoo", "operation": { - "$id": "1287", + "$id": "1293", "name": "createOrUpdate", "resourceName": "Zoo", "doc": "Create a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1288", + "$id": "1294", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1289", + "$id": "1295", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17555,7 +17616,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1290", + "$id": "1296", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17569,18 +17630,18 @@ "readOnly": false }, { - "$id": "1291", + "$id": "1297", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1292", + "$id": "1298", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1293", + "$id": "1299", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17600,13 +17661,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.subscriptionId" }, { - "$id": "1294", + "$id": "1300", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1295", + "$id": "1301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17624,13 +17685,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.resourceGroupName" }, { - "$id": "1296", + "$id": "1302", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1297", + "$id": "1303", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17648,7 +17709,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.zooName" }, { - "$id": "1298", + "$id": "1304", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -17665,7 +17726,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.contentType" }, { - "$id": "1299", + "$id": "1305", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -17681,13 +17742,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.createOrUpdate.accept" }, { - "$id": "1300", + "$id": "1306", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "579" + "$ref": "584" }, "isApiVersion": false, "contentTypes": [ @@ -17707,7 +17768,7 @@ 200 ], "bodyType": { - "$ref": "579" + "$ref": "584" }, "headers": [], "isErrorResponse": false, @@ -17720,7 +17781,7 @@ 201 ], "bodyType": { - "$ref": "579" + "$ref": "584" }, "headers": [ { @@ -17728,7 +17789,7 @@ "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "1301", + "$id": "1307", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17740,7 +17801,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1302", + "$id": "1308", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -17773,13 +17834,13 @@ }, "parameters": [ { - "$id": "1303", + "$id": "1309", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1304", + "$id": "1310", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17795,13 +17856,13 @@ "decorators": [] }, { - "$id": "1305", + "$id": "1311", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1306", + "$id": "1312", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17817,13 +17878,13 @@ "decorators": [] }, { - "$id": "1307", + "$id": "1313", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "579" + "$ref": "584" }, "location": "Body", "isApiVersion": false, @@ -17835,7 +17896,7 @@ "decorators": [] }, { - "$id": "1308", + "$id": "1314", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -17853,7 +17914,7 @@ "decorators": [] }, { - "$id": "1309", + "$id": "1315", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -17872,7 +17933,7 @@ ], "response": { "type": { - "$ref": "579" + "$ref": "584" } }, "isOverride": false, @@ -17886,13 +17947,13 @@ 200 ], "bodyType": { - "$ref": "579" + "$ref": "584" } } } }, { - "$id": "1310", + "$id": "1316", "kind": "basic", "name": "get", "accessibility": "public", @@ -17901,20 +17962,20 @@ ], "doc": "Get a Zoo", "operation": { - "$id": "1311", + "$id": "1317", "name": "get", "resourceName": "Zoo", "doc": "Get a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1312", + "$id": "1318", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1313", + "$id": "1319", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17924,7 +17985,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1314", + "$id": "1320", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -17938,18 +17999,18 @@ "readOnly": false }, { - "$id": "1315", + "$id": "1321", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1316", + "$id": "1322", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1317", + "$id": "1323", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17969,13 +18030,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.subscriptionId" }, { - "$id": "1318", + "$id": "1324", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1319", + "$id": "1325", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -17993,13 +18054,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.resourceGroupName" }, { - "$id": "1320", + "$id": "1326", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1321", + "$id": "1327", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18017,7 +18078,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get.zooName" }, { - "$id": "1322", + "$id": "1328", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18039,7 +18100,7 @@ 200 ], "bodyType": { - "$ref": "579" + "$ref": "584" }, "headers": [], "isErrorResponse": false, @@ -18064,13 +18125,13 @@ }, "parameters": [ { - "$id": "1323", + "$id": "1329", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1324", + "$id": "1330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18086,13 +18147,13 @@ "decorators": [] }, { - "$id": "1325", + "$id": "1331", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1326", + "$id": "1332", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18108,7 +18169,7 @@ "decorators": [] }, { - "$id": "1327", + "$id": "1333", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18127,7 +18188,7 @@ ], "response": { "type": { - "$ref": "579" + "$ref": "584" } }, "isOverride": false, @@ -18136,7 +18197,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.get" }, { - "$id": "1328", + "$id": "1334", "kind": "lro", "name": "delete", "accessibility": "public", @@ -18145,20 +18206,20 @@ ], "doc": "Delete a Zoo", "operation": { - "$id": "1329", + "$id": "1335", "name": "delete", "resourceName": "Zoo", "doc": "Delete a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1330", + "$id": "1336", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1331", + "$id": "1337", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18168,7 +18229,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1332", + "$id": "1338", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -18182,18 +18243,18 @@ "readOnly": false }, { - "$id": "1333", + "$id": "1339", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1334", + "$id": "1340", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1335", + "$id": "1341", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18213,13 +18274,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.subscriptionId" }, { - "$id": "1336", + "$id": "1342", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1337", + "$id": "1343", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18237,13 +18298,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.delete.resourceGroupName" }, { - "$id": "1338", + "$id": "1344", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1339", + "$id": "1345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18272,7 +18333,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1340", + "$id": "1346", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18284,7 +18345,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1341", + "$id": "1347", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18318,13 +18379,13 @@ }, "parameters": [ { - "$id": "1342", + "$id": "1348", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1343", + "$id": "1349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18340,13 +18401,13 @@ "decorators": [] }, { - "$id": "1344", + "$id": "1350", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1345", + "$id": "1351", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18377,7 +18438,7 @@ } }, { - "$id": "1346", + "$id": "1352", "kind": "lro", "name": "update", "accessibility": "public", @@ -18386,20 +18447,20 @@ ], "doc": "Update a Zoo", "operation": { - "$id": "1347", + "$id": "1353", "name": "update", "resourceName": "Zoo", "doc": "Update a Zoo", "accessibility": "public", "parameters": [ { - "$id": "1348", + "$id": "1354", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1349", + "$id": "1355", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18409,7 +18470,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1350", + "$id": "1356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -18423,18 +18484,18 @@ "readOnly": false }, { - "$id": "1351", + "$id": "1357", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1352", + "$id": "1358", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1353", + "$id": "1359", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18454,13 +18515,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.subscriptionId" }, { - "$id": "1354", + "$id": "1360", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1355", + "$id": "1361", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18478,13 +18539,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.resourceGroupName" }, { - "$id": "1356", + "$id": "1362", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1357", + "$id": "1363", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18502,7 +18563,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.zooName" }, { - "$id": "1358", + "$id": "1364", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -18519,7 +18580,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.contentType" }, { - "$id": "1359", + "$id": "1365", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18535,13 +18596,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.update.accept" }, { - "$id": "1360", + "$id": "1366", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "595" + "$ref": "600" }, "isApiVersion": false, "contentTypes": [ @@ -18561,7 +18622,7 @@ 200 ], "bodyType": { - "$ref": "579" + "$ref": "584" }, "headers": [], "isErrorResponse": false, @@ -18579,7 +18640,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1361", + "$id": "1367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18591,7 +18652,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1362", + "$id": "1368", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -18621,13 +18682,13 @@ }, "parameters": [ { - "$id": "1363", + "$id": "1369", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1364", + "$id": "1370", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18643,13 +18704,13 @@ "decorators": [] }, { - "$id": "1365", + "$id": "1371", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1366", + "$id": "1372", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18665,13 +18726,13 @@ "decorators": [] }, { - "$id": "1367", + "$id": "1373", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "595" + "$ref": "600" }, "location": "Body", "isApiVersion": false, @@ -18683,7 +18744,7 @@ "decorators": [] }, { - "$id": "1368", + "$id": "1374", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -18701,7 +18762,7 @@ "decorators": [] }, { - "$id": "1369", + "$id": "1375", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18720,7 +18781,7 @@ ], "response": { "type": { - "$ref": "579" + "$ref": "584" } }, "isOverride": false, @@ -18734,13 +18795,13 @@ 200 ], "bodyType": { - "$ref": "579" + "$ref": "584" } } } }, { - "$id": "1370", + "$id": "1376", "kind": "paging", "name": "list", "accessibility": "public", @@ -18749,20 +18810,20 @@ ], "doc": "List Zoo resources by resource group", "operation": { - "$id": "1371", + "$id": "1377", "name": "list", "resourceName": "Zoo", "doc": "List Zoo resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "1372", + "$id": "1378", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1373", + "$id": "1379", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18772,7 +18833,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1374", + "$id": "1380", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -18786,18 +18847,18 @@ "readOnly": false }, { - "$id": "1375", + "$id": "1381", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1376", + "$id": "1382", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1377", + "$id": "1383", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18817,13 +18878,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.subscriptionId" }, { - "$id": "1378", + "$id": "1384", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1379", + "$id": "1385", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18841,7 +18902,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.list.resourceGroupName" }, { - "$id": "1380", + "$id": "1386", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -18863,7 +18924,7 @@ 200 ], "bodyType": { - "$ref": "601" + "$ref": "606" }, "headers": [], "isErrorResponse": false, @@ -18888,13 +18949,13 @@ }, "parameters": [ { - "$id": "1381", + "$id": "1387", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1382", + "$id": "1388", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18910,7 +18971,7 @@ "decorators": [] }, { - "$id": "1383", + "$id": "1389", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -18929,7 +18990,7 @@ ], "response": { "type": { - "$ref": "603" + "$ref": "608" }, "resultSegments": [ "value" @@ -18952,7 +19013,7 @@ } }, { - "$id": "1384", + "$id": "1390", "kind": "paging", "name": "listBySubscription", "accessibility": "public", @@ -18961,20 +19022,20 @@ ], "doc": "List Zoo resources by subscription ID", "operation": { - "$id": "1385", + "$id": "1391", "name": "listBySubscription", "resourceName": "Zoo", "doc": "List Zoo resources by subscription ID", "accessibility": "public", "parameters": [ { - "$id": "1386", + "$id": "1392", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1387", + "$id": "1393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -18984,7 +19045,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1388", + "$id": "1394", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -18998,18 +19059,18 @@ "readOnly": false }, { - "$id": "1389", + "$id": "1395", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1390", + "$id": "1396", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1391", + "$id": "1397", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19029,7 +19090,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.listBySubscription.subscriptionId" }, { - "$id": "1392", + "$id": "1398", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19051,7 +19112,7 @@ 200 ], "bodyType": { - "$ref": "601" + "$ref": "606" }, "headers": [], "isErrorResponse": false, @@ -19076,7 +19137,7 @@ }, "parameters": [ { - "$id": "1393", + "$id": "1399", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19095,7 +19156,7 @@ ], "response": { "type": { - "$ref": "603" + "$ref": "608" }, "resultSegments": [ "value" @@ -19118,7 +19179,7 @@ } }, { - "$id": "1394", + "$id": "1400", "kind": "basic", "name": "zooAddressList", "accessibility": "public", @@ -19127,20 +19188,20 @@ ], "doc": "A synchronous resource action.", "operation": { - "$id": "1395", + "$id": "1401", "name": "zooAddressList", "resourceName": "Zoos", "doc": "A synchronous resource action.", "accessibility": "public", "parameters": [ { - "$id": "1396", + "$id": "1402", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1397", + "$id": "1403", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19150,7 +19211,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1398", + "$id": "1404", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19164,18 +19225,18 @@ "readOnly": false }, { - "$id": "1399", + "$id": "1405", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1400", + "$id": "1406", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1401", + "$id": "1407", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19195,13 +19256,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.subscriptionId" }, { - "$id": "1402", + "$id": "1408", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1403", + "$id": "1409", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19219,13 +19280,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.resourceGroupName" }, { - "$id": "1404", + "$id": "1410", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1405", + "$id": "1411", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19243,12 +19304,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.zooAddressList.zooName" }, { - "$id": "1406", + "$id": "1412", "kind": "query", "name": "$maxpagesize", "serializedName": "$maxpagesize", "type": { - "$id": "1407", + "$id": "1413", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19263,7 +19324,7 @@ "readOnly": false }, { - "$id": "1408", + "$id": "1414", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19285,7 +19346,7 @@ 200 ], "bodyType": { - "$ref": "607" + "$ref": "612" }, "headers": [], "isErrorResponse": false, @@ -19310,13 +19371,13 @@ }, "parameters": [ { - "$id": "1409", + "$id": "1415", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1410", + "$id": "1416", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19332,13 +19393,13 @@ "decorators": [] }, { - "$id": "1411", + "$id": "1417", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1412", + "$id": "1418", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19354,12 +19415,12 @@ "decorators": [] }, { - "$id": "1413", + "$id": "1419", "kind": "method", "name": "$maxpagesize", "serializedName": "$maxpagesize", "type": { - "$id": "1414", + "$id": "1420", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -19375,7 +19436,7 @@ "decorators": [] }, { - "$id": "1415", + "$id": "1421", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19394,7 +19455,7 @@ ], "response": { "type": { - "$ref": "607" + "$ref": "612" } }, "isOverride": false, @@ -19405,13 +19466,13 @@ ], "parameters": [ { - "$id": "1416", + "$id": "1422", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1417", + "$id": "1423", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -19422,7 +19483,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1418", + "$id": "1424", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19446,17 +19507,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1419", + "$id": "1425", "kind": "client", "name": "EndpointResources", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1420", + "$id": "1426", "kind": "basic", "name": "get", "accessibility": "public", @@ -19465,20 +19526,20 @@ ], "doc": "Gets the endpoint to the resource.", "operation": { - "$id": "1421", + "$id": "1427", "name": "get", "resourceName": "EndpointResource", "doc": "Gets the endpoint to the resource.", "accessibility": "public", "parameters": [ { - "$id": "1422", + "$id": "1428", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1423", + "$id": "1429", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19488,7 +19549,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1424", + "$id": "1430", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19502,13 +19563,13 @@ "readOnly": false }, { - "$id": "1425", + "$id": "1431", "kind": "path", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1426", + "$id": "1432", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19526,13 +19587,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.resourceUri" }, { - "$id": "1427", + "$id": "1433", "kind": "path", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1428", + "$id": "1434", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19550,7 +19611,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get.endpointName" }, { - "$id": "1429", + "$id": "1435", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19572,7 +19633,7 @@ 200 ], "bodyType": { - "$ref": "614" + "$ref": "619" }, "headers": [], "isErrorResponse": false, @@ -19597,13 +19658,13 @@ }, "parameters": [ { - "$id": "1430", + "$id": "1436", "kind": "method", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1431", + "$id": "1437", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19619,13 +19680,13 @@ "decorators": [] }, { - "$id": "1432", + "$id": "1438", "kind": "method", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1433", + "$id": "1439", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19641,7 +19702,7 @@ "decorators": [] }, { - "$id": "1434", + "$id": "1440", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19660,7 +19721,7 @@ ], "response": { "type": { - "$ref": "614" + "$ref": "619" } }, "isOverride": false, @@ -19669,7 +19730,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.get" }, { - "$id": "1435", + "$id": "1441", "kind": "basic", "name": "createOrUpdate", "accessibility": "public", @@ -19678,20 +19739,20 @@ ], "doc": "Create or update the endpoint to the target resource.", "operation": { - "$id": "1436", + "$id": "1442", "name": "createOrUpdate", "resourceName": "EndpointResource", "doc": "Create or update the endpoint to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1437", + "$id": "1443", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1438", + "$id": "1444", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19701,7 +19762,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1439", + "$id": "1445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -19715,13 +19776,13 @@ "readOnly": false }, { - "$id": "1440", + "$id": "1446", "kind": "path", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1441", + "$id": "1447", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19739,13 +19800,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.resourceUri" }, { - "$id": "1442", + "$id": "1448", "kind": "path", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1443", + "$id": "1449", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19763,7 +19824,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.endpointName" }, { - "$id": "1444", + "$id": "1450", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -19780,7 +19841,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.contentType" }, { - "$id": "1445", + "$id": "1451", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -19796,13 +19857,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate.accept" }, { - "$id": "1446", + "$id": "1452", "kind": "body", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "614" + "$ref": "619" }, "isApiVersion": false, "contentTypes": [ @@ -19822,7 +19883,7 @@ 200 ], "bodyType": { - "$ref": "614" + "$ref": "619" }, "headers": [], "isErrorResponse": false, @@ -19850,13 +19911,13 @@ }, "parameters": [ { - "$id": "1447", + "$id": "1453", "kind": "method", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1448", + "$id": "1454", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19872,13 +19933,13 @@ "decorators": [] }, { - "$id": "1449", + "$id": "1455", "kind": "method", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1450", + "$id": "1456", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19894,13 +19955,13 @@ "decorators": [] }, { - "$id": "1451", + "$id": "1457", "kind": "method", "name": "resource", "serializedName": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "614" + "$ref": "619" }, "location": "Body", "isApiVersion": false, @@ -19912,7 +19973,7 @@ "decorators": [] }, { - "$id": "1452", + "$id": "1458", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -19930,7 +19991,7 @@ "decorators": [] }, { - "$id": "1453", + "$id": "1459", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -19949,7 +20010,7 @@ ], "response": { "type": { - "$ref": "614" + "$ref": "619" } }, "isOverride": false, @@ -19958,7 +20019,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.createOrUpdate" }, { - "$id": "1454", + "$id": "1460", "kind": "basic", "name": "update", "accessibility": "public", @@ -19967,20 +20028,20 @@ ], "doc": "Update the endpoint to the target resource.", "operation": { - "$id": "1455", + "$id": "1461", "name": "update", "resourceName": "EndpointResource", "doc": "Update the endpoint to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1456", + "$id": "1462", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1457", + "$id": "1463", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -19990,7 +20051,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1458", + "$id": "1464", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20004,13 +20065,13 @@ "readOnly": false }, { - "$id": "1459", + "$id": "1465", "kind": "path", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1460", + "$id": "1466", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20028,13 +20089,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.resourceUri" }, { - "$id": "1461", + "$id": "1467", "kind": "path", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1462", + "$id": "1468", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20052,7 +20113,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.endpointName" }, { - "$id": "1463", + "$id": "1469", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -20069,7 +20130,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.contentType" }, { - "$id": "1464", + "$id": "1470", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20085,13 +20146,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update.accept" }, { - "$id": "1465", + "$id": "1471", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "614" + "$ref": "619" }, "isApiVersion": false, "contentTypes": [ @@ -20111,7 +20172,7 @@ 200 ], "bodyType": { - "$ref": "614" + "$ref": "619" }, "headers": [], "isErrorResponse": false, @@ -20139,13 +20200,13 @@ }, "parameters": [ { - "$id": "1466", + "$id": "1472", "kind": "method", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1467", + "$id": "1473", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20161,13 +20222,13 @@ "decorators": [] }, { - "$id": "1468", + "$id": "1474", "kind": "method", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1469", + "$id": "1475", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20183,13 +20244,13 @@ "decorators": [] }, { - "$id": "1470", + "$id": "1476", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "614" + "$ref": "619" }, "location": "Body", "isApiVersion": false, @@ -20201,7 +20262,7 @@ "decorators": [] }, { - "$id": "1471", + "$id": "1477", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -20219,7 +20280,7 @@ "decorators": [] }, { - "$id": "1472", + "$id": "1478", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20238,7 +20299,7 @@ ], "response": { "type": { - "$ref": "614" + "$ref": "619" } }, "isOverride": false, @@ -20247,7 +20308,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.update" }, { - "$id": "1473", + "$id": "1479", "kind": "basic", "name": "delete", "accessibility": "public", @@ -20256,20 +20317,20 @@ ], "doc": "Deletes the endpoint access to the target resource.", "operation": { - "$id": "1474", + "$id": "1480", "name": "delete", "resourceName": "EndpointResource", "doc": "Deletes the endpoint access to the target resource.", "accessibility": "public", "parameters": [ { - "$id": "1475", + "$id": "1481", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1476", + "$id": "1482", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20279,7 +20340,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1477", + "$id": "1483", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20293,13 +20354,13 @@ "readOnly": false }, { - "$id": "1478", + "$id": "1484", "kind": "path", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1479", + "$id": "1485", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20317,13 +20378,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.EndpointResources.delete.resourceUri" }, { - "$id": "1480", + "$id": "1486", "kind": "path", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1481", + "$id": "1487", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20373,13 +20434,13 @@ }, "parameters": [ { - "$id": "1482", + "$id": "1488", "kind": "method", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1483", + "$id": "1489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20395,13 +20456,13 @@ "decorators": [] }, { - "$id": "1484", + "$id": "1490", "kind": "method", "name": "endpointName", "serializedName": "endpointName", "doc": "The name of the EndpointResource", "type": { - "$id": "1485", + "$id": "1491", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20426,13 +20487,13 @@ ], "parameters": [ { - "$id": "1486", + "$id": "1492", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1487", + "$id": "1493", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -20443,7 +20504,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1488", + "$id": "1494", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20467,17 +20528,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1489", + "$id": "1495", "kind": "client", "name": "SolutionResources", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1490", + "$id": "1496", "kind": "basic", "name": "get", "accessibility": "public", @@ -20486,20 +20547,20 @@ ], "doc": "Get a SelfHelpResource", "operation": { - "$id": "1491", + "$id": "1497", "name": "get", "resourceName": "SelfHelpResource", "doc": "Get a SelfHelpResource", "accessibility": "public", "parameters": [ { - "$id": "1492", + "$id": "1498", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1493", + "$id": "1499", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20509,7 +20570,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1494", + "$id": "1500", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20523,13 +20584,13 @@ "readOnly": false }, { - "$id": "1495", + "$id": "1501", "kind": "path", "name": "scope", "serializedName": "scope", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1496", + "$id": "1502", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20547,13 +20608,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.scope" }, { - "$id": "1497", + "$id": "1503", "kind": "path", "name": "selfHelpName", "serializedName": "selfHelpName", "doc": "The name of the SelfHelpResource", "type": { - "$id": "1498", + "$id": "1504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20571,7 +20632,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.SolutionResources.get.selfHelpName" }, { - "$id": "1499", + "$id": "1505", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20593,7 +20654,7 @@ 200 ], "bodyType": { - "$ref": "626" + "$ref": "631" }, "headers": [], "isErrorResponse": false, @@ -20618,13 +20679,13 @@ }, "parameters": [ { - "$id": "1500", + "$id": "1506", "kind": "method", "name": "scope", "serializedName": "scope", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1501", + "$id": "1507", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20640,13 +20701,13 @@ "decorators": [] }, { - "$id": "1502", + "$id": "1508", "kind": "method", "name": "selfHelpName", "serializedName": "selfHelpName", "doc": "The name of the SelfHelpResource", "type": { - "$id": "1503", + "$id": "1509", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20662,7 +20723,7 @@ "decorators": [] }, { - "$id": "1504", + "$id": "1510", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20681,7 +20742,7 @@ ], "response": { "type": { - "$ref": "626" + "$ref": "631" } }, "isOverride": false, @@ -20692,13 +20753,13 @@ ], "parameters": [ { - "$id": "1505", + "$id": "1511", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1506", + "$id": "1512", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -20709,7 +20770,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1507", + "$id": "1513", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20733,17 +20794,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1508", + "$id": "1514", "kind": "client", "name": "PlaywrightQuotas", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1509", + "$id": "1515", "kind": "basic", "name": "get", "accessibility": "public", @@ -20752,20 +20813,20 @@ ], "doc": "Get subscription-level location-based Playwright quota resource by name.", "operation": { - "$id": "1510", + "$id": "1516", "name": "get", "resourceName": "PlaywrightQuota", "doc": "Get subscription-level location-based Playwright quota resource by name.", "accessibility": "public", "parameters": [ { - "$id": "1511", + "$id": "1517", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1512", + "$id": "1518", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20775,7 +20836,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1513", + "$id": "1519", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -20789,18 +20850,18 @@ "readOnly": false }, { - "$id": "1514", + "$id": "1520", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1515", + "$id": "1521", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1516", + "$id": "1522", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20820,18 +20881,18 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.subscriptionId" }, { - "$id": "1517", + "$id": "1523", "kind": "path", "name": "location", "serializedName": "location", "doc": "The name of the Azure region.", "type": { - "$id": "1518", + "$id": "1524", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "1519", + "$id": "1525", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20851,7 +20912,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.location" }, { - "$id": "1520", + "$id": "1526", "kind": "path", "name": "playwrightQuotaName", "serializedName": "playwrightQuotaName", @@ -20871,7 +20932,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get.playwrightQuotaName" }, { - "$id": "1521", + "$id": "1527", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -20893,7 +20954,7 @@ 200 ], "bodyType": { - "$ref": "634" + "$ref": "639" }, "headers": [], "isErrorResponse": false, @@ -20918,18 +20979,18 @@ }, "parameters": [ { - "$id": "1522", + "$id": "1528", "kind": "method", "name": "location", "serializedName": "location", "doc": "The name of the Azure region.", "type": { - "$id": "1523", + "$id": "1529", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "1524", + "$id": "1530", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -20947,7 +21008,7 @@ "decorators": [] }, { - "$id": "1525", + "$id": "1531", "kind": "method", "name": "playwrightQuotaName", "serializedName": "playwrightQuotaName", @@ -20965,7 +21026,7 @@ "decorators": [] }, { - "$id": "1526", + "$id": "1532", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -20984,7 +21045,7 @@ ], "response": { "type": { - "$ref": "634" + "$ref": "639" } }, "isOverride": false, @@ -20993,7 +21054,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.get" }, { - "$id": "1527", + "$id": "1533", "kind": "paging", "name": "listBySubscription", "accessibility": "public", @@ -21002,20 +21063,20 @@ ], "doc": "List Playwright quota resources for a given subscription Id.", "operation": { - "$id": "1528", + "$id": "1534", "name": "listBySubscription", "resourceName": "PlaywrightQuota", "doc": "List Playwright quota resources for a given subscription Id.", "accessibility": "public", "parameters": [ { - "$id": "1529", + "$id": "1535", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1530", + "$id": "1536", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21025,7 +21086,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1531", + "$id": "1537", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -21039,18 +21100,18 @@ "readOnly": false }, { - "$id": "1532", + "$id": "1538", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1533", + "$id": "1539", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1534", + "$id": "1540", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21070,18 +21131,18 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.subscriptionId" }, { - "$id": "1535", + "$id": "1541", "kind": "path", "name": "location", "serializedName": "location", "doc": "The name of the Azure region.", "type": { - "$id": "1536", + "$id": "1542", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "1537", + "$id": "1543", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21101,7 +21162,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.listBySubscription.location" }, { - "$id": "1538", + "$id": "1544", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -21123,7 +21184,7 @@ 200 ], "bodyType": { - "$ref": "644" + "$ref": "650" }, "headers": [], "isErrorResponse": false, @@ -21148,18 +21209,18 @@ }, "parameters": [ { - "$id": "1539", + "$id": "1545", "kind": "method", "name": "location", "serializedName": "location", "doc": "The name of the Azure region.", "type": { - "$id": "1540", + "$id": "1546", "kind": "string", "name": "azureLocation", "crossLanguageDefinitionId": "Azure.Core.azureLocation", "baseType": { - "$id": "1541", + "$id": "1547", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21177,7 +21238,7 @@ "decorators": [] }, { - "$id": "1542", + "$id": "1548", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -21196,7 +21257,7 @@ ], "response": { "type": { - "$ref": "646" + "$ref": "652" }, "resultSegments": [ "value" @@ -21217,84 +21278,31 @@ "responseLocation": "Body" } } - } - ], - "parameters": [ - { - "$id": "1543", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "1544", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "1545", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" - } - ], - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceOperations", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas", - "apiVersions": [ - "2024-05-01" - ], - "parent": { - "$ref": "701" - } - }, - { - "$id": "1546", - "kind": "client", - "name": "JobResources", - "namespace": "Azure.Generator.MgmtTypeSpec.Tests", - "methods": [ + }, { - "$id": "1547", + "$id": "1549", "kind": "basic", - "name": "get", + "name": "createOrUpdate", "accessibility": "public", "apiVersions": [ "2024-05-01" ], - "doc": "Gets information about the specified job.", + "doc": "Create a PlaywrightQuota", "operation": { - "$id": "1548", - "name": "get", - "resourceName": "JobResource", - "doc": "Gets information about the specified job.", + "$id": "1550", + "name": "createOrUpdate", + "resourceName": "PlaywrightQuota", + "doc": "Create a PlaywrightQuota", "accessibility": "public", "parameters": [ { - "$id": "1549", + "$id": "1551", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1550", + "$id": "1552", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21304,7 +21312,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1551", + "$id": "1553", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -21314,22 +21322,22 @@ "optional": false, "scope": "Client", "decorators": [], - "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.apiVersion", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.apiVersion", "readOnly": false }, { - "$id": "1552", + "$id": "1554", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1553", + "$id": "1555", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1554", + "$id": "1556", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21346,19 +21354,26 @@ "scope": "Client", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.subscriptionId" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.subscriptionId" }, { - "$id": "1555", + "$id": "1557", "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", + "name": "location", + "serializedName": "location", + "doc": "The name of the Azure region.", "type": { - "$id": "1556", + "$id": "1558", "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "decorators": [] }, "isApiVersion": false, @@ -21370,20 +21385,16 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.resourceGroupName" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.location" }, { - "$id": "1557", + "$id": "1560", "kind": "path", - "name": "jobName", - "serializedName": "jobName", - "doc": "The name of the JobResource", + "name": "playwrightQuotaName", + "serializedName": "playwrightQuotaName", + "doc": "The name of the PlaywrightQuota", "type": { - "$id": "1558", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$ref": "46" }, "isApiVersion": false, "explode": false, @@ -21394,17 +21405,406 @@ "scope": "Method", "decorators": [], "readOnly": false, - "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.jobName" + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.playwrightQuotaName" }, { - "$id": "1559", - "kind": "query", - "name": "$expand", - "serializedName": "$expand", - "doc": "$expand is supported on details parameter for job, which provides details on the job stages.", - "type": { - "$id": "1560", - "kind": "string", + "$id": "1561", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "192" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.contentType" + }, + { + "$id": "1562", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "194" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.accept" + }, + { + "$id": "1563", + "kind": "body", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "639" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.resource" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "639" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "639" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/MgmtTypeSpec/locations/{location}/playwrightQuotas/{playwrightQuotaName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "arguments": {} + } + ] + }, + "parameters": [ + { + "$id": "1564", + "kind": "method", + "name": "location", + "serializedName": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1565", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.location", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1567", + "kind": "method", + "name": "playwrightQuotaName", + "serializedName": "playwrightQuotaName", + "doc": "The name of the PlaywrightQuota", + "type": { + "$ref": "46" + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.playwrightQuotaName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1568", + "kind": "method", + "name": "resource", + "serializedName": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "639" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1569", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "192" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1570", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "194" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "639" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas.createOrUpdate" + } + ], + "parameters": [ + { + "$id": "1571", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1572", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.endpoint" + } + ], + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "MgmtTypeSpec.PlaywrightQuotas", + "apiVersions": [ + "2024-05-01" + ], + "parent": { + "$ref": "707" + } + }, + { + "$id": "1574", + "kind": "client", + "name": "JobResources", + "namespace": "Azure.Generator.MgmtTypeSpec.Tests", + "methods": [ + { + "$id": "1575", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-05-01" + ], + "doc": "Gets information about the specified job.", + "operation": { + "$id": "1576", + "name": "get", + "resourceName": "JobResource", + "doc": "Gets information about the specified job.", + "accessibility": "public", + "parameters": [ + { + "$id": "1577", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-05-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.apiVersion", + "readOnly": false + }, + { + "$id": "1580", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1581", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.subscriptionId" + }, + { + "$id": "1583", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.resourceGroupName" + }, + { + "$id": "1585", + "kind": "path", + "name": "jobName", + "serializedName": "jobName", + "doc": "The name of the JobResource", + "type": { + "$id": "1586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get.jobName" + }, + { + "$id": "1587", + "kind": "query", + "name": "$expand", + "serializedName": "$expand", + "doc": "$expand is supported on details parameter for job, which provides details on the job stages.", + "type": { + "$id": "1588", + "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] @@ -21418,12 +21818,12 @@ "readOnly": false }, { - "$id": "1561", + "$id": "1589", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "192" + "$ref": "196" }, "isApiVersion": false, "optional": false, @@ -21440,7 +21840,7 @@ 200 ], "bodyType": { - "$ref": "650" + "$ref": "656" }, "headers": [], "isErrorResponse": false, @@ -21465,13 +21865,13 @@ }, "parameters": [ { - "$id": "1562", + "$id": "1590", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1563", + "$id": "1591", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21487,13 +21887,13 @@ "decorators": [] }, { - "$id": "1564", + "$id": "1592", "kind": "method", "name": "jobName", "serializedName": "jobName", "doc": "The name of the JobResource", "type": { - "$id": "1565", + "$id": "1593", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21509,13 +21909,13 @@ "decorators": [] }, { - "$id": "1566", + "$id": "1594", "kind": "method", "name": "$expand", "serializedName": "$expand", "doc": "$expand is supported on details parameter for job, which provides details on the job stages.", "type": { - "$id": "1567", + "$id": "1595", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21531,12 +21931,12 @@ "decorators": [] }, { - "$id": "1568", + "$id": "1596", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "192" + "$ref": "196" }, "location": "Header", "isApiVersion": false, @@ -21550,7 +21950,7 @@ ], "response": { "type": { - "$ref": "650" + "$ref": "656" } }, "isOverride": false, @@ -21559,7 +21959,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.get" }, { - "$id": "1569", + "$id": "1597", "kind": "lro", "name": "update", "accessibility": "public", @@ -21568,20 +21968,20 @@ ], "doc": "Update a JobResource", "operation": { - "$id": "1570", + "$id": "1598", "name": "update", "resourceName": "JobResource", "doc": "Update a JobResource", "accessibility": "public", "parameters": [ { - "$id": "1571", + "$id": "1599", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1572", + "$id": "1600", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21591,7 +21991,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1573", + "$id": "1601", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -21605,18 +22005,18 @@ "readOnly": false }, { - "$id": "1574", + "$id": "1602", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1575", + "$id": "1603", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1576", + "$id": "1604", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21636,13 +22036,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.subscriptionId" }, { - "$id": "1577", + "$id": "1605", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1578", + "$id": "1606", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21660,13 +22060,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.resourceGroupName" }, { - "$id": "1579", + "$id": "1607", "kind": "path", "name": "jobName", "serializedName": "jobName", "doc": "The name of the JobResource", "type": { - "$id": "1580", + "$id": "1608", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21684,13 +22084,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.jobName" }, { - "$id": "1581", + "$id": "1609", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "194" + "$ref": "198" }, "isApiVersion": false, "optional": false, @@ -21701,12 +22101,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.contentType" }, { - "$id": "1582", + "$id": "1610", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "196" + "$ref": "200" }, "isApiVersion": false, "optional": false, @@ -21717,13 +22117,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.JobResources.update.accept" }, { - "$id": "1583", + "$id": "1611", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "659" + "$ref": "665" }, "isApiVersion": false, "contentTypes": [ @@ -21743,7 +22143,7 @@ 200 ], "bodyType": { - "$ref": "650" + "$ref": "656" }, "headers": [], "isErrorResponse": false, @@ -21761,7 +22161,7 @@ "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "1584", + "$id": "1612", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21773,7 +22173,7 @@ "nameInResponse": "Retry-After", "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": { - "$id": "1585", + "$id": "1613", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -21803,13 +22203,13 @@ }, "parameters": [ { - "$id": "1586", + "$id": "1614", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1587", + "$id": "1615", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21825,13 +22225,13 @@ "decorators": [] }, { - "$id": "1588", + "$id": "1616", "kind": "method", "name": "jobName", "serializedName": "jobName", "doc": "The name of the JobResource", "type": { - "$id": "1589", + "$id": "1617", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -21847,13 +22247,13 @@ "decorators": [] }, { - "$id": "1590", + "$id": "1618", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "659" + "$ref": "665" }, "location": "Body", "isApiVersion": false, @@ -21865,13 +22265,13 @@ "decorators": [] }, { - "$id": "1591", + "$id": "1619", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "198" + "$ref": "202" }, "location": "Header", "isApiVersion": false, @@ -21883,12 +22283,12 @@ "decorators": [] }, { - "$id": "1592", + "$id": "1620", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "200" + "$ref": "204" }, "location": "Header", "isApiVersion": false, @@ -21902,7 +22302,7 @@ ], "response": { "type": { - "$ref": "650" + "$ref": "656" } }, "isOverride": false, @@ -21916,7 +22316,7 @@ 200 ], "bodyType": { - "$ref": "650" + "$ref": "656" } } } @@ -21924,13 +22324,13 @@ ], "parameters": [ { - "$id": "1593", + "$id": "1621", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1594", + "$id": "1622", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -21941,7 +22341,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1595", + "$id": "1623", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -21965,17 +22365,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1596", + "$id": "1624", "kind": "client", "name": "HciVmInstances", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1597", + "$id": "1625", "kind": "basic", "name": "get", "accessibility": "public", @@ -21984,20 +22384,20 @@ ], "doc": "Gets a virtual machine instance", "operation": { - "$id": "1598", + "$id": "1626", "name": "get", "resourceName": "HciVmInstance", "doc": "Gets a virtual machine instance", "accessibility": "public", "parameters": [ { - "$id": "1599", + "$id": "1627", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1600", + "$id": "1628", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22007,7 +22407,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1601", + "$id": "1629", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22021,13 +22421,13 @@ "readOnly": false }, { - "$id": "1602", + "$id": "1630", "kind": "path", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1603", + "$id": "1631", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22045,12 +22445,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.HciVmInstances.get.resourceUri" }, { - "$id": "1604", + "$id": "1632", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "202" + "$ref": "206" }, "isApiVersion": false, "optional": false, @@ -22067,7 +22467,7 @@ 200 ], "bodyType": { - "$ref": "662" + "$ref": "668" }, "headers": [], "isErrorResponse": false, @@ -22092,13 +22492,13 @@ }, "parameters": [ { - "$id": "1605", + "$id": "1633", "kind": "method", "name": "resourceUri", "serializedName": "resourceUri", "doc": "The fully qualified Azure Resource manager identifier of the resource.", "type": { - "$id": "1606", + "$id": "1634", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22114,12 +22514,12 @@ "decorators": [] }, { - "$id": "1607", + "$id": "1635", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "202" + "$ref": "206" }, "location": "Header", "isApiVersion": false, @@ -22133,7 +22533,7 @@ ], "response": { "type": { - "$ref": "662" + "$ref": "668" } }, "isOverride": false, @@ -22144,13 +22544,13 @@ ], "parameters": [ { - "$id": "1608", + "$id": "1636", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1609", + "$id": "1637", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -22161,7 +22561,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1610", + "$id": "1638", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22185,17 +22585,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1611", + "$id": "1639", "kind": "client", "name": "GroupQuotaSubscriptionRequestStatuses", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1612", + "$id": "1640", "kind": "basic", "name": "get", "accessibility": "public", @@ -22204,20 +22604,20 @@ ], "doc": "Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status.", "operation": { - "$id": "1613", + "$id": "1641", "name": "get", "resourceName": "GroupQuotaSubscriptionRequestStatus", "doc": "Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status.", "accessibility": "public", "parameters": [ { - "$id": "1614", + "$id": "1642", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1615", + "$id": "1643", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22227,7 +22627,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1616", + "$id": "1644", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22241,13 +22641,13 @@ "readOnly": false }, { - "$id": "1617", + "$id": "1645", "kind": "path", "name": "managementGroupId", "serializedName": "managementGroupId", "doc": "The management group ID.", "type": { - "$id": "1618", + "$id": "1646", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22265,13 +22665,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.GroupQuotaSubscriptionRequestStatuses.get.managementGroupId" }, { - "$id": "1619", + "$id": "1647", "kind": "path", "name": "requestId", "serializedName": "requestId", "doc": "The name of the GroupQuotaSubscriptionRequestStatus", "type": { - "$id": "1620", + "$id": "1648", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22289,12 +22689,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.GroupQuotaSubscriptionRequestStatuses.get.requestId" }, { - "$id": "1621", + "$id": "1649", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "204" + "$ref": "208" }, "isApiVersion": false, "optional": false, @@ -22311,7 +22711,7 @@ 200 ], "bodyType": { - "$ref": "670" + "$ref": "676" }, "headers": [], "isErrorResponse": false, @@ -22336,13 +22736,13 @@ }, "parameters": [ { - "$id": "1622", + "$id": "1650", "kind": "method", "name": "managementGroupId", "serializedName": "managementGroupId", "doc": "The management group ID.", "type": { - "$id": "1623", + "$id": "1651", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22358,13 +22758,13 @@ "decorators": [] }, { - "$id": "1624", + "$id": "1652", "kind": "method", "name": "requestId", "serializedName": "requestId", "doc": "The name of the GroupQuotaSubscriptionRequestStatus", "type": { - "$id": "1625", + "$id": "1653", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22380,12 +22780,12 @@ "decorators": [] }, { - "$id": "1626", + "$id": "1654", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "204" + "$ref": "208" }, "location": "Header", "isApiVersion": false, @@ -22399,7 +22799,7 @@ ], "response": { "type": { - "$ref": "670" + "$ref": "676" } }, "isOverride": false, @@ -22410,13 +22810,13 @@ ], "parameters": [ { - "$id": "1627", + "$id": "1655", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1628", + "$id": "1656", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -22427,7 +22827,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1629", + "$id": "1657", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22451,17 +22851,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1630", + "$id": "1658", "kind": "client", "name": "Bar", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1631", + "$id": "1659", "kind": "basic", "name": "get", "accessibility": "public", @@ -22470,20 +22870,20 @@ ], "doc": "Get a Bar", "operation": { - "$id": "1632", + "$id": "1660", "name": "get", "resourceName": "Bar", "doc": "Get a Bar", "accessibility": "public", "parameters": [ { - "$id": "1633", + "$id": "1661", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1634", + "$id": "1662", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22493,7 +22893,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1635", + "$id": "1663", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22507,18 +22907,18 @@ "readOnly": false }, { - "$id": "1636", + "$id": "1664", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1637", + "$id": "1665", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1638", + "$id": "1666", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22538,13 +22938,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.subscriptionId" }, { - "$id": "1639", + "$id": "1667", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1640", + "$id": "1668", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22562,13 +22962,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.resourceGroupName" }, { - "$id": "1641", + "$id": "1669", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1642", + "$id": "1670", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22586,13 +22986,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.fooName" }, { - "$id": "1643", + "$id": "1671", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1644", + "$id": "1672", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22610,12 +23010,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get.barName" }, { - "$id": "1645", + "$id": "1673", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "206" + "$ref": "210" }, "isApiVersion": false, "optional": false, @@ -22632,7 +23032,7 @@ 200 ], "bodyType": { - "$ref": "476" + "$ref": "481" }, "headers": [], "isErrorResponse": false, @@ -22657,13 +23057,13 @@ }, "parameters": [ { - "$id": "1646", + "$id": "1674", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1647", + "$id": "1675", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22679,13 +23079,13 @@ "decorators": [] }, { - "$id": "1648", + "$id": "1676", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1649", + "$id": "1677", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22701,13 +23101,13 @@ "decorators": [] }, { - "$id": "1650", + "$id": "1678", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1651", + "$id": "1679", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22723,12 +23123,12 @@ "decorators": [] }, { - "$id": "1652", + "$id": "1680", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "206" + "$ref": "210" }, "location": "Header", "isApiVersion": false, @@ -22742,7 +23142,7 @@ ], "response": { "type": { - "$ref": "476" + "$ref": "481" } }, "isOverride": false, @@ -22751,7 +23151,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.get" }, { - "$id": "1653", + "$id": "1681", "kind": "basic", "name": "update", "accessibility": "public", @@ -22760,20 +23160,20 @@ ], "doc": "Update a Bar", "operation": { - "$id": "1654", + "$id": "1682", "name": "update", "resourceName": "Bar", "doc": "Update a Bar", "accessibility": "public", "parameters": [ { - "$id": "1655", + "$id": "1683", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1656", + "$id": "1684", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22783,7 +23183,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1657", + "$id": "1685", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -22797,18 +23197,18 @@ "readOnly": false }, { - "$id": "1658", + "$id": "1686", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1659", + "$id": "1687", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1660", + "$id": "1688", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22828,13 +23228,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.subscriptionId" }, { - "$id": "1661", + "$id": "1689", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1662", + "$id": "1690", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22852,13 +23252,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.resourceGroupName" }, { - "$id": "1663", + "$id": "1691", "kind": "path", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1664", + "$id": "1692", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22876,13 +23276,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.fooName" }, { - "$id": "1665", + "$id": "1693", "kind": "path", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1666", + "$id": "1694", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -22900,13 +23300,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.barName" }, { - "$id": "1667", + "$id": "1695", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "208" + "$ref": "212" }, "isApiVersion": false, "optional": false, @@ -22917,12 +23317,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.contentType" }, { - "$id": "1668", + "$id": "1696", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "210" + "$ref": "214" }, "isApiVersion": false, "optional": false, @@ -22933,13 +23333,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Bars.update.accept" }, { - "$id": "1669", + "$id": "1697", "kind": "body", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "476" + "$ref": "481" }, "isApiVersion": false, "contentTypes": [ @@ -22959,7 +23359,7 @@ 200 ], "bodyType": { - "$ref": "476" + "$ref": "481" }, "headers": [], "isErrorResponse": false, @@ -22987,13 +23387,13 @@ }, "parameters": [ { - "$id": "1670", + "$id": "1698", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1671", + "$id": "1699", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23009,13 +23409,13 @@ "decorators": [] }, { - "$id": "1672", + "$id": "1700", "kind": "method", "name": "fooName", "serializedName": "fooName", "doc": "The name of the Foo", "type": { - "$id": "1673", + "$id": "1701", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23031,13 +23431,13 @@ "decorators": [] }, { - "$id": "1674", + "$id": "1702", "kind": "method", "name": "barName", "serializedName": "barName", "doc": "The name of the Bar", "type": { - "$id": "1675", + "$id": "1703", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23053,13 +23453,13 @@ "decorators": [] }, { - "$id": "1676", + "$id": "1704", "kind": "method", "name": "properties", "serializedName": "properties", "doc": "The resource properties to be updated.", "type": { - "$ref": "476" + "$ref": "481" }, "location": "Body", "isApiVersion": false, @@ -23071,13 +23471,13 @@ "decorators": [] }, { - "$id": "1677", + "$id": "1705", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "208" + "$ref": "212" }, "location": "Header", "isApiVersion": false, @@ -23089,12 +23489,12 @@ "decorators": [] }, { - "$id": "1678", + "$id": "1706", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "210" + "$ref": "214" }, "location": "Header", "isApiVersion": false, @@ -23108,7 +23508,7 @@ ], "response": { "type": { - "$ref": "476" + "$ref": "481" } }, "isOverride": false, @@ -23119,13 +23519,13 @@ ], "parameters": [ { - "$id": "1679", + "$id": "1707", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1680", + "$id": "1708", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23136,7 +23536,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1681", + "$id": "1709", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -23155,17 +23555,17 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } }, { - "$id": "1682", + "$id": "1710", "kind": "client", "name": "ZooRecommendation", "namespace": "Azure.Generator.MgmtTypeSpec.Tests", "methods": [ { - "$id": "1683", + "$id": "1711", "kind": "basic", "name": "recommend", "accessibility": "public", @@ -23174,20 +23574,20 @@ ], "doc": "A synchronous resource action.", "operation": { - "$id": "1684", + "$id": "1712", "name": "recommend", "resourceName": "Zoos", "doc": "A synchronous resource action.", "accessibility": "public", "parameters": [ { - "$id": "1685", + "$id": "1713", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "1686", + "$id": "1714", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23197,7 +23597,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "1687", + "$id": "1715", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -23211,18 +23611,18 @@ "readOnly": false }, { - "$id": "1688", + "$id": "1716", "kind": "path", "name": "subscriptionId", "serializedName": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "1689", + "$id": "1717", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "1690", + "$id": "1718", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23242,13 +23642,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.subscriptionId" }, { - "$id": "1691", + "$id": "1719", "kind": "path", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1692", + "$id": "1720", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23266,13 +23666,13 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.resourceGroupName" }, { - "$id": "1693", + "$id": "1721", "kind": "path", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1694", + "$id": "1722", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23290,12 +23690,12 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Zoos.recommend.zooName" }, { - "$id": "1695", + "$id": "1723", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "212" + "$ref": "216" }, "isApiVersion": false, "optional": false, @@ -23312,7 +23712,7 @@ 200 ], "bodyType": { - "$ref": "696" + "$ref": "702" }, "headers": [], "isErrorResponse": false, @@ -23337,13 +23737,13 @@ }, "parameters": [ { - "$id": "1696", + "$id": "1724", "kind": "method", "name": "resourceGroupName", "serializedName": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "1697", + "$id": "1725", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23359,13 +23759,13 @@ "decorators": [] }, { - "$id": "1698", + "$id": "1726", "kind": "method", "name": "zooName", "serializedName": "zooName", "doc": "The name of the Zoo", "type": { - "$id": "1699", + "$id": "1727", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -23381,12 +23781,12 @@ "decorators": [] }, { - "$id": "1700", + "$id": "1728", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "212" + "$ref": "216" }, "location": "Header", "isApiVersion": false, @@ -23400,7 +23800,7 @@ ], "response": { "type": { - "$ref": "696" + "$ref": "702" } }, "isOverride": false, @@ -23411,13 +23811,13 @@ ], "parameters": [ { - "$id": "1701", + "$id": "1729", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "1702", + "$id": "1730", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -23428,7 +23828,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "1703", + "$id": "1731", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -23447,7 +23847,7 @@ "2024-05-01" ], "parent": { - "$ref": "701" + "$ref": "707" } } ] diff --git a/eng/packages/http-client-csharp/CONTRIBUTING.md b/eng/packages/http-client-csharp/CONTRIBUTING.md new file mode 100644 index 000000000000..6b8b4d41bf50 --- /dev/null +++ b/eng/packages/http-client-csharp/CONTRIBUTING.md @@ -0,0 +1,216 @@ +# Contributing to @azure-typespec/http-client-csharp + +Welcome! This guide will help you set up your development environment and contribute to the Azure TypeSpec HTTP Client C# package. + +## Table of Contents + +- [Prerequisites](#prerequisites) +- [Getting Started](#getting-started) +- [Development Workflow](#development-workflow) +- [Testing](#testing) +- [Code Generation](#code-generation) +- [Creating Pull Requests](#creating-pull-requests) +- [Getting Help](#getting-help) +- [Code of Conduct](#code-of-conduct) + +## Prerequisites + +Before you begin, ensure you have the following installed: + +- [Node.js](https://nodejs.org/) (version 20 or higher) +- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) (required - see global.json for exact version) +- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Git](https://git-scm.com/) +- [PowerShell](https://docs.microsoft.com/powershell/scripting/install/installing-powershell) (version 7.0 or higher, for advanced testing and code generation scenarios) +- [Long Path Support](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#registry-setting-to-enable-long-paths) (Windows only required to avoid path length limitations during development) + +## Getting Started + +### 1. Clone the Repository + +```bash +git clone https://github.com/Azure/azure-sdk-for-net.git +cd azure-sdk-for-net/eng/packages/http-client-csharp +``` + +### 2. Install Dependencies + +From the repository root: + +```bash +npm ci +``` + +### 3. Build the C# Package + +```bash +npm run build +``` + +This command runs: + +- `npm run build:emitter` - Builds the TypeScript emitter +- `npm run build:generator` - Builds the .NET generator + +### 4. Verify Installation + +After building, you can verify everything is working correctly by running: + +```bash +npm run test +``` + +## Development Workflow + +### Package Structure + +The C# HTTP client package consists of two main components: + +- **Emitter** (`/emitter`): TypeScript code that processes TypeSpec definitions and produces input for the generator +- **Generator** (`/generator`): .NET code that generates C# client libraries from the emitter output + +### Making Changes + +1. **Create a fork** of the repository and clone it: + + ```bash + git clone https://github.com/YOUR_USERNAME/azure-sdk-for-net.git + cd azure-sdk-for-net + git checkout -b feature/your-feature-name + ``` + +2. **Make your changes** to the codebase + +3. **Build your changes**: + + ```bash + # Build emitter only + npm run build:emitter + + # Build generator only + npm run build:generator + + # Build everything + npm run build + ``` + +4. **Test your changes**: + + ```bash + # Test emitter only + npm run test:emitter + + # Test generator only + npm run test:generator + + # Test everything + npm run test + ``` + +### Code Style and Linting + +- **Format code**: `npm run prettier:fix` +- **Run linting**: `npm run lint` +- **Fix lint issues**: `npm run lint:fix` + +## Testing + +### Unit Tests + +The package includes both TypeScript (emitter) and C# (generator) tests: + +```bash +# Run all tests +npm run test + +# Run emitter tests only (TypeScript/Vitest) +npm run test:emitter + +# Run generator tests only (.NET) +npm run test:generator +``` + +> **Note**: Some tests may require a full workspace build to resolve all dependencies before running successfully. + +### Integration Testing with Spector + +The package uses the Spector test framework for end-to-end testing of generated code: + +```bash +# Run Spector tests (requires PowerShell) +./eng/scripts/Test-Spector.ps1 + +# Run Spector tests with filter (filters by directory path) +./eng/scripts/Test-Spector.ps1 "http/type/array" + +# Get Spector test coverage (outputs to ./generator/artifacts/coverage, not checked in) +./eng/scripts/Get-Spector-Coverage.ps1 +``` + +### Test Project Generation + +Generate test projects to validate the emitter and generator: + +```bash +# Generate all test projects (requires PowerShell) +./eng/scripts/Generate.ps1 + +# Generate specific test project +./eng/scripts/Generate.ps1 -filter "project-name" + +# Generate with stubbed mode disabled +./eng/scripts/Generate.ps1 -Stubbed $false +``` + +## Code Generation + +### Regenerating Test Projects + +To regenerate test projects after making changes: + +**Generate projects**: + +```bash +./eng/scripts/Generate.ps1 +``` + +### Regenerating Azure Libraries + +To regenerate Azure libraries using your local changes, run: + +```bash +./eng/scripts/RegenPreview.ps1 +``` + +This will regenerate all the Azure libraries and allow you to view any potential diffs your changes may cause. For more information on the script's usage, see [RegenPreview](./eng/scripts/docs/RegenPreview.md). + +## Creating Pull Requests + +### 1. Prepare Your PR + +Before creating a pull request: + +- [ ] Ensure all tests pass: `npm run test` +- [ ] Ensure code is properly formatted: `npm run prettier:fix` +- [ ] Ensure code is properly linted: `npm run lint:fix` +- [ ] Generate and test projects: `./eng/scripts/Generate.ps1` (if applicable) +- [ ] Update documentation if needed + +### 2. Create the PR + +1. Push your branch to your fork or the main repository +2. Create a pull request to the [Azure/azure-sdk-for-net](https://github.com/Azure/azure-sdk-for-net) repository +3. Provide a clear description of your changes +4. Link any related issues + +## Getting Help + +- **Issues**: Report bugs or request features in the [Azure SDK for .NET repository issues](https://github.com/Azure/azure-sdk-for-net/issues) +- **Documentation**: Check the [TypeSpec documentation](https://typespec.io/) for more information +- **C# Customization**: See the [Customization Guide](https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/.tspd/docs/customization.md) + +## Code of Conduct + +This project follows the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). Please be respectful and inclusive in all interactions. + +Thank you for contributing! 🎉 diff --git a/eng/packages/http-client-csharp/eng/scripts/RegenPreview.ps1 b/eng/packages/http-client-csharp/eng/scripts/RegenPreview.ps1 new file mode 100644 index 000000000000..e2b4614a4d4e --- /dev/null +++ b/eng/packages/http-client-csharp/eng/scripts/RegenPreview.ps1 @@ -0,0 +1,849 @@ +#Requires -Version 7.0 + +<# +.SYNOPSIS + Builds local generator packages and regenerates Azure SDK for .NET libraries for validation. + +.DESCRIPTION + This script supports generating Azure SDK libraries following this high level process: + + 1. Builds a local npm package of @azure-typespec/http-client-csharp with a versioned name (1.0.0-alpha.YYYYMMDD.hash) + 2. Builds and packages the NuGet generator framework packages with the same versioning + 3. Updates Packages.Data.props in azure-sdk-for-net with the local NuGet version + 4. Updates the management plane generator (@azure-typespec/http-client-csharp-mgmt) to use local generators + 5. Updates the eng folder package.json artifacts in azure-sdk-for-net + 6. Regenerates libraries based on specified filters (all, by generator type, or interactively selected) + 7. Restores all modified artifacts to original state on success + + + Generator Filtering: + - Use -Azure to regenerate only Azure-branded libraries (@azure-typespec/http-client-csharp) + - Use -Unbranded to regenerate only unbranded libraries (@typespec/http-client-csharp) + - Use -Mgmt to regenerate only management plane libraries (@azure-typespec/http-client-csharp-mgmt) + - Omit all filter parameters to regenerate all libraries (default) + - Use -Select for interactive selection (can be combined with generator filters) + +.PARAMETER Select + Optional. When specified, displays an interactive menu to select specific libraries to regenerate. + If omitted, regenerates all libraries without prompting. + +.PARAMETER Azure + Optional. When specified, only regenerates libraries using the Azure generator (@azure-typespec/http-client-csharp). + Mutually exclusive with Unbranded and Mgmt parameters. + +.PARAMETER Unbranded + Optional. When specified, only regenerates libraries using the unbranded generator (@typespec/http-client-csharp). + Mutually exclusive with Azure and Mgmt parameters. + +.PARAMETER Mgmt + Optional. When specified, only regenerates libraries using the management plane generator (@azure-typespec/http-client-csharp-mgmt). + Mutually exclusive with Azure and Unbranded parameters. + If no generator filter is specified, all libraries are regenerated. + +.EXAMPLE + # Regenerate all libraries + .\RegenPreview.ps1 + +.EXAMPLE + # Interactively select libraries to regenerate (from all available) + .\RegenPreview.ps1 -Select + +.EXAMPLE + # Regenerate only Azure-branded libraries (non-interactive) + .\RegenPreview.ps1 -Azure + +.EXAMPLE + # Interactively select from Azure-branded libraries only + .\RegenPreview.ps1 -Azure -Select + +.EXAMPLE + # Regenerate only unbranded libraries + .\RegenPreview.ps1 -Unbranded + +.EXAMPLE + # Regenerate only management plane libraries + .\RegenPreview.ps1 -Mgmt +#> + +param( + [Parameter(Mandatory=$false)] + [switch]$Select, + + [Parameter(Mandatory=$false)] + [switch]$Azure, + + [Parameter(Mandatory=$false)] + [switch]$Unbranded, + + [Parameter(Mandatory=$false)] + [switch]$Mgmt +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 3.0 + +# Validate filter parameters +$generatorFilters = @($Azure, $Unbranded, $Mgmt) +$activeFilters = @($generatorFilters | Where-Object { $_ }).Count + +if ($activeFilters -gt 1) { + Write-Error "Parameters -Azure, -Unbranded, and -Mgmt are mutually exclusive. Please specify only one." + exit 1 +} + +# Import utility functions +Import-Module "$PSScriptRoot\Generation.psm1" -DisableNameChecking -Force +Import-Module "$PSScriptRoot\RegenPreview.psm1" -DisableNameChecking -Force + +# Resolve paths +$packageRoot = Resolve-Path (Join-Path $PSScriptRoot '..' '..') +$sdkRepoPath = Resolve-Path (Join-Path $PSScriptRoot '..' '..' '..' '..' '..') -ErrorAction Stop + +Write-Host "==================== LOCAL VALIDATION SCRIPT ====================" -ForegroundColor Cyan + +Write-Host "Repository: Azure SDK for .NET" -ForegroundColor Gray + +# Display active mode +$modeText = if ($Select) { + "Interactive library selection" +} elseif ($Azure) { + "Regenerate Azure SDK libraries only" +} elseif ($Unbranded) { + "Regenerate Unbranded libraries only" +} elseif ($Mgmt) { + "Regenerate Management plane libraries only" +} else { + "Regenerate ALL libraries" +} +Write-Host "Mode: $modeText" -ForegroundColor Yellow +Write-Host "" + +# Generate version string with timestamp and hash +# Used for both npm and NuGet packages to ensure consistency +function Get-LocalPackageVersion { + $timestamp = Get-Date -Format "yyyyMMdd" + $hash = (git -C $packageRoot rev-parse --short HEAD 2>$null) ?? "local" + return "1.0.0-alpha.$timestamp.$hash" +} + +# Run npm pack and return the package file path +function Invoke-NpmPack { + param( + [string]$WorkingDirectory, + [string]$DebugFolder + ) + + Write-Host "Running: npm pack" -ForegroundColor Gray + Push-Location $WorkingDirectory + try { + $output = & npm pack 2>&1 + if ($LASTEXITCODE -ne 0) { + throw "npm pack failed with exit code $LASTEXITCODE" + } + + # Get the first line that ends with .tgz (the actual package filename) + # It may be in format "filename: package-name.tgz" or just "package-name.tgz" + $packageLine = ($output | Where-Object { $_ -match '\.tgz$' } | Select-Object -First 1).ToString().Trim() + if ($packageLine -match 'filename:\s*(.+\.tgz)') { + $packageFile = $Matches[1].Trim() + } else { + $packageFile = $packageLine + } + + $packagePath = Join-Path $WorkingDirectory $packageFile + if (-not (Test-Path $packagePath)) { + throw "Package file not created: $packagePath" + } + + # Move package to debug folder + $debugPackagePath = Join-Path $DebugFolder $packageFile + Move-Item $packagePath $debugPackagePath -Force + + return $debugPackagePath + } + finally { + Pop-Location + } +} + +# Update package.json with new version +function Update-PackageJsonVersion { + param( + [string]$PackageJsonPath, + [string]$NewVersion + ) + + Write-Host "Updating package version to $NewVersion in $PackageJsonPath" -ForegroundColor Gray + $packageJson = Get-Content $PackageJsonPath -Raw | ConvertFrom-Json -AsHashtable + $packageJson.version = $NewVersion + $packageJson | ConvertTo-Json -Depth 100 | Set-Content $PackageJsonPath -Encoding utf8 -NoNewline +} + +# Parse Library_Inventory.md to get libraries +function Get-LibrariesToRegenerate { + param([string]$InventoryPath) + + $libraries = @() + $content = Get-Content $InventoryPath -Raw + + # Helper function to parse library section + $parseSection = { + param($SectionContent, $GeneratorName) + + $lines = $SectionContent -split "`n" | Where-Object { + $_ -match '^\|.*\|.*\|.*\|' -and + $_ -notmatch '^\|\s*Service\s*\|' -and + $_ -notmatch '^\|\s*-+\s*\|' -and + $_.Trim() -ne '' + } + + $result = @() + foreach ($line in $lines) { + $parts = $line -split '\|' | ForEach-Object { $_.Trim() } | Where-Object { $_ -and $_ -notmatch '^-+$' } + if ($parts.Count -eq 3 -and $parts[0] -ne 'Service' -and $parts[0] -notmatch '^-+$') { + $result += @{ + Service = $parts[0] + Library = $parts[1] + Path = $parts[2] + Generator = $GeneratorName + } + } + } + return $result + } + + # Parse @azure-typespec/http-client-csharp libraries + if ($content -match '## Data Plane Libraries using TypeSpec \(@azure-typespec/http-client-csharp\)[\s\S]*?Total: (\d+)([\s\S]*?)(?=##|\z)') { + $libraries += & $parseSection $Matches[2] "@azure-typespec/http-client-csharp" + } + + # Parse @typespec/http-client-csharp libraries + if ($content -match '## Data Plane Libraries using TypeSpec \(@typespec/http-client-csharp\)[\s\S]*?Total: (\d+)([\s\S]*?)(?=##|\z)') { + $libraries += & $parseSection $Matches[2] "@typespec/http-client-csharp" + } + + # Parse @azure-typespec/http-client-csharp-mgmt libraries (management plane) + if ($content -match '## Management Plane Libraries using TypeSpec \(@azure-typespec/http-client-csharp-mgmt\)[\s\S]*?Total: (\d+)([\s\S]*?)(?=##|\z)') { + $libraries += & $parseSection $Matches[2] "@azure-typespec/http-client-csharp-mgmt" + } + + return @($libraries) +} + +# Interactive library selection +function Select-LibrariesToRegenerate { + param([array]$Libraries) + + # Ensure we have an array + if (-not $Libraries) { + return @() + } + + $Libraries = @($Libraries) + + Write-Host "`n==================== LIBRARY SELECTION ====================" -ForegroundColor Cyan + Write-Host "Found $($Libraries.Count) libraries available for regeneration" -ForegroundColor White + Write-Host "" + + # Display libraries grouped by generator + $azureLibs = @($Libraries | Where-Object { $_.Generator -eq "@azure-typespec/http-client-csharp" }) + $unbrandedLibs = @($Libraries | Where-Object { $_.Generator -eq "@typespec/http-client-csharp" }) + $mgmtLibs = @($Libraries | Where-Object { $_.Generator -eq "@azure-typespec/http-client-csharp-mgmt" }) + + $currentIndex = 1 + + if ($azureLibs.Count -gt 0) { + Write-Host "Azure SDK Libraries:" -ForegroundColor Yellow + for ($i = 0; $i -lt $azureLibs.Count; $i++) { + $lib = $azureLibs[$i] + Write-Host (" [{0,2}] {1,-50} ({2})" -f $currentIndex, $lib.Library, $lib.Service) -ForegroundColor Gray + $currentIndex++ + } + Write-Host "" + } + + if ($unbrandedLibs.Count -gt 0) { + Write-Host "Unbranded Libraries:" -ForegroundColor Yellow + for ($i = 0; $i -lt $unbrandedLibs.Count; $i++) { + $lib = $unbrandedLibs[$i] + Write-Host (" [{0,2}] {1,-50} ({2})" -f $currentIndex, $lib.Library, $lib.Service) -ForegroundColor Gray + $currentIndex++ + } + Write-Host "" + } + + if ($mgmtLibs.Count -gt 0) { + Write-Host "Management Plane Libraries:" -ForegroundColor Yellow + for ($i = 0; $i -lt $mgmtLibs.Count; $i++) { + $lib = $mgmtLibs[$i] + Write-Host (" [{0,2}] {1,-50} ({2})" -f $currentIndex, $lib.Library, $lib.Service) -ForegroundColor Gray + $currentIndex++ + } + Write-Host "" + } + + Write-Host "=============================================================" -ForegroundColor Cyan + Write-Host "" + Write-Host "Enter library numbers to regenerate (comma-separated), 'all' for all libraries, or 'q' to quit:" -ForegroundColor White + Write-Host "Example: 1,3,5 or 1-4,7 or all" -ForegroundColor DarkGray + Write-Host "" + + $selection = Read-Host "Selection" + + if ($selection -ieq 'q' -or $selection -ieq 'quit') { + Write-Host "Operation cancelled by user." -ForegroundColor Yellow + exit 0 + } + + if ($selection -ieq 'all') { + return $Libraries + } + + # Parse selection + $selectedIndices = @() + $parts = $selection -split ',' | ForEach-Object { $_.Trim() } + + foreach ($part in $parts) { + if ($part -match '^(\d+)-(\d+)$') { + # Range: 1-4 + $start = [int]$Matches[1] + $end = [int]$Matches[2] + $selectedIndices += ($start..$end) + } + elseif ($part -match '^\d+$') { + # Single number: 3 + $selectedIndices += [int]$part + } + else { + Write-Host "Invalid selection format: $part" -ForegroundColor Red + exit 1 + } + } + + # Validate and collect selected libraries + $selectedLibraries = @() + foreach ($index in $selectedIndices | Sort-Object -Unique) { + if ($index -lt 1 -or $index -gt $Libraries.Count) { + Write-Host "Invalid library number: $index (valid range: 1-$($Libraries.Count))" -ForegroundColor Red + exit 1 + } + $selectedLibraries += $Libraries[$index - 1] + } + + if ($selectedLibraries.Count -eq 0) { + Write-Host "No libraries selected. Exiting." -ForegroundColor Yellow + exit 0 + } + + Write-Host "`nSelected $($selectedLibraries.Count) libraries for regeneration:" -ForegroundColor Green + foreach ($lib in $selectedLibraries) { + Write-Host " - $($lib.Library) ($($lib.Service))" -ForegroundColor Gray + } + Write-Host "" + + # Ensure we return an array, even for a single element + return @($selectedLibraries) +} + +# Generate final report +function Write-RegenerationReport { + param( + [array]$Results, + [TimeSpan]$ElapsedTime, + [string]$DebugFolder + ) + + $passed = @($Results | Where-Object { $_.Success -eq $true }) + $failed = @($Results | Where-Object { $_.Success -eq $false }) + + Write-Host "`n==================== REGENERATION REPORT ====================" -ForegroundColor Cyan + Write-Host "Total Libraries: $($Results.Count)" -ForegroundColor White + Write-Host "Passed: $($passed.Count)" -ForegroundColor Green + Write-Host "Failed: $($failed.Count)" -ForegroundColor Red + + if ($ElapsedTime) { + $elapsedFormatted = "{0:hh\:mm\:ss}" -f $ElapsedTime + Write-Host "Execution Time: $elapsedFormatted" -ForegroundColor Cyan + } + Write-Host "" + + if ($passed.Count -gt 0) { + Write-Host "PASSED LIBRARIES:" -ForegroundColor Green + foreach ($result in $passed) { + Write-Host " ✓ $($result.Library) ($($result.Service))" -ForegroundColor Green + } + Write-Host "" + } + + if ($failed.Count -gt 0) { + Write-Host "FAILED LIBRARIES:" -ForegroundColor Red + foreach ($result in $failed) { + Write-Host " ✗ $($result.Library) ($($result.Service))" -ForegroundColor Red + Write-Host " Error: $($result.Error)" -ForegroundColor Gray + if ($result.Output) { + Write-Host " Details: $($result.Output.Substring(0, [Math]::Min(200, $result.Output.Length)))..." -ForegroundColor DarkGray + } + } + Write-Host "" + } + + Write-Host "=============================================================" -ForegroundColor Cyan + + # Save detailed report to debug folder + $reportPath = if ($DebugFolder) { + Join-Path $DebugFolder "regen-report.json" + } else { + Join-Path $packageRoot "regen-report.json" + } + $Results | ConvertTo-Json -Depth 10 | Set-Content $reportPath -Encoding utf8 + Write-Host "Detailed report saved to: $reportPath" -ForegroundColor Gray +} + +# ============================================================================ +# Main Script Execution +# ============================================================================ + +# Start timer +$scriptStartTime = Get-Date + +try { + # Step 1: Load and select libraries + if ($Select) { + Write-Host "`n[1/6] Loading libraries from Library_Inventory.md..." -ForegroundColor Cyan + + $inventoryPath = Join-Path $sdkRepoPath "doc" "GeneratorMigration" "Library_Inventory.md" + if (-not (Test-Path $inventoryPath)) { + throw "Library_Inventory.md not found at: $inventoryPath" + } + + $allLibraries = Get-LibrariesToRegenerate -InventoryPath $inventoryPath + + # Apply generator filter before interactive selection + $filteredLibraries = @(Filter-LibrariesByGenerator ` + -Libraries $allLibraries ` + -Azure:$Azure ` + -Unbranded:$Unbranded ` + -Mgmt:$Mgmt) + + if (-not $filteredLibraries -or $filteredLibraries.Count -eq 0) { + Write-Host "No libraries found matching the specified generator filter" -ForegroundColor Yellow + exit 0 + } + + $libraries = @(Select-LibrariesToRegenerate -Libraries $filteredLibraries) + + # Check if user cancelled selection + if (-not $libraries -or $libraries.Count -eq 0) { + Write-Host "No libraries selected. Exiting..." -ForegroundColor Yellow + exit 0 + } + } + + # Create debug folder for packaged artifacts with timestamped subfolder + $timestamp = Get-Date -Format "yyyyMMdd" + $debugFolder = Join-Path $packageRoot "debug" $timestamp + if (-not (Test-Path $debugFolder)) { + New-Item -ItemType Directory -Path $debugFolder -Force | Out-Null + } + + Write-Host "Debug folder: $debugFolder" -ForegroundColor Gray + Write-Host "" + + # Step 1: Build the azure generator + Write-Host "`n[2/6] Building azure generator..." -ForegroundColor Cyan + + Push-Location $packageRoot + try { + Write-Host "Installing dependencies..." -ForegroundColor Gray + Invoke "npm ci" + if ($LASTEXITCODE -ne 0) { + throw "Failed to install dependencies for azure generator" + } + + Write-Host "Cleaning build artifacts..." -ForegroundColor Gray + Invoke "npm run clean" + if ($LASTEXITCODE -ne 0) { + throw "Failed to clean azure generator" + } + + Write-Host "Building generator..." -ForegroundColor Gray + Invoke "npm run build" + if ($LASTEXITCODE -ne 0) { + throw "Failed to build azure generator" + } + + Write-Host " Build completed" -ForegroundColor Green + } + finally { + Pop-Location + } + + # Step 2: Package the generators with local version + Write-Host "`n[3/6] Packaging generators..." -ForegroundColor Cyan + + $localVersion = Get-LocalPackageVersion + Write-Host "Local package version: $localVersion" -ForegroundColor Yellow + + $azurePackageJson = Join-Path $packageRoot "package.json" + $originalPackageJson = Get-Content $azurePackageJson -Raw + + try { + Update-PackageJsonVersion -PackageJsonPath $azurePackageJson -NewVersion $localVersion + $azurePackagePath = Invoke-NpmPack -WorkingDirectory $packageRoot -DebugFolder $debugFolder + Write-Host "Created npm package: $azurePackagePath" -ForegroundColor Green + } + finally { + # Restore original package.json + Set-Content $azurePackageJson $originalPackageJson -Encoding utf8 -NoNewline + } + + # Update Packages.Data.props with local NuGet version + $packagesDataPropsPath = Join-Path $sdkRepoPath "eng" "Packages.Data.props" + if (-not (Test-Path $packagesDataPropsPath)) { + throw "Packages.Data.props not found at: $packagesDataPropsPath" + } + + Update-AzureGeneratorVersion -PackagesDataPropsPath $packagesDataPropsPath -NewVersion $localVersion + + # Add debug folder as a NuGet package source + $nugetConfigPath = Join-Path $sdkRepoPath "NuGet.Config" + Add-LocalNuGetSource -NuGetConfigPath $nugetConfigPath -SourcePath $debugFolder + + # Step 3: Build required generators and update artifacts + Write-Host "`n[4/6] Building additional required generators and updating artifacts..." -ForegroundColor Cyan + + # Determine which generators are needed based on libraries to be regenerated + if ($Select) { + # Libraries were already selected at the beginning + $librariesToAnalyze = $libraries + } else { + # Load all libraries and apply filters to determine what would be regenerated + $inventoryPath = Join-Path $sdkRepoPath "doc" "GeneratorMigration" "Library_Inventory.md" + if (-not (Test-Path $inventoryPath)) { + throw "Library_Inventory.md not found at: $inventoryPath" + } + + $allLibraries = Get-LibrariesToRegenerate -InventoryPath $inventoryPath + $librariesToAnalyze = Filter-LibrariesByGenerator ` + -Libraries $allLibraries ` + -Azure:$Azure ` + -Unbranded:$Unbranded ` + -Mgmt:$Mgmt + } + + # Determine which generators are actually needed + $needsUnbranded = $false + $needsAzure = $false + $needsMgmt = $false + + if ($librariesToAnalyze -and $librariesToAnalyze.Count -gt 0) { + foreach ($lib in $librariesToAnalyze) { + switch ($lib.Generator) { + "@typespec/http-client-csharp" { $needsUnbranded = $true } + "@azure-typespec/http-client-csharp" { $needsAzure = $true; $needsUnbranded = $true } + "@azure-typespec/http-client-csharp-mgmt" { $needsMgmt = $true; $needsAzure = $true; $needsUnbranded = $true } + } + } + } + + $generatorSummary = @() + if ($needsUnbranded) { $generatorSummary += "Unbranded" } + if ($needsAzure) { $generatorSummary += "Azure" } + if ($needsMgmt) { $generatorSummary += "Management" } + + if ($generatorSummary.Count -gt 0) { + Write-Host "Required generators: $($generatorSummary -join ', ')" -ForegroundColor Yellow + } else { + Write-Host "No additional generators required" -ForegroundColor Yellow + } + + # Update eng folder artifacts if needed + if ($needsAzure -or $needsUnbranded) { + Write-Host "Updating eng folder artifacts..." -ForegroundColor Gray + + $engFolder = Join-Path $sdkRepoPath "eng" + $tempDir = Join-Path $engFolder "temp-package-update" + New-Item -ItemType Directory -Path $tempDir -Force | Out-Null + + # Helper function to update emitter package files + $updateEmitterPackage = { + param($PackagePath, $EmitterJsonName, $LockJsonName) + + $emitterJson = Join-Path $engFolder $EmitterJsonName + $tempPackageJson = Join-Path $tempDir "package.json" + + Copy-Item $emitterJson $tempPackageJson -Force + + Push-Location $tempDir + try { + Invoke "npm install `"`"file:$PackagePath`"`" --package-lock-only" $tempDir + if ($LASTEXITCODE -ne 0) { + throw "Failed to install local package for emitter update." + } + + Copy-Item $tempPackageJson $emitterJson -Force + $lockFile = Join-Path $tempDir "package-lock.json" + if (Test-Path $lockFile) { + Copy-Item $lockFile (Join-Path $engFolder $LockJsonName) -Force + } + + # Cleanup temp files + Remove-Item $tempPackageJson, $lockFile -Force -ErrorAction SilentlyContinue + } + finally { + Pop-Location + } + } + + try { + if ($needsAzure -and $azurePackagePath) { + & $updateEmitterPackage $azurePackagePath "azure-typespec-http-client-csharp-emitter-package.json" "azure-typespec-http-client-csharp-emitter-package-lock.json" + } + + Write-Host " Artifacts updated" -ForegroundColor Green + } + finally { + Remove-Item $tempDir -Recurse -Force -ErrorAction SilentlyContinue + } + } + + # Update management plane generator if needed + if ($needsMgmt) { + Write-Host "Building management plane generator..." -ForegroundColor Gray + + $engFolder = Join-Path $sdkRepoPath "eng" + $mgmtGeneratorPath = Join-Path $engFolder "packages" "http-client-csharp-mgmt" + + if (Test-Path $mgmtGeneratorPath) { + Update-MgmtGenerator ` + -EngFolder $engFolder ` + -DebugFolder $debugFolder ` + -LocalVersion $localVersion + + Write-Host " Management plane generator completed" -ForegroundColor Green + } else { + Write-Host " Management plane generator not found, skipping..." -ForegroundColor Yellow + } + } + + # Step 4: Regenerate libraries + Write-Host "`n[5/6] Regenerating libraries..." -ForegroundColor Cyan + + if (-not $Select) { + # Load all libraries if not using -Select flag + $inventoryPath = Join-Path $sdkRepoPath "doc" "GeneratorMigration" "Library_Inventory.md" + if (-not (Test-Path $inventoryPath)) { + throw "Library_Inventory.md not found at: $inventoryPath" + } + + $allLibraries = Get-LibrariesToRegenerate -InventoryPath $inventoryPath + + # Apply generator filter + $libraries = Filter-LibrariesByGenerator ` + -Libraries $allLibraries ` + -Azure:$Azure ` + -Unbranded:$Unbranded ` + -Mgmt:$Mgmt + + if ($libraries.Count -eq 0) { + Write-Host "No libraries found matching the specified generator filter" -ForegroundColor Yellow + Write-Host "Skipping regeneration step..." -ForegroundColor Gray + } else { + $filterText = if ($Azure) { + " (Azure generator only)" + } elseif ($Unbranded) { + " (Unbranded generator only)" + } elseif ($Mgmt) { + " (Management plane generator only)" + } else { + "" + } + Write-Host "Regenerating $($libraries.Count) libraries$filterText" -ForegroundColor Yellow + } + } else { + # Libraries were already selected at the beginning + if ($libraries -and $libraries.Count -gt 0) { + Write-Host "Using $($libraries.Count) previously selected libraries" -ForegroundColor Yellow + } else { + Write-Host "No libraries were selected" -ForegroundColor Yellow + } + } + + if (-not $libraries -or $libraries.Count -eq 0) { + Write-Host "No libraries selected for regeneration" -ForegroundColor Yellow + $failedCount = 0 + } else { + + # Determine parallel execution throttle limit: (CPU cores - 2), min 1, max 8 + $cpuCores = if ($IsWindows -or $PSVersionTable.PSVersion.Major -lt 6) { + (Get-CimInstance -ClassName Win32_Processor | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum + } elseif ($IsMacOS) { + [int](sysctl -n hw.ncpu) + } else { + [int](nproc) + } + + $throttleLimit = [Math]::Max(1, [Math]::Min(8, $cpuCores - 2)) + + Write-Host "Using $throttleLimit concurrent jobs (detected $cpuCores logical processors)" -ForegroundColor Gray + Write-Host "" + + # Pre-install tsp-client to avoid concurrent npm operations + $sdkForNetEngFolder = Join-Path $sdkRepoPath "eng" + Write-Host "Pre-installing tsp-client..." -ForegroundColor Gray + $tspClientDir = Join-Path $sdkForNetEngFolder "common" "tsp-client" + Invoke "npm ci --prefix $tspClientDir" $tspClientDir + if ($LASTEXITCODE -ne 0) { + throw "Failed to install tsp-client" + } + Write-Host " tsp-client ready" -ForegroundColor Green + Write-Host "" + + # Pre-build the client plugin to avoid concurrent builds + $codeGenerationTargetPath = Join-Path $sdkForNetEngFolder "CodeGeneration.targets" + if (-not (Test-Path $codeGenerationTargetPath)) { + throw "CodeGeneration.targets not found at: $codeGenerationTargetPath" + } + Write-Host "Pre-building client plugin..." -ForegroundColor Gray + Invoke "dotnet build $codeGenerationTargetPath /t:BuildPlugin /p:TypeSpecInput=temp" $sdkForNetEngFolder + if ($LASTEXITCODE -ne 0) { + throw "Failed to build client plugin" + } + + # Thread-safe collections for progress tracking + $completed = [System.Collections.Concurrent.ConcurrentBag[int]]::new() + $totalCount = $libraries.Count + + # Run regeneration in parallel + $results = $libraries | ForEach-Object -ThrottleLimit $throttleLimit -Parallel { + $library = $_ + $azureSdkPath = $using:sdkRepoPath + $completedBag = $using:completed + $total = $using:totalCount + + # Determine build path (check for src subdirectory) + $libraryPath = Join-Path $azureSdkPath $library.Path + $srcPath = Join-Path $libraryPath "src" + $buildPath = if ((Test-Path $srcPath) -and (Get-ChildItem -Path $srcPath -Filter "*.csproj" -ErrorAction SilentlyContinue)) { + $srcPath + } else { + $libraryPath + } + + # Regenerate library + $result = try { + if (-not (Test-Path $libraryPath)) { + @{ Success = $false; Error = "Library path not found"; Output = "" } + } else { + Push-Location $buildPath + try { + $output = & dotnet build /t:GenerateCode /p:SkipTspClientInstall=true /p:SkipBuildPlugin=true 2>&1 + $exitCode = $LASTEXITCODE + + if ($exitCode -ne 0) { + @{ Success = $false; Error = "Generation failed with exit code $exitCode"; Output = ($output -join "`n") } + } else { + @{ Success = $true; Output = ($output -join "`n") } + } + } + finally { + Pop-Location + } + } + } + catch { + @{ Success = $false; Error = $_.Exception.Message; Output = $_.Exception.ToString() } + } + + # Update progress counter + $completedBag.Add(1) + $currentCount = $completedBag.Count + + # Thread-safe console output with progress + $status = if ($result.Success) { "✓" } else { "✗" } + $color = if ($result.Success) { "Green" } else { "White" } + + $progressMsg = "[$currentCount/$total] $status $($library.Library)" + Write-Host $progressMsg -ForegroundColor $color + + # Return result with library metadata + return @{ + Service = $library.Service + Library = $library.Library + Path = $library.Path + Generator = $library.Generator + Success = if ($result.ContainsKey('Success')) { $result.Success } else { $false } + Error = if ($result.ContainsKey('Error')) { $result.Error } else { "" } + Output = if ($result.ContainsKey('Output')) { $result.Output } else { "" } + } + } + + # Generate final report + $scriptEndTime = Get-Date + $elapsedTime = $scriptEndTime - $scriptStartTime + + Write-RegenerationReport -Results $results -ElapsedTime $elapsedTime -DebugFolder $debugFolder + + # Check if any libraries failed + $failedLibraries = @($results | Where-Object { -not $_.Success }) + $failedCount = $failedLibraries.Count + } + + if ($failedCount -gt 0) { + Write-Host "`nValidation completed with warnings: $failedCount libraries failed to regenerate" -ForegroundColor Yellow + Write-Host "Check the detailed report above for error information" -ForegroundColor Yellow + } else { + Write-Host "`nValidation completed successfully! All libraries regenerated without errors." -ForegroundColor Green + + # Step 5: Restore artifacts to original state + Write-Host "`n[6/6] Restoring artifacts to original state..." -ForegroundColor Cyan + + Push-Location $sdkRepoPath + try { + Write-Host "Restoring modified files..." -ForegroundColor Gray + $filesToRestore = @( + "eng/azure-typespec-http-client-csharp-emitter-package.json" + "eng/azure-typespec-http-client-csharp-emitter-package-lock.json" + "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" + "eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json" + "eng/packages/http-client-csharp/package-lock.json" + "eng/packages/http-client-csharp-mgmt/package.json" + "eng/packages/http-client-csharp-mgmt/package-lock.json" + "eng/Packages.Data.props" + "NuGet.Config" + ) + $restoreCmd = "git restore $($filesToRestore -join ' ')" + Invoke $restoreCmd $sdkRepoPath + if ($LASTEXITCODE -ne 0) { + throw "Failed to restore modified files" + } + Write-Host " All artifacts restored" -ForegroundColor Green + } + finally { + Pop-Location + } + } +} +catch { + Write-Host "`nScript encountered an error during setup or configuration." -ForegroundColor Red + Write-Host $_.Exception.Message -ForegroundColor Red + Write-Host $_.ScriptStackTrace -ForegroundColor DarkGray + + # Attempt to restore NuGet.Config even on failure + Write-Host "`nAttempting to restore NuGet.Config..." -ForegroundColor Yellow + Push-Location $sdkRepoPath -ErrorAction SilentlyContinue + try { + Invoke "git restore NuGet.Config" $sdkRepoPath + Write-Host " NuGet.Config restored" -ForegroundColor Green + } + catch { + Write-Host " Failed to restore NuGet.Config" -ForegroundColor Red + } + finally { + Pop-Location -ErrorAction SilentlyContinue + } + + exit 1 +} + +Write-Host "`nScript completed." -ForegroundColor Cyan diff --git a/eng/packages/http-client-csharp/eng/scripts/RegenPreview.psm1 b/eng/packages/http-client-csharp/eng/scripts/RegenPreview.psm1 new file mode 100644 index 000000000000..42a57715d447 --- /dev/null +++ b/eng/packages/http-client-csharp/eng/scripts/RegenPreview.psm1 @@ -0,0 +1,494 @@ +Import-Module "$PSScriptRoot\Generation.psm1" -DisableNameChecking -Force -Global + +function Update-GeneratorPackage { + <# + .SYNOPSIS + Common helper function to update, build, and package a TypeSpec generator. + + .DESCRIPTION + This internal function handles the common workflow for updating TypeSpec generators: + 1. Updates package.json dependencies + 2. Runs npm install + 3. Runs npm clean to ensure a clean build + 4. Builds the generator + 5. Packages the generator with specified version + 6. Moves package to debug folder + + This is a shared helper used by Update-MgmtGenerator and Update-AzureGenerator. + + .PARAMETER GeneratorPath + Path to the generator directory. + + .PARAMETER Dependencies + Hashtable of dependencies to update (name -> file path). + + .PARAMETER DevDependencies + Hashtable of dev dependencies to update (name -> file path). + + .PARAMETER LocalVersion + The version string to use for the package. + + .PARAMETER DebugFolder + The debug folder where the package should be moved. + + .PARAMETER UseNpmCi + If true, runs 'npm install --package-lock-only && npm ci' instead of 'npm install'. + #> + param( + [Parameter(Mandatory=$true)] + [string]$GeneratorPath, + + [Parameter(Mandatory=$false)] + [hashtable]$Dependencies = @{}, + + [Parameter(Mandatory=$false)] + [hashtable]$DevDependencies = @{}, + + [Parameter(Mandatory=$true)] + [string]$LocalVersion, + + [Parameter(Mandatory=$true)] + [string]$DebugFolder, + + [Parameter(Mandatory=$false)] + [bool]$UseNpmCi = $false + ) + + $ErrorActionPreference = 'Stop' + + $packageJsonPath = Join-Path $GeneratorPath "package.json" + $originalPackageJson = Get-Content $packageJsonPath -Raw + + try { + # Step 1: Update package.json dependencies + if ($Dependencies.Count -gt 0 -or $DevDependencies.Count -gt 0) { + Write-Host "Updating package.json dependencies..." -ForegroundColor Gray + $packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json + + foreach ($dep in $Dependencies.GetEnumerator()) { + if ($packageJson.dependencies -and $packageJson.dependencies.PSObject.Properties[$dep.Key]) { + $packageJson.dependencies.($dep.Key) = "file:$($dep.Value)" + } + } + + foreach ($dep in $DevDependencies.GetEnumerator()) { + if ($packageJson.devDependencies -and $packageJson.devDependencies.PSObject.Properties[$dep.Key]) { + $packageJson.devDependencies.($dep.Key) = "file:$($dep.Value)" + } + } + + $packageJson | ConvertTo-Json -Depth 100 | Set-Content $packageJsonPath -Encoding UTF8 + Write-Host " Updated dependencies to local packages" -ForegroundColor Green + + # Install dependencies, clean, and build + Push-Location $GeneratorPath + try { + Write-Host "Installing dependencies..." -ForegroundColor Gray + if ($UseNpmCi) { + $installOutput = & npm install --package-lock-only 2>&1 + if ($LASTEXITCODE -ne 0) { + Write-Host $installOutput -ForegroundColor Red + throw "Failed to update package-lock.json" + } + + $ciOutput = & npm ci 2>&1 + if ($LASTEXITCODE -ne 0) { + Write-Host $ciOutput -ForegroundColor Red + throw "Failed to install dependencies" + } + } else { + $installOutput = & npm install 2>&1 + if ($LASTEXITCODE -ne 0) { + Write-Host $installOutput -ForegroundColor Red + throw "Failed to run npm install" + } + } + + Write-Host "Cleaning build artifacts..." -ForegroundColor Gray + $cleanOutput = Invoke "npm run clean" $GeneratorPath + if ($LASTEXITCODE -ne 0) { + Write-Host $cleanOutput -ForegroundColor Red + throw "Failed to clean generator" + } + + Write-Host "Building generator..." -ForegroundColor Gray + $buildOutput = Invoke "npm run build" $GeneratorPath + if ($LASTEXITCODE -ne 0) { + Write-Host $buildOutput -ForegroundColor Red + throw "Failed to build generator" + } + + Write-Host " Build completed" -ForegroundColor Green + } + finally { + Pop-Location + } + } + + # Step 3: Package the generator + Write-Host "Packaging generator..." -ForegroundColor Gray + + # Update version in package.json for packaging + $packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json + $packageJson.version = $LocalVersion + $packageJson | ConvertTo-Json -Depth 100 | Set-Content $packageJsonPath -Encoding UTF8 + + Push-Location $GeneratorPath + try { + $packOutput = Invoke "npm pack" $GeneratorPath + if ($LASTEXITCODE -ne 0) { + Write-Host $packOutput -ForegroundColor Red + throw "Failed to pack generator" + } + + # Get the package filename + $packageLine = ($packOutput | Where-Object { $_ -match '\.tgz$' } | Select-Object -First 1).ToString().Trim() + if ($packageLine -match 'filename:\s*(.+\.tgz)') { + $packageFile = $Matches[1].Trim() + } else { + $packageFile = $packageLine + } + + # Move to debug folder + $sourcePath = Join-Path $GeneratorPath $packageFile + $destPath = Join-Path $DebugFolder $packageFile + Move-Item $sourcePath $destPath -Force + + Write-Host " Package created: $packageFile" -ForegroundColor Green + + return $destPath + } + finally { + Pop-Location + } + } + finally { + # Always restore original package.json + Set-Content $packageJsonPath $originalPackageJson -Encoding utf8 -NoNewline + } +} + +function Update-AzureGeneratorVersion { + param( + [string]$PackagesDataPropsPath, + [string]$NewVersion + ) + + Write-Host "Updating AzureGeneratorVersion to $NewVersion in Packages.Data.props" -ForegroundColor Gray + + $content = Get-Content $PackagesDataPropsPath -Raw + + # Use regex to find and replace the AzureGeneratorVersion property + $pattern = '()([^<]+)()' + + if ($content -match $pattern) { + $oldVersion = $Matches[2] + $newContent = $content -replace $pattern, "$NewVersion" + Set-Content $PackagesDataPropsPath -Value $newContent -Encoding utf8 -NoNewline + Write-Host " Updated AzureGeneratorVersion from $oldVersion to $NewVersion" -ForegroundColor Green + } else { + throw "AzureGeneratorVersion property not found in $PackagesDataPropsPath" + } +} + + +function Update-MgmtGenerator { + <# + .SYNOPSIS + Updates and builds the management plane generator (@azure-typespec/http-client-csharp-mgmt). + + .DESCRIPTION + This function handles the management plane generator setup: + 1. Updates package.json with Azure generator dependencies + 2. Runs npm install + 3. Runs npm run clean to ensure a clean build + 4. Builds the management plane generator + 5. Packages the management plane generator + 6. Updates eng folder emitter package artifacts (azure-typespec-http-client-csharp-mgmt-emitter-package.json) + 7. Updates mgmt emitter package artifact's devDependency for @typespec/http-client-csharp + + This function is designed to be called from RegenPreview.ps1 and uses the same + versioning scheme as the main generators. It derives all necessary paths from the + EngFolder parameter. + + .PARAMETER EngFolder + The eng folder path in azure-sdk-for-net. All other paths (mgmt generator, + package paths, Packages.Data.props) are derived from this. + + .PARAMETER DebugFolder + The debug folder path where the packaged generators (.tgz files) are located. + + .PARAMETER LocalVersion + The version string to use for the local package (e.g., "1.0.0-alpha.20250127.abc123"). + #> + param( + [Parameter(Mandatory=$true)] + [string]$EngFolder, + + [Parameter(Mandatory=$true)] + [string]$DebugFolder, + + [Parameter(Mandatory=$true)] + [string]$LocalVersion + ) + + $ErrorActionPreference = 'Stop' + + # Derive all paths from EngFolder + $mgmtGeneratorPath = Join-Path $EngFolder "packages" "http-client-csharp-mgmt" + + # Package paths come from debug folder + $azurePackageName = "azure-typespec-http-client-csharp-$LocalVersion.tgz" + $azurePackagePath = Join-Path $DebugFolder $azurePackageName + + if (-not (Test-Path $azurePackagePath)) { + throw "Azure package not found: $azurePackagePath" + } + + Write-Host "Management plane generator path: $mgmtGeneratorPath" -ForegroundColor Gray + Write-Host "Azure package: $azurePackagePath" -ForegroundColor Gray + Write-Host "Local version: $LocalVersion" -ForegroundColor Gray + Write-Host "" + + # Use shared helper to build and package the mgmt generator + $mgmtPackagePath = Update-GeneratorPackage ` + -GeneratorPath $mgmtGeneratorPath ` + -Dependencies @{ '@azure-typespec/http-client-csharp' = $azurePackagePath } ` + -LocalVersion $LocalVersion ` + -DebugFolder $DebugFolder ` + -UseNpmCi $false + + # Update eng folder mgmt emitter package artifacts + Write-Host "Updating mgmt emitter package artifacts..." -ForegroundColor Gray + + $mgmtEmitterJson = Join-Path $EngFolder "azure-typespec-http-client-csharp-mgmt-emitter-package.json" + + # Now update the package-lock.json with both dependencies + $tempDir = Join-Path $EngFolder "temp-mgmt-package-update" + New-Item -ItemType Directory -Path $tempDir -Force | Out-Null + + try { + $tempPackageJson = Join-Path $tempDir "package.json" + + Copy-Item $mgmtEmitterJson $tempPackageJson -Force + + Push-Location $tempDir + try { + # Install the mgmt package and regenerate lock file with both dependencies + Invoke "npm install `"`"file:$mgmtPackagePath`"`" --package-lock-only" $tempDir + + Copy-Item $tempPackageJson $mgmtEmitterJson -Force + $lockFile = Join-Path $tempDir "package-lock.json" + if (Test-Path $lockFile) { + $mgmtLockJson = Join-Path $EngFolder "azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json" + Copy-Item $lockFile $mgmtLockJson -Force + } + + Write-Host " Mgmt emitter package artifacts updated" -ForegroundColor Green + } + finally { + Pop-Location + } + } + finally { + Remove-Item $tempDir -Recurse -Force -ErrorAction SilentlyContinue + } + + Write-Host "" + + # Return the package path for potential further use + return $mgmtPackagePath +} + +function Filter-LibrariesByGenerator { + <# + .SYNOPSIS + Filters libraries based on generator type. + + .DESCRIPTION + This function filters a list of libraries based on the specified generator type. + Each library object should have a 'Generator' property. + If no generator filter is specified, all libraries are returned. + + .PARAMETER Libraries + Array of library objects to filter. Each object should have a 'Generator' property. + + .PARAMETER Azure + Filter for Azure generator (@azure-typespec/http-client-csharp). + + .PARAMETER Unbranded + Filter for unbranded generator (@typespec/http-client-csharp). + + .PARAMETER Mgmt + Filter for management plane generator (@azure-typespec/http-client-csharp-mgmt). + #> + param( + [Parameter(Mandatory=$true)] + [array]$Libraries, + + [Parameter(Mandatory=$false)] + [switch]$Azure, + + [Parameter(Mandatory=$false)] + [switch]$Unbranded, + + [Parameter(Mandatory=$false)] + [switch]$Mgmt + ) + + $ErrorActionPreference = 'Stop' + + # If no filters specified, return everything as an array + if (-not $Azure -and -not $Unbranded -and -not $Mgmt) { + return @($Libraries) + } + + # Filter based on specified generator type + $filtered = [System.Collections.ArrayList]::new() + + if ($Azure) { + $azureLibs = @($Libraries | Where-Object { $_.Generator -eq "@azure-typespec/http-client-csharp" }) + foreach ($lib in $azureLibs) { + [void]$filtered.Add($lib) + } + } + + if ($Unbranded) { + $unbrandedLibs = @($Libraries | Where-Object { $_.Generator -eq "@typespec/http-client-csharp" }) + foreach ($lib in $unbrandedLibs) { + [void]$filtered.Add($lib) + } + } + + if ($Mgmt) { + $mgmtLibs = @($Libraries | Where-Object { $_.Generator -eq "@azure-typespec/http-client-csharp-mgmt" }) + foreach ($lib in $mgmtLibs) { + [void]$filtered.Add($lib) + } + } + + # Return as array to ensure Count property is always available + return @($filtered.ToArray()) +} + +function Add-LocalNuGetSource { + <# + .SYNOPSIS + Adds a local NuGet package source to NuGet.Config. + + .DESCRIPTION + This function adds or updates a local NuGet package source in the repository's NuGet.Config file. + The source is inserted after the element if present, or appended otherwise. + + If PackagePatterns is provided, it also updates packageSourceMapping to allow the specified + packages to be loaded from the local source. This is required for repos that use package source mapping. + + .PARAMETER NuGetConfigPath + Path to the NuGet.Config file. + + .PARAMETER SourcePath + Path to the local NuGet package source directory. + + .PARAMETER SourceKey + The key/name for the NuGet source (default: "local-codegen-debug-packages"). + + .PARAMETER PackagePatterns + Optional array of package patterns to add to packageSourceMapping for this source. + Example: @("Microsoft.TypeSpec.Generator*", "Azure.Generator") + #> + param( + [Parameter(Mandatory=$true)] + [string]$NuGetConfigPath, + + [Parameter(Mandatory=$true)] + [string]$SourcePath, + + [Parameter(Mandatory=$false)] + [string]$SourceKey = "local-codegen-debug-packages", + + [Parameter(Mandatory=$false)] + [string[]]$PackagePatterns = @() + ) + + $ErrorActionPreference = 'Stop' + + if (-not (Test-Path $NuGetConfigPath)) { + throw "NuGet.Config not found at: $NuGetConfigPath" + } + + Write-Host "Adding local NuGet package source to NuGet.Config..." -ForegroundColor Gray + [xml]$nugetConfig = Get-Content $NuGetConfigPath + + # Ensure configuration element exists + if (-not $nugetConfig.configuration) { + throw "Invalid NuGet.Config: missing element" + } + + # Ensure packageSources element exists, create if needed + $packageSources = $nugetConfig.configuration.packageSources + if (-not $packageSources) { + $packageSources = $nugetConfig.CreateElement("packageSources") + $nugetConfig.configuration.AppendChild($packageSources) | Out-Null + } + + # Create local source element + $localSource = $nugetConfig.CreateElement("add") + $localSource.SetAttribute("key", $SourceKey) + $localSource.SetAttribute("value", $SourcePath) + + # Find the element and insert after it + $clearElement = $packageSources.ChildNodes | Where-Object { $_.Name -eq "clear" } | Select-Object -First 1 + + if ($clearElement -and $clearElement.NextSibling) { + $packageSources.InsertBefore($localSource, $clearElement.NextSibling) | Out-Null + } elseif ($clearElement) { + $packageSources.AppendChild($localSource) | Out-Null + } else { + # No clear element, just prepend to be first + if ($packageSources.FirstChild) { + $packageSources.InsertBefore($localSource, $packageSources.FirstChild) | Out-Null + } else { + $packageSources.AppendChild($localSource) | Out-Null + } + } + + Write-Host " Added local NuGet source: $SourceKey" -ForegroundColor Green + + # Handle packageSourceMapping if PackagePatterns are provided + if ($PackagePatterns.Count -gt 0) { + Write-Host " Updating packageSourceMapping..." -ForegroundColor Gray + + $packageSourceMapping = $nugetConfig.configuration.packageSourceMapping + if (-not $packageSourceMapping) { + $packageSourceMapping = $nugetConfig.CreateElement("packageSourceMapping") + $nugetConfig.configuration.AppendChild($packageSourceMapping) | Out-Null + } + + # Find or create packageSource element for our local source + $localPackageSource = $packageSourceMapping.packageSource | Where-Object { $_.key -eq $SourceKey } | Select-Object -First 1 + + if (-not $localPackageSource) { + $localPackageSource = $nugetConfig.CreateElement("packageSource") + $localPackageSource.SetAttribute("key", $SourceKey) + + # Insert at the beginning of packageSourceMapping (highest priority) + if ($packageSourceMapping.FirstChild) { + $packageSourceMapping.InsertBefore($localPackageSource, $packageSourceMapping.FirstChild) | Out-Null + } else { + $packageSourceMapping.AppendChild($localPackageSource) | Out-Null + } + } + + # Add package patterns + foreach ($pattern in $PackagePatterns) { + $packageElement = $nugetConfig.CreateElement("package") + $packageElement.SetAttribute("pattern", $pattern) + $localPackageSource.AppendChild($packageElement) | Out-Null + Write-Host " Added pattern: $pattern" -ForegroundColor Green + } + } + + $nugetConfig.Save($NuGetConfigPath) +} + +Export-ModuleMember -Function "Update-MgmtGenerator", "Filter-LibrariesByGenerator", "Add-LocalNuGetSource", "Update-AzureGeneratorVersion" diff --git a/eng/packages/http-client-csharp/eng/scripts/docs/RegenPreview.md b/eng/packages/http-client-csharp/eng/scripts/docs/RegenPreview.md new file mode 100644 index 000000000000..6de191a23044 --- /dev/null +++ b/eng/packages/http-client-csharp/eng/scripts/docs/RegenPreview.md @@ -0,0 +1,199 @@ +# RegenPreview.ps1 + +## Overview + +`RegenPreview.ps1` is a PowerShell script that automates the process of building local generator packages and regenerating libraries for validation purposes. + +This script is designed to streamline the workflow for testing changes to the TypeSpec HTTP Client C# generator before submitting a pull request. + +## Purpose + +When making changes to the TypeSpec HTTP Client C# generator, it may be helpful to validate what the effects will be to generated libraries. This script automates the entire validation workflow by: + +### High level process + +1. Building local versions of the generator packages +2. Updating the Azure SDK for .NET repository to use these local packages +3. Regenerating all libraries (or selected libraries if `-Select` is specified) +4. Cleaning up all modifications after validation + +## Prerequisites + +- **PowerShell 7.0 or later** (cross-platform: Windows, Linux, macOS) +- Node.js and npm installed +- .NET SDK installed +- Local clone of the `azure-sdk-for-net` repository + +## Usage + +### Basic Usage (Regenerate All) + +**Windows:** + +```powershell +.\RegenPreview.ps1 +``` + +**Linux/macOS:** + +```powershell +./RegenPreview.ps1 +``` + +This will: + +- Clean and build the Azure & Mgmt generator with local changes +- Regenerate **all** libraries automatically +- Restore all modified metadata files on success (ie. package.json, package-lock.json) + +### Parameters + +#### `-Select` (Optional) + +When specified, displays an interactive menu to select specific libraries to regenerate. If omitted, all libraries are regenerated automatically. + +Can be combined with generator filter parameters (`-Azure`, `-Unbranded`, `-Mgmt`) to interactively select from a filtered subset. + +**Example:** + +```powershell +.\RegenPreview.ps1 -Select +``` + +#### `-Azure` (Optional) + +When specified, only regenerates libraries using the Azure-branded generator (`@azure-typespec/http-client-csharp`). + +**Example:** + +```powershell +.\RegenPreview.ps1 -Azure +``` + +#### `-Unbranded` (Optional) + +When specified, only regenerates libraries using the unbranded generator (`@typespec/http-client-csharp`). + +**Example:** + +```powershell +.\RegenPreview.ps1 -Unbranded +``` + +#### `-Mgmt` (Optional) + +When specified, only regenerates libraries using the management plane generator (`@azure-typespec/http-client-csharp-mgmt`). + +If no generator filter parameter is specified, all libraries are regenerated by default. + +**Example:** + +```powershell +.\RegenPreview.ps1 -Mgmt +``` + +### Interactive Selection + +When running with the `-Select` flag, the script presents an interactive menu listing all available libraries: + +``` +==================== LIBRARY SELECTION ==================== +Found 28 libraries available for regeneration + +Azure-branded libraries (@azure-typespec/http-client-csharp): + [ 1] Azure.AI.VoiceLive (ai) + [ 2] Azure.Data.AppConfiguration (appconfiguration) + ... + +Unbranded libraries (@typespec/http-client-csharp): + [12] Azure.AI.Projects (ai) + [13] Azure.AI.OpenAI (openai) + +Management plane libraries (@azure-typespec/http-client-csharp-mgmt): + [14] Azure.ResourceManager.AgriculturePlatform (agricultureplatform) + [15] Azure.ResourceManager.ArizeAIObservabilityEval (arizeaiobservabilityeval) + ... + +Enter library numbers to regenerate (comma-separated), 'all' for all libraries, or 'q' to quit: +Example: 1,3,5 or 1-4,7 or all +``` + +**Selection Options:** + +- Single library: `1` +- Multiple libraries: `1,3,5` +- Range of libraries: `1-4` +- Combination: `1-4,7,10` +- All libraries: `all` +- Quit: `q` + +### Error Handling + +If the script encounters an error during pre-requisite steps (Steps 1-6), it will: + +- Display the error message and stack trace +- Attempt to restore `NuGet.Config` to prevent leaving the repository in an inconsistent state +- Exit with code 1 + +## Output + +### Debug Folder + +All packaged artifacts are stored in the `debug` folder at the root of the azure generator: + +- `azure-typespec-http-client-csharp-{version}.tgz` - Azure generator npm package +- `Azure.Generator.{version}.nupkg` - Core generator NuGet package +- `regen-report.json` - Detailed JSON report of regeneration results + +### Console Output + +The script provides colored console output with: + +- **Cyan**: Step headers and section dividers +- **Yellow**: Important information (versions, library counts, warnings) +- **Gray**: Detailed command execution and file operations +- **Green**: Success messages +- **Red**: Error messages and failed libraries +- **White**: Library names during regeneration + +### Regeneration Report + +After regeneration completes, a summary report is displayed: + +``` +==================== REGENERATION REPORT ==================== +Total Libraries: 3 +Passed: 2 +Failed: 1 +Execution Time: 00:02:45 + +PASSED LIBRARIES: + ✓ Azure.AI.VoiceLive (ai) + ✓ Azure.AI.Projects (cognitiveservices) + +FAILED LIBRARIES: + ✗ Azure.Messaging.EventGrid.Namespaces (eventgrid) + Error: Generation failed with exit code 1 + Details: ... + +============================================================= +Detailed report saved to: C:\...\debug\regen-report.json +``` + +## Common Scenarios + +### Scenario: Test a Small Change Quickly + +```powershell +# You want to test Azure generator changes on specific libraries only +.\RegenPreview.ps1 -Select + +# Select just one or two libraries when prompted +# Selection: 1,5 +``` + +### Scenario: Full Validation Before PR + +```powershell +.\RegenPreview.ps1 +``` diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs index 10811975077e..f9fd7f2e3ba7 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs @@ -17,6 +17,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.Generator.Utilities; namespace Azure.Generator { @@ -55,6 +56,12 @@ public class AzureTypeFactory : ScmTypeFactory new("Azure.Core") ]; + /// + protected override string BuildServiceName() + { + return TypeNameUtilities.GetResourceProviderName(); + } + /// protected override CSharpType? CreateCSharpTypeCore(InputType inputType) { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs index 0e31d36b8f97..d2fadfb3ef31 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs @@ -8,7 +8,7 @@ using Microsoft.TypeSpec.Generator.Input.Extensions; using Microsoft.TypeSpec.Generator.Providers; -namespace Azure.Generator +namespace Azure.Generator.Extensions { internal static class ClientProviderExtensions { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs index b079c8ae7569..dbe573e38518 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Microsoft.TypeSpec.Generator; -namespace Azure.Generator +namespace Azure.Generator.Extensions { internal static class ConfigurationExtensions { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs index dce31f8220ac..565c92f78354 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs @@ -7,7 +7,6 @@ using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Providers; -using Microsoft.TypeSpec.Generator.Snippets; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Providers diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs index 065b7db2ae29..f9312ca2a0d1 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/HttpRequestProvider.cs @@ -4,10 +4,10 @@ using Azure.Core; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Snippets; using Microsoft.TypeSpec.Generator.Statements; using System; using System.Collections.Generic; -using Microsoft.TypeSpec.Generator.Snippets; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Providers @@ -29,6 +29,9 @@ public override ValueExpression Content() public override HttpRequestApi FromExpression(ValueExpression original) => new HttpRequestProvider(original); + public override ValueExpression ClientRequestId() + => Original.Property(nameof(Request.ClientRequestId)); + public override MethodBodyStatement SetHeaders(IReadOnlyList arguments) => Original.Property(nameof(Request.Headers)).Invoke(nameof(RequestHeaders.SetValue), arguments).Terminate(); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs index f957c25a0e25..cd18c578cfc6 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.Generator.Extensions; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Input; diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs index a89f64c67973..42690e8202bc 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs @@ -8,12 +8,12 @@ using System.Linq; using Azure.Core; using Azure.Core.Extensions; +using Azure.Generator.Utilities; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Statements; -using Azure.Generator.Visitors.Utilities; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Providers diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs similarity index 96% rename from eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs rename to eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs index 6da4bcb74a42..36035aad8121 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs @@ -4,7 +4,7 @@ using Microsoft.TypeSpec.Generator; using System.Linq; -namespace Azure.Generator.Visitors.Utilities +namespace Azure.Generator.Utilities { internal static class TypeNameUtilities { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs index 41fbeb9fb192..07c7b2798409 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs @@ -14,6 +14,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using Azure.Generator.Extensions; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Visitors @@ -106,7 +107,7 @@ internal class DistributedTracingVisitor : ScmLibraryVisitor return base.VisitMethod(method); } - if (method.IsProtocolMethod) + if (method.Kind == ScmMethodKind.Protocol) { UpdateProtocolMethodsWithDistributedTracing(method); } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs deleted file mode 100644 index 629006ec4908..000000000000 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Microsoft.TypeSpec.Generator; - -namespace Azure.Generator.Visitors.Extensions -{ - internal static class ConfigurationExtensions - { - public static bool UseModelNamespace(this Configuration config) => - UseModelNamespace(config.AdditionalConfigurationOptions); - - internal static bool UseModelNamespace(IReadOnlyDictionary options) - { - return options.TryGetValue("model-namespace", out var value) && - bool.TryParse(value.ToString(), out var parsed) && - parsed; - } - } -} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs index 8b5faa6e592b..406961ea78ad 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs @@ -8,9 +8,12 @@ using System.Text.Json; using System.Threading.Tasks; using Azure.Core; +using Azure.Generator.Extensions; +using Azure.Generator.Primitives; using Azure.Generator.Providers; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.ClientModel.Snippets; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Primitives; @@ -23,6 +26,8 @@ namespace Azure.Generator.Visitors { internal class LroVisitor : ScmLibraryVisitor { + private const string FromLroResponseMethodName = "FromLroResponse"; + protected override ScmMethodProviderCollection? Visit( InputServiceMethod serviceMethod, ClientProvider client, @@ -30,15 +35,16 @@ internal class LroVisitor : ScmLibraryVisitor { if (serviceMethod is InputLongRunningServiceMethod { Response.Type: InputModelType responseModel } lroServiceMethod) { - UpdateExplicitOperatorMethod(responseModel, lroServiceMethod); + AddFromLroResponseMethod(responseModel, lroServiceMethod, client); } return methods; } - private static void UpdateExplicitOperatorMethod( + private static void AddFromLroResponseMethod( InputModelType responseModel, - InputLongRunningServiceMethod lroServiceMethod) + InputLongRunningServiceMethod lroServiceMethod, + ClientProvider client) { var model = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); if (model == null) @@ -46,41 +52,100 @@ private static void UpdateExplicitOperatorMethod( return; } - // Update the explicit cast from response in LRO models to use the result path - var explicitOperator = model.SerializationProviders[0].Methods - .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && - m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); - var resultSegment = lroServiceMethod.LongRunningServiceMetadata.ResultPath; - if (explicitOperator == null || string.IsNullOrEmpty(resultSegment)) + if (string.IsNullOrEmpty(resultSegment)) { return; } - foreach (var statement in explicitOperator.BodyStatements!) + var serializationProvider = model.SerializationProviders[0]; + + // Check if FromLroResponse method already exists with matching signature + var existingMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == FromLroResponseMethodName && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal) && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Static) && + m.Signature.ReturnType?.Equals(model.Type) == true && + m.Signature.Parameters.Count == 1 && + m.Signature.Parameters[0].Type.Equals(typeof(Response))); + if (existingMethod != null) { - if (statement is ExpressionStatement - { - Expression: KeywordExpression - { - Keyword: "return", Expression: InvokeMethodExpression invokeMethodExpression - } - }) + return; + } + + // Create the FromLroResponse method + var responseParameter = KnownAzureParameters.Response; + var methodSignature = new MethodSignature( + FromLroResponseMethodName, + $"Converts a response to a {model.Type.Name} using the LRO result path.", + MethodSignatureModifiers.Internal | MethodSignatureModifiers.Static, + model.Type, + null, + [responseParameter]); + + // Build method body similar to explicit operator but with result path + var modelSerializationExtensions = Static(new ModelSerializationExtensionsDefinition().Type); + var statements = new MethodBodyStatement[] + { + UsingDeclare("document", typeof(JsonDocument), + Static().Invoke(nameof(JsonDocument.Parse), + [responseParameter.Property("Content"), + modelSerializationExtensions.Property("JsonDocumentOptions")]), + out var documentVariable), + Return(Static(model.Type).Invoke( + $"Deserialize{model.Type.Name}", + [ + documentVariable.Property("RootElement").Invoke("GetProperty", Literal(resultSegment)), + modelSerializationExtensions.Property("WireOptions") + ])) + }; + + var fromLroResponseMethod = new MethodProvider(methodSignature, statements, serializationProvider); + + // Add the method to the serialization provider + serializationProvider.Update(methods: [..serializationProvider.Methods, fromLroResponseMethod]); + + // Check if we should remove the explicit operator + // Only remove it if the model is ONLY used in LRO contexts across all clients + bool isOnlyUsedInLro = IsModelOnlyUsedInLro(responseModel); + if (isOnlyUsedInLro) + { + var explicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); + + if (explicitOperator != null) { - if (invokeMethodExpression.Arguments.Count > 0 && invokeMethodExpression.Arguments[0] is ScopedApi) - { - invokeMethodExpression.Update( - arguments: - [ - invokeMethodExpression.Arguments[0] - .Invoke("GetProperty", Literal(resultSegment)), - ..invokeMethodExpression.Arguments.Skip(1) - ]); - } + var updatedMethods = serializationProvider.Methods.Except([explicitOperator]).ToList(); + serializationProvider.Update(methods: updatedMethods); } } } + private static bool IsModelOnlyUsedInLro(InputModelType responseModel) + { + // Check all clients in the output library to see if any non-LRO method returns this model type + var outputLibrary = AzureClientGenerator.Instance.OutputLibrary; + var allClients = outputLibrary.TypeProviders.OfType(); + + foreach (var client in allClients) + { + // Check if any non-LRO method in this client uses the response model + bool usedInNonLro = client.Methods + .OfType() + .Any(m => m.ServiceMethod != null && + m.ServiceMethod is not InputLongRunningServiceMethod && + m.ServiceMethod.Response?.Type == responseModel); + + if (usedInNonLro) + { + return false; // Model is used in non-LRO context, keep the explicit operator + } + } + + return true; // Model is only used in LRO contexts + } + protected override ScmMethodProvider? VisitMethod(ScmMethodProvider method) { if (method.IsLroMethod()) @@ -95,10 +160,10 @@ private static void UpdateMethodSignature(ScmMethodProvider method) { var responseType = method.ServiceMethod!.Response.Type; - var returnType = (responseType, method.IsProtocolMethod) switch + var returnType = (responseType, method.Kind) switch { (null, _) => typeof(Operation), - (not null, true) => new CSharpType(typeof(Operation<>), typeof(BinaryData)), + (not null, ScmMethodKind.Protocol) => new CSharpType(typeof(Operation<>), typeof(BinaryData)), _ => new CSharpType(typeof(Operation<>), AzureClientGenerator.Instance.TypeFactory.CreateCSharpType(responseType)!), }; var isAsync = method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async); @@ -129,7 +194,7 @@ private static void UpdateMethodSignature(ScmMethodProvider method) ExpressionStatement expressionStatement, MethodProvider method) { - if (method is ScmMethodProvider scmMethod && scmMethod.IsLroMethod() && !scmMethod.IsProtocolMethod) + if (method is ScmMethodProvider scmMethod && scmMethod.IsLroMethod() && scmMethod.Kind != ScmMethodKind.Protocol) { return UpdateConvenienceMethod(expressionStatement, scmMethod); } @@ -170,13 +235,31 @@ private static void UpdateMethodSignature(ScmMethodProvider method) var client = (ClientProvider)scmMethod.EnclosingType; var diagnosticsProperty = client.GetClientDiagnosticProperty(); var scopeName = scmMethod.GetScopeName(); + + // Use FromLroResponse static method instead of explicit operator cast + var responseModel = serviceMethod.Response.Type as InputModelType; + var lroServiceMethod = scmMethod.ServiceMethod as InputLongRunningServiceMethod; + var resultSegment = lroServiceMethod?.LongRunningServiceMetadata.ResultPath; + + ValueExpression conversionExpression; + if (!string.IsNullOrEmpty(resultSegment) && responseModel != null) + { + // Call the FromLroResponse static method + conversionExpression = Static(responseType).Invoke(FromLroResponseMethodName, [response]); + } + else + { + // Fall back to explicit operator cast for models without result path + conversionExpression = new CastExpression(response, responseType); + } + invokeMethodExpression.Update( instanceReference: Static(typeof(ProtocolOperationHelpers)), methodName: "Convert", arguments: [ (invokeMethodExpression.Arguments[0] as CastExpression)!.Inner, - new FuncExpression([response.Declaration], new CastExpression(response, responseType)), + new FuncExpression([response.Declaration], conversionExpression), diagnosticsProperty, Literal(scopeName), ]); @@ -191,7 +274,7 @@ private static void UpdateMethodSignature(ScmMethodProvider method) { if (method is ScmMethodProvider scmMethod && scmMethod.IsLroMethod()) { - if (scmMethod.IsProtocolMethod) + if (scmMethod.Kind == ScmMethodKind.Protocol) { return UpdateProcessCall(expression, scmMethod); } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/MatchConditionsHeadersVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/MatchConditionsHeadersVisitor.cs index b9c259b17b4b..f4d9a5b640a0 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/MatchConditionsHeadersVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/MatchConditionsHeadersVisitor.cs @@ -63,12 +63,11 @@ internal class MatchConditionsHeadersVisitor : ScmLibraryVisitor return base.VisitMethod(method); } - bool isCreateRequestMethod = IsCreateRequestMethod(method); // Update method parameters UpdateMethodParameters(method, headerFlags, matchConditionParams); // Update method body - if (isCreateRequestMethod) + if (method.Kind == ScmMethodKind.CreateRequest) { UpdateCreateRequestMethodBody(method, headerFlags, matchConditionParams); } @@ -177,7 +176,7 @@ private static void UpdateMethodWithConditionsParameter( } // Update the method signature & xml docs with the new parameters - if (!IsCreateRequestMethod(method)) + if (method.Kind != ScmMethodKind.CreateRequest) { method.XmlDocs.Update(parameters: xmlParameterDocs); } @@ -189,7 +188,7 @@ private static RequestConditionHeaders ParseMatchConditionHeaders(ScmMethodProvi { var flags = RequestConditionHeaders.None; - var allParameters = method.IsProtocolMethod || IsCreateRequestMethod(method) + var allParameters = method.Kind == ScmMethodKind.Protocol || method.Kind == ScmMethodKind.CreateRequest ? method.ServiceMethod!.Operation.Parameters : method.ServiceMethod!.Parameters; @@ -286,7 +285,7 @@ private static void UpdateClientMethodBody( var updatedStatements = new List(); var requestConditionsParameter = GetConditionsParameter(matchConditionParams[0], headerFlags); - if (method.IsProtocolMethod && HasModificationTimeHeaders(headerFlags)) + if (method.Kind == ScmMethodKind.Protocol && HasModificationTimeHeaders(headerFlags)) { // Add validation statements for unsupported headers var unsupportedHeaders = new[] @@ -319,7 +318,7 @@ private static void UpdateClientMethodBody( foreach (var statement in method.BodyStatements) { var updatedStatement = UpdateMethodInvocationStatement( - method.IsProtocolMethod, + method.Kind == ScmMethodKind.Protocol, statement, requestConditionsParameter); updatedStatements.Add(updatedStatement); @@ -493,15 +492,6 @@ expressionStatement.Expression is InvokeMethodExpression invokeExpression && return false; } - private static bool IsCreateRequestMethod(ScmMethodProvider method) - { - return method.EnclosingType is RestClientProvider && - method.ServiceMethod != null && - !method.IsProtocolMethod && - method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal) && - method.Signature.ReturnType?.Equals(typeof(HttpMessage)) == true; - } - private static List GetMatchConditionParameters(IReadOnlyList parameters) { var matchConditionParams = new List(); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs index 2a66ac752c5c..20660e9c1e34 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Azure.Generator.Utilities; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.Providers; -using Azure.Generator.Visitors.Utilities; namespace Azure.Generator.Visitors { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs index fa12dcd06ffa..c5b87135a5f9 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs @@ -2,12 +2,12 @@ // Licensed under the MIT License. using System.IO; +using Azure.Generator.Extensions; using Microsoft.TypeSpec.Generator; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Providers; -using Azure.Generator.Visitors.Extensions; namespace Azure.Generator.Visitors { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/RequestClientIdHeaderVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/RequestClientIdHeaderVisitor.cs index 17d8eca52ff3..32fa133aa863 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/RequestClientIdHeaderVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/RequestClientIdHeaderVisitor.cs @@ -46,7 +46,7 @@ internal class RequestClientIdHeaderVisitor : ScmLibraryVisitor var newStatements = new List(originalBodyStatements[..^1]); // Find the request variable - VariableExpression? requestVariable = null; + HttpRequestApi? requestVariable = null; foreach (var statement in newStatements) { if (statement is ExpressionStatement @@ -57,7 +57,7 @@ internal class RequestClientIdHeaderVisitor : ScmLibraryVisitor var variable = declaration.Variable; if (variable.Type.Equals(variable.ToApi().Type)) { - requestVariable = variable; + requestVariable = variable.ToApi(); } } } @@ -67,7 +67,7 @@ internal class RequestClientIdHeaderVisitor : ScmLibraryVisitor // Set the client-request-id header newStatements.Add(requestVariable.As().SetHeaderValue( clientRequestIdParameter.SerializedName, - requestVariable.Property(nameof(Request.ClientRequestId)))); + requestVariable.ClientRequestId())); } // Add the return statement back diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/SpecialHeadersVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/SpecialHeadersVisitor.cs index 28aaa25c523f..c467a39a7fc3 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/SpecialHeadersVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/SpecialHeadersVisitor.cs @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Collections.Generic; -using System.Linq; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Statements; +using System.Collections.Generic; +using System.Linq; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Visitors @@ -17,8 +18,16 @@ namespace Azure.Generator.Visitors /// internal class SpecialHeadersVisitor : ScmLibraryVisitor { + private readonly bool _includeClientRequestIdInRequest; private const string ReturnClientRequestIdParameterName = "return-client-request-id"; private const string XMsClientRequestIdParameterName = "x-ms-client-request-id"; + private readonly Dictionary _serviceMethodParameterMap; + + public SpecialHeadersVisitor(bool includeXmsClientRequestIdInRequest = false) + { + _includeClientRequestIdInRequest = includeXmsClientRequestIdInRequest; + _serviceMethodParameterMap = []; + } protected override ScmMethodProviderCollection? Visit( InputServiceMethod serviceMethod, @@ -38,52 +47,76 @@ internal class SpecialHeadersVisitor : ScmLibraryVisitor // Create a new method collection with the updated service method methods = new ScmMethodProviderCollection(serviceMethod, client); - // Reset the rest client so that its methods are rebuilt. + // Store the parameters for the CreateRequest method + _serviceMethodParameterMap.TryAdd(serviceMethod, (returnClientRequestIdParameter, xMsClientRequestIdParameter)); + + // Reset the rest client so that its methods are rebuilt reflecting the new signatures client.RestClient.Reset(); - var createRequestMethod = client.RestClient.GetCreateRequestMethod(serviceMethod.Operation); + } + + return methods; + } + + protected override ScmMethodProvider? VisitMethod(ScmMethodProvider method) + { + if (method.ServiceMethod is null || !_serviceMethodParameterMap.TryGetValue(method.ServiceMethod, out var parameters)) + { + return method; + } - var originalBodyStatements = createRequestMethod.BodyStatements!.ToList(); + var (returnClientRequestIdParameter, xMsClientRequestIdParameter) = parameters; - // Exclude the last statement which is the return statement. We will add it back later. - var newStatements = new List(originalBodyStatements[..^1]); + var originalBodyStatements = method.BodyStatements!.ToList(); - // Find the request variable - VariableExpression? requestVariable = null; - foreach (var statement in newStatements) + // Exclude the last statement which is the return statement. We will add it back later. + var newStatements = new List(originalBodyStatements[..^1]); + + // Find the request variable + VariableExpression? requestVariable = null; + foreach (var statement in newStatements) + { + if (statement is ExpressionStatement + { + Expression: AssignmentExpression { Variable: DeclarationExpression declaration } + }) { - if (statement is ExpressionStatement - { - Expression: AssignmentExpression { Variable: DeclarationExpression declaration } - }) + var variable = declaration.Variable; + if (variable.Type.Equals(variable.ToApi().Type)) { - var variable = declaration.Variable; - if (variable.Type.Equals(variable.ToApi().Type)) - { - requestVariable = variable; - } + requestVariable = variable; } } + } - if (returnClientRequestIdParameter?.DefaultValue?.Value != null) + var request = requestVariable?.ToApi(); + if (request != null && returnClientRequestIdParameter?.DefaultValue?.Value != null) + { + if (bool.TryParse(returnClientRequestIdParameter.DefaultValue.Value.ToString(), out bool value)) { - if (bool.TryParse(returnClientRequestIdParameter.DefaultValue.Value.ToString(), out bool value)) - { - // Set the return-client-request-id header - newStatements.Add(requestVariable!.ToApi().SetHeaders( - [ - Literal(returnClientRequestIdParameter.SerializedName), - Literal(value.ToString().ToLowerInvariant()) - ])); - } + // Set the return-client-request-id header + newStatements.Add(request.SetHeaders( + [ + Literal(returnClientRequestIdParameter.SerializedName), + Literal(value.ToString().ToLowerInvariant()) + ])); } + } - // Add the return statement back - newStatements.Add(originalBodyStatements[^1]); - - createRequestMethod.Update(bodyStatements: newStatements); + if (request != null && _includeClientRequestIdInRequest && xMsClientRequestIdParameter != null) + { + // Set the x-ms-client-request-id header + newStatements.Add(request.SetHeaders( + [ + Literal(xMsClientRequestIdParameter.SerializedName), + request.Property("ClientRequestId") + ])); } - return methods; + // Add the return statement back + newStatements.Add(originalBodyStatements[^1]); + + method.Update(bodyStatements: newStatements); + return method; } } } \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs index f2e6580a60d8..0ebc3497451c 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using NUnit.Framework; -using Azure.Generator.Visitors.Extensions; +using Azure.Generator.Extensions; namespace Azure.Generator.Tests { diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs index 61157a48b111..acfb8a02668f 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs @@ -33,6 +33,7 @@ public static Mock LoadMockGenerator( Func>? inputModels = null, Func>? clients = null, Func? createClientCore = null, + Func>? visitors = null, ClientResponseApi? clientResponseApi = null, ClientPipelineApi? clientPipelineApi = null, HttpMessageApi? httpMessageApi = null, @@ -91,11 +92,24 @@ public static Mock LoadMockGenerator( var sourceInputModel = new Mock(() => new SourceInputModel(null, null)) { CallBase = true }; mockPluginInstance.Setup(p => p.SourceInputModel).Returns(sourceInputModel.Object); - var configureMethod = typeof(CodeModelGenerator).GetMethod( - "Configure", - BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod - ); - configureMethod!.Invoke(mockPluginInstance.Object, null); + + if (visitors != null) + { + var visitorsList = visitors.Invoke(); + foreach (var visitor in visitorsList) + { + mockPluginInstance.Object.AddVisitor(visitor); + } + } + else + { + var configureMethod = typeof(CodeModelGenerator).GetMethod( + "Configure", + BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod + ); + configureMethod!.Invoke(mockPluginInstance.Object, null); + } + return mockPluginInstance; } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs index a5cdff993a4c..9677126a0baa 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs @@ -154,7 +154,8 @@ public void TestUpdatesProtocolMethods(bool isProtocolMethod) $"The response returned from the service.", [new ParameterProvider("p1", $"p1", AzureClientGenerator.Instance.TypeFactory.RequestContentApi.RequestContentType)]); var bodyStatements = InvokeConsoleWriteLine(Literal("Hello World")); - var method = new ScmMethodProvider(methodSignature, bodyStatements, clientProvider!, isProtocolMethod: isProtocolMethod); + var methodKind = isProtocolMethod ? ScmMethodKind.Protocol : ScmMethodKind.Convenience; + var method = new ScmMethodProvider(methodSignature, bodyStatements, clientProvider!, methodKind); var updatedMethod = visitor.InvokeVisitMethod(method!); Assert.IsNotNull(updatedMethod?.BodyStatements); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs index f62f0a973634..4b7269b74cda 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs @@ -52,7 +52,7 @@ public void UpdatesLroSignatureNoResponseBody() Assert.IsTrue(scmMethod.Signature.ReturnType!.Equals(typeof(Operation)) || scmMethod.Signature.ReturnType!.Equals(new CSharpType(typeof(Task<>), typeof(Operation)))); - if (scmMethod.IsProtocolMethod) + if (scmMethod.Kind == ScmMethodKind.Protocol) { var requestContextParameter = scmMethod.Signature.Parameters[^1]; Assert.IsTrue(requestContextParameter.Type.Equals(typeof(RequestContext))); @@ -102,7 +102,7 @@ public void UpdatesLroSignatureWithResponseBody() Assert.IsTrue(waitUntilParameter.Type.Equals(typeof(WaitUntil))); Assert.AreEqual("waitUntil", waitUntilParameter.Name); - if (scmMethod.IsProtocolMethod) + if (scmMethod.Kind == ScmMethodKind.Protocol) { var requestContextParameter = scmMethod.Signature.Parameters[^1]; Assert.IsTrue(requestContextParameter.Type.Equals(typeof(RequestContext))); @@ -120,7 +120,7 @@ public void UpdatesLroSignatureWithResponseBody() } [Test] - public void UpdatesExplicitOperatorToUseResultSegment() + public void AddsFromLroResponseMethodAndRemovesExplicitOperatorForLroOnlyModel() { var visitor = new TestLroVisitor(); List parameters = @@ -154,23 +154,140 @@ public void UpdatesExplicitOperatorToUseResultSegment() visitor.InvokeVisitServiceMethod(lroServiceMethod, clientProvider!, methodCollection); var serializationProvider = responseModelProvider!.SerializationProviders[0]; + + // Check that FromLroResponse method was added + var fromLroResponseMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "FromLroResponse"); + + Assert.IsNotNull(fromLroResponseMethod); + Assert.IsNotNull(fromLroResponseMethod!.BodyStatements); + var result = fromLroResponseMethod!.BodyStatements!.ToDisplayString(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), result); + + // Check that explicit operator was removed since model is only used in LRO var explicitOperator = serializationProvider.Methods .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); + Assert.IsNull(explicitOperator); - Assert.IsNotNull(explicitOperator); - Assert.IsNotNull(explicitOperator!.BodyStatements); - var result = explicitOperator!.BodyStatements!.ToDisplayString(); + // does not add the method again on subsequent calls + visitor.InvokeVisitServiceMethod(lroServiceMethod, clientProvider!, methodCollection); + serializationProvider = responseModelProvider!.SerializationProviders[0]; + fromLroResponseMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "FromLroResponse"); + result = fromLroResponseMethod!.BodyStatements!.ToDisplayString(); Assert.AreEqual(Helpers.GetExpectedFromFile(), result); + } + + [Test] + public void RetainsExplicitOperatorWhenModelUsedInNonLroContext() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.MethodParameter("p1", InputPrimitiveType.String) + ]; + var responseModel = InputFactory.Model("foo"); + + // Create an LRO method + var lro = InputFactory.Operation( + "lroOp", + parameters: parameters, + responses: [InputFactory.OperationResponse(bodytype: responseModel)]); + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "lroOp", + lro, + parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"]), + longRunningServiceMetadata: InputFactory.LongRunningServiceMetadata( + finalState: 1, + finalResponse: InputFactory.OperationResponse(), + resultPath: "someResultPath")); - // does not mutate an already mutated operator + // Create a non-LRO method that also returns the same model + var nonLroOp = InputFactory.Operation( + "nonLroOp", + parameters: parameters, + responses: [InputFactory.OperationResponse(bodytype: responseModel)]); + var nonLroServiceMethod = InputFactory.BasicServiceMethod( + "nonLroOp", + nonLroOp, + parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod, nonLroServiceMethod]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient]); + + var clientProvider = AzureClientGenerator.Instance.TypeFactory.CreateClient(inputClient); + Assert.IsNotNull(clientProvider); + + var responseModelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); + Assert.IsNotNull(responseModelProvider); + + var methodCollection = new ScmMethodProviderCollection(lroServiceMethod, clientProvider!); visitor.InvokeVisitServiceMethod(lroServiceMethod, clientProvider!, methodCollection); - serializationProvider = responseModelProvider!.SerializationProviders[0]; - explicitOperator = serializationProvider.Methods + + var serializationProvider = responseModelProvider!.SerializationProviders[0]; + + // Check that FromLroResponse method was added + var fromLroResponseMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "FromLroResponse"); + Assert.IsNotNull(fromLroResponseMethod); + + // Check that explicit operator was RETAINED since model is also used in non-LRO context + var explicitOperator = serializationProvider.Methods .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); - result = explicitOperator!.BodyStatements!.ToDisplayString(); - Assert.AreEqual(Helpers.GetExpectedFromFile(), result); + Assert.IsNotNull(explicitOperator); + } + + [Test] + public void DoesNotAddFromLroResponseMethodWhenNoResultPath() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.MethodParameter("p1", InputPrimitiveType.String) + ]; + var responseModel = InputFactory.Model("foo"); + var lro = InputFactory.Operation( + "foo", + parameters: parameters, + responses: [InputFactory.OperationResponse(bodytype: responseModel)]); + // LRO service method without result path + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "foo", + lro, + parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"]), + longRunningServiceMetadata: InputFactory.LongRunningServiceMetadata( + finalState: 1, + finalResponse: InputFactory.OperationResponse(), + resultPath: null)); // No result path + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + MockHelpers.LoadMockGenerator(clients: () => [inputClient]); + + var clientProvider = AzureClientGenerator.Instance.TypeFactory.CreateClient(inputClient); + Assert.IsNotNull(clientProvider); + + var responseModelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); + Assert.IsNotNull(responseModelProvider); + + var methodCollection = new ScmMethodProviderCollection(lroServiceMethod, clientProvider!); + visitor.InvokeVisitServiceMethod(lroServiceMethod, clientProvider!, methodCollection); + + var serializationProvider = responseModelProvider!.SerializationProviders[0]; + + // Check that FromLroResponse method was NOT added + var fromLroResponseMethod = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Name == "FromLroResponse"); + Assert.IsNull(fromLroResponseMethod); + + // Explicit operator should still be present + var explicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); + Assert.IsNotNull(explicitOperator); } [Test] diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/MatchConditionsHeadersVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/MatchConditionsHeadersVisitorTests.cs index b74b677ecc3d..524eaebe4871 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/MatchConditionsHeadersVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/MatchConditionsHeadersVisitorTests.cs @@ -259,7 +259,7 @@ public void TestProtocolMethodValidation() foreach (var method in methodCollection) { visitor.VisitScmMethod(method); - if (method.IsProtocolMethod && method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async)) + if (method.Kind == ScmMethodKind.Protocol && method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async)) { protocolMethod = method; } @@ -311,7 +311,7 @@ public void TestProtocolMethodParameterOptionality(bool isRequired) foreach (var method in methodCollection) { visitor.VisitScmMethod(method); - if (method.IsProtocolMethod && method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async)) + if (method.Kind == ScmMethodKind.Protocol && method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async)) { protocolMethod = method; } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/SpecialHeadersVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/SpecialHeadersVisitorTests.cs index 38097603a828..7a8e85e67897 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/SpecialHeadersVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/SpecialHeadersVisitorTests.cs @@ -8,43 +8,72 @@ using Azure.Generator.Tests.Common; using Azure.Generator.Tests.TestHelpers; using Azure.Generator.Visitors; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; namespace Azure.Generator.Tests.Visitors { public class SpecialHeadersVisitorTests { - [Test] - public void RemovesSpecialHeaderParametersFromServiceMethod() + [TestCase(true)] + [TestCase(false)] + public void RemovesSpecialHeaderParametersFromServiceMethod(bool addBackXMsClientRequestId) { - var visitor = new TestSpecialHeadersVisitor(); + var visitor = new TestSpecialHeadersVisitor(addBackXMsClientRequestId); var parameters = CreateHttpParameters(); var methodParameters = CreateMethodParameters(); var responseModel = InputFactory.Model("foo"); - var operation = InputFactory.Operation( - "foo", - parameters: parameters, - responses: [InputFactory.OperationResponse(bodytype: responseModel)]); - var serviceMethod = InputFactory.LongRunningServiceMethod( - "foo", - operation, - parameters: methodParameters, - response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); - var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); - MockHelpers.LoadMockGenerator(clients: () => [inputClient]); + var serviceMethods = new List(); - // Verify initial parameters include special headers - Assert.AreEqual(3, serviceMethod.Parameters.Count); - Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "return-client-request-id")); - Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "x-ms-client-request-id")); + // Create two operations and service methods + for (int i = 1; i <= 2; i++) + { + var operation = InputFactory.Operation( + $"operation{i}", + parameters: parameters, + responses: [InputFactory.OperationResponse(bodytype: responseModel)]); + var serviceMethod = InputFactory.LongRunningServiceMethod( + $"operation{i}", + operation, + parameters: methodParameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + serviceMethods.Add(serviceMethod); + } - // Act - this would normally be called by the visitor framework, but we'll test the core logic - visitor.InvokeRemoveSpecialHeaders(serviceMethod); + var inputClient = InputFactory.Client("TestClient", methods: serviceMethods); - // Verify special headers are removed - Assert.AreEqual(1, serviceMethod.Parameters.Count); - Assert.IsFalse(serviceMethod.Parameters.Any(p => p.SerializedName == "return-client-request-id")); - Assert.IsFalse(serviceMethod.Parameters.Any(p => p.SerializedName == "x-ms-client-request-id")); - Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "some-other-parameter")); + // Verify initial parameters include special headers for both methods + foreach (var serviceMethod in serviceMethods) + { + Assert.AreEqual(3, serviceMethod.Parameters.Count); + Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "return-client-request-id")); + Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "x-ms-client-request-id")); + } + + var generator = MockHelpers.LoadMockGenerator( + clients: () => [inputClient], + visitors: () => [visitor]); + var client = generator.Object.OutputLibrary.TypeProviders.OfType().First(); + + // Verify special headers are removed from both methods + foreach (var serviceMethod in serviceMethods) + { + var methodCollection = client.GetMethodCollectionByOperation(serviceMethod.Operation); + visitor.InvokePreVisit(serviceMethod, client, methodCollection); + } + + foreach (var serviceMethod in serviceMethods) + { + var restClientMethod = client.RestClient.Methods.First(m => m.Signature.Name == $"Create{serviceMethod.Name}Request"); + + visitor.InvokeVisit((restClientMethod as ScmMethodProvider)!); + Assert.AreEqual(1, serviceMethod.Parameters.Count); + Assert.IsFalse(serviceMethod.Parameters.Any(p => p.SerializedName == "return-client-request-id")); + Assert.IsFalse(serviceMethod.Parameters.Any(p => p.SerializedName == "x-ms-client-request-id")); + Assert.IsTrue(serviceMethod.Parameters.Any(p => p.SerializedName == "some-other-parameter")); + + // Verify x-ms-client-request-id is added back in method body if specified + Assert.AreEqual(addBackXMsClientRequestId, restClientMethod.BodyStatements!.ToDisplayString().Contains("request.Headers.SetValue(\"x-ms-client-request-id\", request.ClientRequestId);")); + } } [Test] @@ -76,13 +105,17 @@ public void DoesNotChangeParametersWhenNoSpecialHeaders() operation, parameters: methodParameters, response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + var generator = MockHelpers.LoadMockGenerator(clients: () => [inputClient]); + var client = generator.Object.OutputLibrary.TypeProviders.OfType().First(); + var methodCollection = client.GetMethodCollectionByOperation(operation); // Verify initial state Assert.AreEqual(1, serviceMethod.Parameters.Count); var originalParameter = serviceMethod.Parameters[0]; // Act - visitor.InvokeRemoveSpecialHeaders(serviceMethod); + visitor.InvokePreVisit(serviceMethod, client, methodCollection); // Verify no changes Assert.AreEqual(1, serviceMethod.Parameters.Count); @@ -136,19 +169,18 @@ private static List CreateHttpParameters() private class TestSpecialHeadersVisitor : SpecialHeadersVisitor { - public void InvokeRemoveSpecialHeaders(InputServiceMethod serviceMethod) + public TestSpecialHeadersVisitor(bool addBackXMsClientRequestId = false) + : base(addBackXMsClientRequestId) + { + } + public void InvokePreVisit(InputServiceMethod serviceMethod, ClientProvider client, ScmMethodProviderCollection methods) + { + base.Visit(serviceMethod, client, methods); + } + + public void InvokeVisit(ScmMethodProvider method) { - // Simulate the core logic of removing special headers - var returnClientRequestIdParameter = - serviceMethod.Parameters.FirstOrDefault(p => p.SerializedName == "return-client-request-id"); - var xMsClientRequestIdParameter = - serviceMethod.Parameters.FirstOrDefault(p => p.SerializedName == "x-ms-client-request-id"); - - if (returnClientRequestIdParameter != null || xMsClientRequestIdParameter != null) - { - serviceMethod.Update(parameters: [.. serviceMethod.Parameters.Where(p => p.SerializedName != "return-client-request-id" && p.SerializedName != "x-ms-client-request-id")]); - serviceMethod.Operation.Update(parameters: [.. serviceMethod.Operation.Parameters.Where(p => p.SerializedName != "return-client-request-id" && p.SerializedName != "x-ms-client-request-id")]); - } + base.VisitMethod(method); } } } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/AddsFromLroResponseMethodAndRemovesExplicitOperatorForLroOnlyModel.cs similarity index 64% rename from eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs rename to eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/AddsFromLroResponseMethodAndRemovesExplicitOperatorForLroOnlyModel.cs index 4ff5ad43b964..7a4f46383255 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/AddsFromLroResponseMethodAndRemovesExplicitOperatorForLroOnlyModel.cs @@ -1,2 +1,2 @@ -using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(response.Content); +using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(response.Content, global::Samples.ModelSerializationExtensions.JsonDocumentOptions); return global::Samples.Models.Foo.DeserializeFoo(document.RootElement.GetProperty("someResultPath"), global::Samples.ModelSerializationExtensions.WireOptions); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/SystemTextJsonConverterVisitorTests/ConverterModelE2E.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/SystemTextJsonConverterVisitorTests/ConverterModelE2E.cs index f90937101ae7..ac64a7224d0c 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/SystemTextJsonConverterVisitorTests/ConverterModelE2E.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/SystemTextJsonConverterVisitorTests/ConverterModelE2E.cs @@ -128,7 +128,7 @@ protected virtual void JsonModelWriteCore(global::System.Text.Json.Utf8JsonWrite switch (format) { case "J": - using (global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(data)) + using (global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(data, global::Samples.ModelSerializationExtensions.JsonDocumentOptions)) { return global::Samples.Models.TestModel.DeserializeTestModel(document.RootElement, options); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/FriendModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/FriendModel.Serialization.cs index 6d4293fc7890..90a408be7cdb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/FriendModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/FriendModel.Serialization.cs @@ -129,7 +129,7 @@ protected virtual FriendModel PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFriendModel(document.RootElement, options); } @@ -156,7 +156,7 @@ public static implicit operator RequestContent(FriendModel friendModel) /// The to deserialize the from. public static explicit operator FriendModel(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeFriendModel(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/CodeGenSerializationAttribute.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/CodeGenSerializationAttribute.cs index 63d17a6080dc..8f82aac0e4ea 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenHeaderResponseResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenHeaderResponseResponse.Serialization.cs index 421456449737..c36fbe3d8b96 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenHeaderResponseResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenHeaderResponseResponse.Serialization.cs @@ -138,7 +138,7 @@ protected virtual ListWithContinuationTokenHeaderResponseResponse PersistableMod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeListWithContinuationTokenHeaderResponseResponse(document.RootElement, options); } @@ -153,7 +153,7 @@ protected virtual ListWithContinuationTokenHeaderResponseResponse PersistableMod /// The to deserialize the from. public static explicit operator ListWithContinuationTokenHeaderResponseResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeListWithContinuationTokenHeaderResponseResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenResponse.Serialization.cs index 69ad9849aa73..d8d093c05f27 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithContinuationTokenResponse.Serialization.cs @@ -149,7 +149,7 @@ protected virtual ListWithContinuationTokenResponse PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeListWithContinuationTokenResponse(document.RootElement, options); } @@ -164,7 +164,7 @@ protected virtual ListWithContinuationTokenResponse PersistableModelCreateCore(B /// The to deserialize the from. public static explicit operator ListWithContinuationTokenResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeListWithContinuationTokenResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithHeaderNextLinkResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithHeaderNextLinkResponse.Serialization.cs index de4a8f5a4c4b..b854c8ff733c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithHeaderNextLinkResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithHeaderNextLinkResponse.Serialization.cs @@ -138,7 +138,7 @@ protected virtual ListWithHeaderNextLinkResponse PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeListWithHeaderNextLinkResponse(document.RootElement, options); } @@ -153,7 +153,7 @@ protected virtual ListWithHeaderNextLinkResponse PersistableModelCreateCore(Bina /// The to deserialize the from. public static explicit operator ListWithHeaderNextLinkResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeListWithHeaderNextLinkResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithNextLinkResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithNextLinkResponse.Serialization.cs index ab9a8f44fc21..3cd929058222 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithNextLinkResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithNextLinkResponse.Serialization.cs @@ -153,7 +153,7 @@ protected virtual ListWithNextLinkResponse PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeListWithNextLinkResponse(document.RootElement, options); } @@ -168,7 +168,7 @@ protected virtual ListWithNextLinkResponse PersistableModelCreateCore(BinaryData /// The to deserialize the from. public static explicit operator ListWithNextLinkResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeListWithNextLinkResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithStringNextLinkResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithStringNextLinkResponse.Serialization.cs index abd04650b039..66542b988e3f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithStringNextLinkResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ListWithStringNextLinkResponse.Serialization.cs @@ -149,7 +149,7 @@ protected virtual ListWithStringNextLinkResponse PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeListWithStringNextLinkResponse(document.RootElement, options); } @@ -164,7 +164,7 @@ protected virtual ListWithStringNextLinkResponse PersistableModelCreateCore(Bina /// The to deserialize the from. public static explicit operator ListWithStringNextLinkResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeListWithStringNextLinkResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ModelWithRequiredNullableProperties.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ModelWithRequiredNullableProperties.Serialization.cs index 6ea98d4ea35f..4e627423c903 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ModelWithRequiredNullableProperties.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ModelWithRequiredNullableProperties.Serialization.cs @@ -179,7 +179,7 @@ protected virtual ModelWithRequiredNullableProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeModelWithRequiredNullableProperties(document.RootElement, options); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PageThingModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PageThingModel.Serialization.cs index 55a872aebac3..c62f90500cb8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PageThingModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/PageThingModel.Serialization.cs @@ -138,7 +138,7 @@ protected virtual PageThingModel PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePageThingModel(document.RootElement, options); } @@ -153,7 +153,7 @@ protected virtual PageThingModel PersistableModelCreateCore(BinaryData data, Mod /// The to deserialize the from. public static explicit operator PageThingModel(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePageThingModel(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RenamedModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RenamedModel.Serialization.cs index db35daac038d..50cc0c3c389f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RenamedModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RenamedModel.Serialization.cs @@ -129,7 +129,7 @@ protected virtual RenamedModel PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRenamedModel(document.RootElement, options); } @@ -156,7 +156,7 @@ public static implicit operator RequestContent(RenamedModel renamedModel) /// The to deserialize the from. public static explicit operator RenamedModel(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRenamedModel(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ReturnsAnonymousModelResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ReturnsAnonymousModelResponse.Serialization.cs index 815811c648e3..6995958cb4d5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ReturnsAnonymousModelResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ReturnsAnonymousModelResponse.Serialization.cs @@ -115,7 +115,7 @@ protected virtual ReturnsAnonymousModelResponse PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReturnsAnonymousModelResponse(document.RootElement, options); } @@ -130,7 +130,7 @@ protected virtual ReturnsAnonymousModelResponse PersistableModelCreateCore(Binar /// The to deserialize the from. public static explicit operator ReturnsAnonymousModelResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeReturnsAnonymousModelResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RoundTripModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RoundTripModel.Serialization.cs index 869259e02bcc..eba1335ce7fb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RoundTripModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/RoundTripModel.Serialization.cs @@ -636,7 +636,7 @@ protected virtual RoundTripModel PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoundTripModel(document.RootElement, options); } @@ -663,7 +663,7 @@ public static implicit operator RequestContent(RoundTripModel roundTripModel) /// The to deserialize the from. public static explicit operator RoundTripModel(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRoundTripModel(document.RootElement, ModelSerializationExtensions.WireOptions); } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ThingModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ThingModel.Serialization.cs index d75cd96f3d00..6c174768a539 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ThingModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/ThingModel.Serialization.cs @@ -313,7 +313,7 @@ protected virtual ThingModel PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeThingModel(document.RootElement, options); } @@ -340,7 +340,7 @@ public static implicit operator RequestContent(ThingModel thingModel) /// The to deserialize the from. public static explicit operator ThingModel(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeThingModel(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json index b8b17b1614cc..df39751332fd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json @@ -6977,6 +6977,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.basicTypeSpecUrl" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Access/AccessTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Access/AccessTests.cs index dfb2fc981f5e..282c94f64405 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Access/AccessTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Access/AccessTests.cs @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using _Specs_.Azure.ClientGenerator.Core.Access; +using Specs.Azure.ClientGenerator.Core.Access; using Azure; using NUnit.Framework; using System.Reflection; using System.Threading; using System.Threading.Tasks; -using _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._InternalOperation; +using Specs.Azure.ClientGenerator.Core.Access._PublicOperation; +using Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation; namespace TestProjects.Spector.Tests.Http.Azure.ClientGeneratorCore.Access { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/ClientLocation/ClientLocationTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/ClientLocation/ClientLocationTests.cs index 33e02104a642..1ee7861eeb7d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/ClientLocation/ClientLocationTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/ClientLocation/ClientLocationTests.cs @@ -3,7 +3,7 @@ using NUnit.Framework; using System.Threading.Tasks; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation; +using Specs.Azure.ClientGenerator.Core.ClientLocation; namespace TestProjects.Spector.Tests.Http.Azure.ClientGeneratorCore.ClientLocation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/HierarchyBuilding/HierarchyBuildingTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/HierarchyBuilding/HierarchyBuildingTests.cs index b8a41d352010..bb3cd85122c0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/HierarchyBuilding/HierarchyBuildingTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/HierarchyBuilding/HierarchyBuildingTests.cs @@ -3,7 +3,7 @@ using NUnit.Framework; using System.Threading.Tasks; -using _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding; +using Specs.Azure.ClientGenerator.Core.HierarchyBuilding; namespace TestProjects.Spector.Tests.Http.Azure.ClientGeneratorCore.HierarchyBuilding { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Usage/UsageTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Usage/UsageTests.cs index dbe39265d154..77688aba35ad 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Usage/UsageTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/ClientGeneratorCore/Usage/UsageTests.cs @@ -3,8 +3,8 @@ using System; using System.Threading.Tasks; -using _Specs_.Azure.ClientGenerator.Core.Usage; -using _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation; +using Specs.Azure.ClientGenerator.Core.Usage; +using Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation; using NUnit.Framework; namespace TestProjects.Spector.Tests.Http.Azure.ClientGeneratorCore.Usage diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Basic/BasicTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Basic/BasicTests.cs index 9e35b381c9d1..366c80327624 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Basic/BasicTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Basic/BasicTests.cs @@ -6,7 +6,7 @@ using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; -using _Specs_.Azure.Core.Basic; +using Specs.Azure.Core.Basic; using Azure; using Azure.Core; using NUnit.Framework; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs index 918a862760e1..efe54e2176a6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Threading.Tasks; -using _Specs_.Azure.Core.Lro.Rpc; +using Specs.Azure.Core.Lro.Rpc; using Azure; using NUnit.Framework; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs index fe4811c6ffdf..c1aa6b58974e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs @@ -3,7 +3,7 @@ using System.Net; using System.Threading.Tasks; -using _Specs_.Azure.Core.Lro.Standard; +using Specs.Azure.Core.Lro.Standard; using Azure; using NUnit.Framework; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Model/CoreModelTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Model/CoreModelTests.cs index 51c361c267ea..1808e1d2fc03 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Model/CoreModelTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Model/CoreModelTests.cs @@ -3,7 +3,7 @@ using System; using System.Threading.Tasks; -using _Specs_.Azure.Core.Model; +using Specs.Azure.Core.Model; using NUnit.Framework; namespace TestProjects.Spector.Tests.Http.Azure.Core.Model diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Page/PageTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Page/PageTests.cs index 624a671e956e..36c6b254690e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Page/PageTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Page/PageTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Threading.Tasks; -using _Specs_.Azure.Core.Page; +using Specs.Azure.Core.Page; using NUnit.Framework; namespace TestProjects.Spector.Tests.Http.Azure.Core.Page diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Scalar/ScalarTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Scalar/ScalarTests.cs index d23a0ab085e1..bf3537bfd3ed 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Scalar/ScalarTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Scalar/ScalarTests.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using System.Threading.Tasks; -using _Specs_.Azure.Core.Scalar; +using Specs.Azure.Core.Scalar; using Azure.Core; using NUnit.Framework; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Traits/TraitsTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Traits/TraitsTests.cs index d1dc241c2eec..2065738371f0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Traits/TraitsTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Traits/TraitsTests.cs @@ -4,7 +4,7 @@ using System; using System.Threading; using System.Threading.Tasks; -using _Specs_.Azure.Core.Traits; +using Specs.Azure.Core.Traits; using Azure; using NUnit.Framework; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Encode/Duration/DurationTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Encode/Duration/DurationTests.cs index fa5564b6b231..0aa1a832ade8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Encode/Duration/DurationTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Encode/Duration/DurationTests.cs @@ -3,7 +3,7 @@ using System; using System.Threading.Tasks; -using _Specs_.Azure.Encode.Duration; +using Specs.Azure.Encode.Duration; using NUnit.Framework; namespace TestProjects.Spector.Tests.Http.Azure.Encode.Duration diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json index 7e4740526c63..b626ce960b4e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json @@ -160,6 +160,7 @@ "crossLanguageDefinitionId": "Authentication.ApiKey.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Authentication.ApiKey", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json index 23c4c99c538f..6f358b85bbe5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json @@ -160,6 +160,7 @@ "crossLanguageDefinitionId": "Authentication.Http.Custom.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Authentication.Http.Custom", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json index 8b08aeb79268..5b2a5968dab7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json @@ -160,6 +160,7 @@ "crossLanguageDefinitionId": "Authentication.OAuth2.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Authentication.OAuth2", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json index 5789d22af4b2..eae391acb19c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json @@ -123,6 +123,7 @@ "crossLanguageDefinitionId": "Authentication.Union.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Authentication.Union", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.Serialization.cs index dacff144a30a..93743677fa6c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { [PersistableModelProxy(typeof(UnknownAbstractModel))] public abstract partial class AbstractModel : IJsonModel diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.cs index 31d66aa7cf7d..5a8b4210e2be 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AbstractModel.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public abstract partial class AbstractModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClient.cs index 2db8749acf64..08f2a5cd692b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClient.cs @@ -7,12 +7,12 @@ using System; using Azure.Core.Pipeline; -using _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._InternalOperation; +using Specs.Azure.ClientGenerator.Core.Access._PublicOperation; +using Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Access +namespace Specs.Azure.ClientGenerator.Core.Access { public partial class AccessClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClientOptions.cs index 0831517d65a5..7ffd998fbbf4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/AccessClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.Access +namespace Specs.Azure.ClientGenerator.Core.Access { public partial class AccessClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.Serialization.cs index 6cdf9dca65e8..078529472f91 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class BaseModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.cs index b3883030a022..8c459db6dc58 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/BaseModel.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class BaseModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.Serialization.cs index 2d689e446fca..6b7b86e523b6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class InnerModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.cs index 8e7c7084ac96..a1c3c3f9498b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InnerModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class InnerModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InternalOperation.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InternalOperation.cs index c1bb72e82a99..804ebb0e147d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InternalOperation.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/InternalOperation.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation +namespace Specs.Azure.ClientGenerator.Core.Access._InternalOperation { public partial class InternalOperation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/_Specs_AzureClientGeneratorCoreAccessContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/SpecsAzureClientGeneratorCoreAccessContext.cs similarity index 67% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/_Specs_AzureClientGeneratorCoreAccessContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/SpecsAzureClientGeneratorCoreAccessContext.cs index 206086a43961..ffc2f3fc115b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/_Specs_AzureClientGeneratorCoreAccessContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/Models/SpecsAzureClientGeneratorCoreAccessContext.cs @@ -6,25 +6,25 @@ #nullable disable using System.ClientModel.Primitives; -using _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._InternalOperation; +using Specs.Azure.ClientGenerator.Core.Access._PublicOperation; +using Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Access +namespace Specs.Azure.ClientGenerator.Core.Access { + [ModelReaderWriterBuildable(typeof(NoDecoratorModelInInternal))] + [ModelReaderWriterBuildable(typeof(PublicDecoratorModelInInternal))] + [ModelReaderWriterBuildable(typeof(NoDecoratorModelInPublic))] + [ModelReaderWriterBuildable(typeof(PublicDecoratorModelInPublic))] [ModelReaderWriterBuildable(typeof(AbstractModel))] [ModelReaderWriterBuildable(typeof(BaseModel))] [ModelReaderWriterBuildable(typeof(InnerModel))] - [ModelReaderWriterBuildable(typeof(NoDecoratorModelInInternal))] - [ModelReaderWriterBuildable(typeof(NoDecoratorModelInPublic))] [ModelReaderWriterBuildable(typeof(OuterModel))] - [ModelReaderWriterBuildable(typeof(PublicDecoratorModelInInternal))] - [ModelReaderWriterBuildable(typeof(PublicDecoratorModelInPublic))] [ModelReaderWriterBuildable(typeof(RealModel))] - [ModelReaderWriterBuildable(typeof(SharedModel))] [ModelReaderWriterBuildable(typeof(UnknownAbstractModel))] - public partial class _Specs_AzureClientGeneratorCoreAccessContext : ModelReaderWriterContext + [ModelReaderWriterBuildable(typeof(SharedModel))] + public partial class SpecsAzureClientGeneratorCoreAccessContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.Serialization.cs index c669583fe937..9c61210c28ec 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation +namespace Specs.Azure.ClientGenerator.Core.Access._InternalOperation { public partial class NoDecoratorModelInInternal : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.cs index ff0412e8a01f..c4d3a4449534 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInInternal.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation +namespace Specs.Azure.ClientGenerator.Core.Access._InternalOperation { public partial class NoDecoratorModelInInternal { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.Serialization.cs index 40573b731f00..5ca6767b4230 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation +namespace Specs.Azure.ClientGenerator.Core.Access._PublicOperation { public partial class NoDecoratorModelInPublic : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.cs index 8d37ecc19d8b..ff263ab84966 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/NoDecoratorModelInPublic.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation +namespace Specs.Azure.ClientGenerator.Core.Access._PublicOperation { public partial class NoDecoratorModelInPublic { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.Serialization.cs index 41a7730f1d6b..55aa0ad97641 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class OuterModel : BaseModel, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.cs index ee7dd8fe8dde..ac1de4b6486d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/OuterModel.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class OuterModel : BaseModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.Serialization.cs index 1276cdc0f68f..0f1eeecf7c2e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation +namespace Specs.Azure.ClientGenerator.Core.Access._InternalOperation { public partial class PublicDecoratorModelInInternal : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.cs index f52b5867d05b..b4f9ee653d11 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInInternal.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation +namespace Specs.Azure.ClientGenerator.Core.Access._InternalOperation { public partial class PublicDecoratorModelInInternal { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.Serialization.cs index b22ffc4433f5..5148078cc664 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation +namespace Specs.Azure.ClientGenerator.Core.Access._PublicOperation { public partial class PublicDecoratorModelInPublic : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.cs index 90866211247b..ce4f051271e9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicDecoratorModelInPublic.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation +namespace Specs.Azure.ClientGenerator.Core.Access._PublicOperation { public partial class PublicDecoratorModelInPublic { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicOperation.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicOperation.cs index 4d6bc2b85657..77373e265dc7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicOperation.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/PublicOperation.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation +namespace Specs.Azure.ClientGenerator.Core.Access._PublicOperation { public partial class PublicOperation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.Serialization.cs index 9ffdb5d8669b..d876eb47d1c6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class RealModel : AbstractModel, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.cs index 0714783f4039..2538e4b041b3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RealModel.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class RealModel : AbstractModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RelativeModelInOperation.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RelativeModelInOperation.cs index ec0c382294dc..92a80a8fb4d5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RelativeModelInOperation.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/RelativeModelInOperation.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { public partial class RelativeModelInOperation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.Serialization.cs index 8477c7201139..871938e8a31a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation { public partial class SharedModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.cs index ffa530ed5dca..e5e71334f4ee 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation { public partial class SharedModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModelInOperation.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModelInOperation.cs index 7a3ab260aa0d..8e3ed3cac6d6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModelInOperation.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/SharedModelInOperation.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation { public partial class SharedModelInOperation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.Serialization.cs index fde6c4050057..09326c034669 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { internal partial class UnknownAbstractModel : AbstractModel, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.cs index 7f44dfb54624..0b3f0c1fd44d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/UnknownAbstractModel.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation { internal partial class UnknownAbstractModel : AbstractModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessClientBuilderExtensions.cs index 59759ae6f478..caefa20121cf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.Access; +using Specs.Azure.ClientGenerator.Core.Access; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessModelFactory.cs index f1e924dcf183..e6ef7450789f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/Generated/_Specs_AzureClientGeneratorCoreAccessModelFactory.cs @@ -5,12 +5,12 @@ #nullable disable -using _Specs_.Azure.ClientGenerator.Core.Access._InternalOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._PublicOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; -using _Specs_.Azure.ClientGenerator.Core.Access._SharedModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._InternalOperation; +using Specs.Azure.ClientGenerator.Core.Access._PublicOperation; +using Specs.Azure.ClientGenerator.Core.Access._RelativeModelInOperation; +using Specs.Azure.ClientGenerator.Core.Access._SharedModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Access +namespace Specs.Azure.ClientGenerator.Core.Access { public static partial class _Specs_AzureClientGeneratorCoreAccessModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/_Specs_.Azure.ClientGenerator.Core.Access.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/_Specs_.Azure.ClientGenerator.Core.Access.csproj index 91f88950dfa6..4e2498c1154f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/_Specs_.Azure.ClientGenerator.Core.Access.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/src/_Specs_.Azure.ClientGenerator.Core.Access.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.Access client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.Access 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.Access + Specs.Azure.ClientGenerator.Core.Access true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/tspCodeModel.json index 92d2f722edf6..30e7c42e1f9b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/access/tspCodeModel.json @@ -649,6 +649,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access", "apiVersions": [], @@ -938,6 +939,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation", "apiVersions": [], @@ -1353,6 +1355,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.InternalOperation", "apiVersions": [], @@ -1645,6 +1648,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation", "apiVersions": [], @@ -1941,6 +1945,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Access.RelativeModelInOperation", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionPathContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionHeaderContext.cs similarity index 53% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionPathContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionHeaderContext.cs index 7c57c8c9f4e8..bc7771bb3835 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionPathContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionHeaderContext.cs @@ -7,9 +7,9 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.ClientGenerator.Core.ApiVersion.Path +namespace Specs.Azure.ClientGenerator.Core.ApiVersion.Header { - public partial class _Specs_AzureClientGeneratorCoreApiVersionPathContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreApiVersionHeaderContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj index 06b12fb2519a..b413306f639e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.ApiVersion.Header client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.ApiVersion.Header 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.ApiVersion.Header + Specs.Azure.ClientGenerator.Core.ApiVersion.Header true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/tspCodeModel.json index e5848c6620ac..c9501119a5ed 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/tspCodeModel.json @@ -151,8 +151,39 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Header.endpoint" + }, + { + "$id": "13", + "kind": "method", + "name": "version", + "serializedName": "version", + "type": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Header.headerApiVersion.version", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Header", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionQueryContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionPathContext.cs similarity index 53% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionQueryContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionPathContext.cs index 991534dd4c04..68685a62130c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionQueryContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionPathContext.cs @@ -7,9 +7,9 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.ClientGenerator.Core.ApiVersion.Query +namespace Specs.Azure.ClientGenerator.Core.ApiVersion.Path { - public partial class _Specs_AzureClientGeneratorCoreApiVersionQueryContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreApiVersionPathContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Path.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Path.csproj index a2f1f69ac6ff..eaf7f515c0eb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Path.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Path.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.ApiVersion.Path client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.ApiVersion.Path 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.ApiVersion.Path + Specs.Azure.ClientGenerator.Core.ApiVersion.Path true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/tspCodeModel.json index a34fc1f01076..85c600f91161 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/path/tspCodeModel.json @@ -154,8 +154,39 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Path.endpoint" + }, + { + "$id": "13", + "kind": "method", + "name": "version", + "serializedName": "version", + "type": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Path.pathApiVersion.version", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Path", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionHeaderContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionQueryContext.cs similarity index 53% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionHeaderContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionQueryContext.cs index db587aa0dd96..1d960a9927d7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/Generated/Models/_Specs_AzureClientGeneratorCoreApiVersionHeaderContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/Generated/Models/SpecsAzureClientGeneratorCoreApiVersionQueryContext.cs @@ -7,9 +7,9 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.ClientGenerator.Core.ApiVersion.Header +namespace Specs.Azure.ClientGenerator.Core.ApiVersion.Query { - public partial class _Specs_AzureClientGeneratorCoreApiVersionHeaderContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreApiVersionQueryContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Query.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Query.csproj index f8b04cddec4a..8a2cfe4752e3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Query.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Query.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.ApiVersion.Query client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.ApiVersion.Query 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.ApiVersion.Query + Specs.Azure.ClientGenerator.Core.ApiVersion.Query true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/tspCodeModel.json index 62ba7720f453..f63fcd73c812 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/query/tspCodeModel.json @@ -151,8 +151,39 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Query.endpoint" + }, + { + "$id": "13", + "kind": "method", + "name": "version", + "serializedName": "version", + "type": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Query.queryApiVersion.version", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.AlternateApiVersion.Service.Query", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ArchiveOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ArchiveOperations.cs index dc783c8524c3..2ecb7843f443 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ArchiveOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ArchiveOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation +namespace Specs.Azure.ClientGenerator.Core.ClientLocation { public partial class ArchiveOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.Serialization.cs index 608714aecb76..af4c630dea9d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient { public partial class Blob : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.cs index a7cb0fcb7fc3..d9fcd0f39bc8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Blob.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient { public partial class Blob { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClient.cs index d0390aa21996..875a0663b8bc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClient.cs @@ -10,12 +10,12 @@ using System.Threading.Tasks; using Azure; using Azure.Core.Pipeline; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation +namespace Specs.Azure.ClientGenerator.Core.ClientLocation { public partial class ClientLocationClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClientOptions.cs index 9db94110908b..f42a94372e09 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/ClientLocationClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation +namespace Specs.Azure.ClientGenerator.Core.ClientLocation { public partial class ClientLocationClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/SpecsAzureClientGeneratorCoreClientLocationContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/SpecsAzureClientGeneratorCoreClientLocationContext.cs new file mode 100644 index 000000000000..9e5b416ce90e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/SpecsAzureClientGeneratorCoreClientLocationContext.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; + +namespace Specs.Azure.ClientGenerator.Core.ClientLocation +{ + [ModelReaderWriterBuildable(typeof(Blob))] + public partial class SpecsAzureClientGeneratorCoreClientLocationContext : ModelReaderWriterContext + { + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/_Specs_AzureClientGeneratorCoreClientLocationContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/_Specs_AzureClientGeneratorCoreClientLocationContext.cs deleted file mode 100644 index 961b9c27c685..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/Models/_Specs_AzureClientGeneratorCoreClientLocationContext.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; - -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation -{ - [ModelReaderWriterBuildable(typeof(Blob))] - public partial class _Specs_AzureClientGeneratorCoreClientLocationContext : ModelReaderWriterContext - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClient.cs index a31b706b3772..232d2eaca235 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClient.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient { public partial class MoveMethodParameterToClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClientBlobOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClientBlobOperations.cs index 20f0034b9279..398c2ee86c39 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClientBlobOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveMethodParameterToClientBlobOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient { public partial class MoveMethodParameterToClientBlobOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClient.cs index 0a8986158b2b..5db7ddf06622 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClient.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient { public partial class MoveToExistingSubClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientAdminOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientAdminOperations.cs index 0ed522c57799..a52b41a65641 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientAdminOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientAdminOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient { public partial class MoveToExistingSubClientAdminOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientUserOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientUserOperations.cs index 3216bc4b2845..ca9d4d5616df 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientUserOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToExistingSubClientUserOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToExistingSubClient { public partial class MoveToExistingSubClientUserOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClient.cs index 1478e7ed71a1..f4fd70f7bf66 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClient.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient { public partial class MoveToNewSubClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClientProductOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClientProductOperations.cs index 76651a2eaf30..efbaaadff22e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClientProductOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToNewSubClientProductOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToNewSubClient { public partial class MoveToNewSubClientProductOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClient.cs index 1dca9ddc38d4..8a22bc7b16a3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClient.cs @@ -7,7 +7,7 @@ using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient { public partial class MoveToRootClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClientResourceOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClientResourceOperations.cs index 304195ee2090..744a55573e65 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClientResourceOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/MoveToRootClientResourceOperations.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient +namespace Specs.Azure.ClientGenerator.Core.ClientLocation._MoveToRootClient { public partial class MoveToRootClientResourceOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationClientBuilderExtensions.cs index ea0cb1e3951a..443a53007a9b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.ClientLocation; +using Specs.Azure.ClientGenerator.Core.ClientLocation; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationModelFactory.cs index c6dbcaf21d2e..0101d9cd812f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/Generated/_Specs_AzureClientGeneratorCoreClientLocationModelFactory.cs @@ -5,9 +5,9 @@ #nullable disable -using _Specs_.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; +using Specs.Azure.ClientGenerator.Core.ClientLocation._MoveMethodParameterToClient; -namespace _Specs_.Azure.ClientGenerator.Core.ClientLocation +namespace Specs.Azure.ClientGenerator.Core.ClientLocation { public static partial class _Specs_AzureClientGeneratorCoreClientLocationModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/_Specs_.Azure.ClientGenerator.Core.ClientLocation.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/_Specs_.Azure.ClientGenerator.Core.ClientLocation.csproj index aedb16bfeede..e9831b4687fe 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/_Specs_.Azure.ClientGenerator.Core.ClientLocation.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/src/_Specs_.Azure.ClientGenerator.Core.ClientLocation.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.ClientLocation client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.ClientLocation 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.ClientLocation + Specs.Azure.ClientGenerator.Core.ClientLocation true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/tspCodeModel.json index 33d07a93f581..62d2efd38bcf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/client-location/tspCodeModel.json @@ -211,6 +211,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "apiVersions": [], @@ -253,6 +254,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "apiVersions": [], @@ -373,6 +375,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations", "apiVersions": [], @@ -456,6 +459,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations", "apiVersions": [], @@ -503,6 +507,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient", "apiVersions": [], @@ -586,6 +591,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations", "apiVersions": [], @@ -633,6 +639,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient", "apiVersions": [], @@ -716,6 +723,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations", "apiVersions": [], @@ -761,8 +769,30 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" + }, + { + "$id": "60", + "kind": "method", + "name": "storageAccount", + "serializedName": "storageAccount", + "type": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.getBlob.Parameter.anonymous.storageAccount", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", "apiVersions": [], @@ -771,30 +801,30 @@ }, "children": [ { - "$id": "60", + "$id": "62", "kind": "client", "name": "BlobOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", "methods": [ { - "$id": "61", + "$id": "63", "kind": "basic", "name": "getBlob", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "62", + "$id": "64", "name": "getBlob", "resourceName": "BlobOperations", "accessibility": "public", "parameters": [ { - "$id": "63", + "$id": "65", "kind": "query", "name": "storageAccount", "serializedName": "storageAccount", "type": { - "$id": "64", + "$id": "66", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -809,12 +839,12 @@ "readOnly": false }, { - "$id": "65", + "$id": "67", "kind": "query", "name": "container", "serializedName": "container", "type": { - "$id": "66", + "$id": "68", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -829,12 +859,12 @@ "readOnly": false }, { - "$id": "67", + "$id": "69", "kind": "query", "name": "blob", "serializedName": "blob", "type": { - "$id": "68", + "$id": "70", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -849,7 +879,7 @@ "readOnly": false }, { - "$id": "69", + "$id": "71", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -891,12 +921,12 @@ }, "parameters": [ { - "$id": "70", + "$id": "72", "kind": "method", "name": "container", "serializedName": "container", "type": { - "$id": "71", + "$id": "73", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -912,12 +942,12 @@ "decorators": [] }, { - "$id": "72", + "$id": "74", "kind": "method", "name": "blob", "serializedName": "blob", "type": { - "$id": "73", + "$id": "75", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -933,7 +963,7 @@ "decorators": [] }, { - "$id": "74", + "$id": "76", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -963,13 +993,13 @@ ], "parameters": [ { - "$id": "75", + "$id": "77", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "76", + "$id": "78", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -980,7 +1010,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "77", + "$id": "79", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -991,8 +1021,12 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" + }, + { + "$ref": "60" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations", "apiVersions": [], @@ -1003,19 +1037,19 @@ ] }, { - "$id": "78", + "$id": "80", "kind": "client", "name": "ArchiveOperations", "namespace": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "methods": [ { - "$id": "79", + "$id": "81", "kind": "basic", "name": "archiveProduct", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "80", + "$id": "82", "name": "archiveProduct", "resourceName": "ProductOperations", "accessibility": "public", @@ -1048,13 +1082,13 @@ ], "parameters": [ { - "$id": "81", + "$id": "83", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "82", + "$id": "84", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1065,7 +1099,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "83", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1078,6 +1112,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.Serialization.cs index 605bec0b015c..1d2ae9247c8a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class ChildFlattenModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.cs index 9118a2ab4cd2..18de03118bfa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildFlattenModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class ChildFlattenModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.Serialization.cs index b0a6f3a515dc..26a165bd6d96 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class ChildModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.cs index eeffbff42d25..ec5add11552e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/ChildModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class ChildModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.Serialization.cs index 5e0986e21799..fae1164c84c4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class FlattenModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.cs index f3e86bbf8792..616bea82a482 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class FlattenModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClient.cs index 2f000ea78fa3..e31f151fb8af 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class FlattenPropertyClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClientOptions.cs index e618f9bef0ae..38db1e0b7f98 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class FlattenPropertyClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/_Specs_AzureClientGeneratorCoreFlattenPropertyContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/SpecsAzureClientGeneratorCoreFlattenPropertyContext.cs similarity index 71% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/_Specs_AzureClientGeneratorCoreFlattenPropertyContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/SpecsAzureClientGeneratorCoreFlattenPropertyContext.cs index fec8b3b9c362..20d68fc1c980 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/_Specs_AzureClientGeneratorCoreFlattenPropertyContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/SpecsAzureClientGeneratorCoreFlattenPropertyContext.cs @@ -7,13 +7,13 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { [ModelReaderWriterBuildable(typeof(ChildFlattenModel))] [ModelReaderWriterBuildable(typeof(ChildModel))] [ModelReaderWriterBuildable(typeof(FlattenModel))] [ModelReaderWriterBuildable(typeof(NestedFlattenModel))] - public partial class _Specs_AzureClientGeneratorCoreFlattenPropertyContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreFlattenPropertyContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.Serialization.cs index a0d30782bb6b..f7e2464308d2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class NestedFlattenModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.cs index a170ff984fa3..ae430213eab3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/NestedFlattenModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public partial class NestedFlattenModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyClientBuilderExtensions.cs index 3e80c8786d8c..b9d916e3e7e0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.FlattenProperty; +using Specs.Azure.ClientGenerator.Core.FlattenProperty; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyModelFactory.cs index 13600758edb4..7fa3fb3232f4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/_Specs_AzureClientGeneratorCoreFlattenPropertyModelFactory.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.FlattenProperty +namespace Specs.Azure.ClientGenerator.Core.FlattenProperty { public static partial class _Specs_AzureClientGeneratorCoreFlattenPropertyModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj index a78e4ff38ec1..1d704451ea9b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.FlattenProperty client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.FlattenProperty 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.FlattenProperty + Specs.Azure.ClientGenerator.Core.FlattenProperty true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json index 3ee8981d7e5c..35cc086381a3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json @@ -659,6 +659,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.Serialization.cs index 2c0f1b550b9b..d090fcddc1aa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { [PersistableModelProxy(typeof(UnknownAnimal))] public abstract partial class Animal : IJsonModel diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.cs index 701ed2c9877f..792aef9fa050 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Animal.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public abstract partial class Animal { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/AnimalOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/AnimalOperations.cs index 0f5980f52f90..4b54ef11a981 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/AnimalOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/AnimalOperations.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class AnimalOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.Serialization.cs index 62767dddbe5c..77cec09436bf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class Dog : Pet, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.cs index 9aaf6f836614..b44d3960eefd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Dog.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class Dog : Pet { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/DogOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/DogOperations.cs index fe7cb83e932a..af44ef00859e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/DogOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/DogOperations.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class DogOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClient.cs index 6465133f9225..c041b12244eb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClient.cs @@ -8,7 +8,7 @@ using System; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class HierarchyBuildingClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClientOptions.cs index 89eed6b32656..77b458870909 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/HierarchyBuildingClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class HierarchyBuildingClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/_Specs_AzureClientGeneratorCoreHierarchyBuildingContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/SpecsAzureClientGeneratorCoreHierarchyBuildingContext.cs similarity index 72% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/_Specs_AzureClientGeneratorCoreHierarchyBuildingContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/SpecsAzureClientGeneratorCoreHierarchyBuildingContext.cs index 9cfe42b0e6e3..248b0c1e5875 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/_Specs_AzureClientGeneratorCoreHierarchyBuildingContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Models/SpecsAzureClientGeneratorCoreHierarchyBuildingContext.cs @@ -7,14 +7,14 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { [ModelReaderWriterBuildable(typeof(Animal))] [ModelReaderWriterBuildable(typeof(Dog))] [ModelReaderWriterBuildable(typeof(Pet))] [ModelReaderWriterBuildable(typeof(UnknownAnimal))] [ModelReaderWriterBuildable(typeof(UnknownPet))] - public partial class _Specs_AzureClientGeneratorCoreHierarchyBuildingContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreHierarchyBuildingContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.Serialization.cs index 58914f23f4f5..28182c487f30 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class Pet : Animal, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.cs index 7068ea7d822b..842382009826 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/Pet.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class Pet : Animal { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/PetOperations.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/PetOperations.cs index b21b90451d34..50dad86cc000 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/PetOperations.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/PetOperations.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public partial class PetOperations { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.Serialization.cs index 04d472846da0..74ce6f6a80bc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { internal partial class UnknownAnimal : Animal, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.cs index 55b678e9f888..38dfd4c9c8aa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownAnimal.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { internal partial class UnknownAnimal : Animal { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.Serialization.cs index b78a728c2e5a..838abc5c1d90 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { internal partial class UnknownPet : Pet, IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.cs index 02a48ad78799..4adba5a5c4de 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/UnknownPet.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { internal partial class UnknownPet : Pet { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingClientBuilderExtensions.cs index 2706f4c761ae..1ffb4a6b6f38 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding; +using Specs.Azure.ClientGenerator.Core.HierarchyBuilding; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingModelFactory.cs index 8e0554dce741..663de39e8f02 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/Generated/_Specs_AzureClientGeneratorCoreHierarchyBuildingModelFactory.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding +namespace Specs.Azure.ClientGenerator.Core.HierarchyBuilding { public static partial class _Specs_AzureClientGeneratorCoreHierarchyBuildingModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.csproj index b69d6cbad684..2abc13f8aa2a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/src/_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.HierarchyBuilding + Specs.Azure.ClientGenerator.Core.HierarchyBuilding true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/tspCodeModel.json index 884f302f5159..dff4925f7871 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/hierarchy-building/tspCodeModel.json @@ -444,6 +444,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding", "apiVersions": [], @@ -803,6 +804,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations", "apiVersions": [], @@ -1165,6 +1167,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations", "apiVersions": [], @@ -1369,6 +1372,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.DogOperations", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/GroupParameters.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/GroupParameters.cs index abf2c81ecb73..31b430e5c4a6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/GroupParameters.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/GroupParameters.cs @@ -11,7 +11,7 @@ using Azure.Core.Pipeline; using Customization; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class GroupParameters { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/_Specs_AzureClientGeneratorCoreOverrideContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/SpecsAzureClientGeneratorCoreOverrideContext.cs similarity index 64% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/_Specs_AzureClientGeneratorCoreOverrideContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/SpecsAzureClientGeneratorCoreOverrideContext.cs index 671d16511355..774ae62d7c60 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/_Specs_AzureClientGeneratorCoreOverrideContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/Models/SpecsAzureClientGeneratorCoreOverrideContext.cs @@ -8,10 +8,10 @@ using System.ClientModel.Primitives; using Customization; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { [ModelReaderWriterBuildable(typeof(GroupParametersOptions))] - public partial class _Specs_AzureClientGeneratorCoreOverrideContext : ModelReaderWriterContext + public partial class SpecsAzureClientGeneratorCoreOverrideContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClient.cs index c3e570a7417e..8b30341f47f6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClient.cs @@ -8,7 +8,7 @@ using System; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class OverrideClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClientOptions.cs index e96cc33a19ac..de0615e2e65c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/OverrideClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class OverrideClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RemoveOptionalParameter.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RemoveOptionalParameter.cs index 0ac4d5fc99f4..c28a9cc744e1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RemoveOptionalParameter.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RemoveOptionalParameter.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class RemoveOptionalParameter { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/ReorderParameters.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/ReorderParameters.cs index 1cb188e8203f..918c19590da9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/ReorderParameters.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/ReorderParameters.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class ReorderParameters { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RequireOptionalParameter.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RequireOptionalParameter.cs index 06f93d934e83..5c7ea6bcad0c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RequireOptionalParameter.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/RequireOptionalParameter.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public partial class RequireOptionalParameter { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideClientBuilderExtensions.cs index 333736490d8b..e0c8dcd6ff1e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.Override; +using Specs.Azure.ClientGenerator.Core.Override; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideModelFactory.cs index 4567760d0f16..dc9b6fba2a87 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/Generated/_Specs_AzureClientGeneratorCoreOverrideModelFactory.cs @@ -7,7 +7,7 @@ using Customization; -namespace _Specs_.Azure.ClientGenerator.Core.Override +namespace Specs.Azure.ClientGenerator.Core.Override { public static partial class _Specs_AzureClientGeneratorCoreOverrideModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/_Specs_.Azure.ClientGenerator.Core.Override.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/_Specs_.Azure.ClientGenerator.Core.Override.csproj index 31c2ad63d2eb..cf93032f008c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/_Specs_.Azure.ClientGenerator.Core.Override.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/src/_Specs_.Azure.ClientGenerator.Core.Override.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.Override client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.Override 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.Override + Specs.Azure.ClientGenerator.Core.Override true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/tspCodeModel.json index 682cf0383f7f..ba2c3b3f26b0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/override/tspCodeModel.json @@ -96,6 +96,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override", "apiVersions": [], @@ -266,6 +267,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters", "apiVersions": [], @@ -408,6 +410,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters", "apiVersions": [], @@ -581,6 +584,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter", "apiVersions": [], @@ -791,6 +795,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.Serialization.cs index ca813067f41b..c3416450ef88 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class InputModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.cs index b4016bf528b7..774a4c61aab0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/InputModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class InputModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ModelInOperation.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ModelInOperation.cs index 8f8ccd99af91..d5391771ca18 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ModelInOperation.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ModelInOperation.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class ModelInOperation { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/_Specs_AzureClientGeneratorCoreUsageContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/SpecsAzureClientGeneratorCoreUsageContext.cs similarity index 68% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/_Specs_AzureClientGeneratorCoreUsageContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/SpecsAzureClientGeneratorCoreUsageContext.cs index b8e50c600fa6..41c7b6783be7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/_Specs_AzureClientGeneratorCoreUsageContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/Models/SpecsAzureClientGeneratorCoreUsageContext.cs @@ -6,16 +6,16 @@ #nullable disable using System.ClientModel.Primitives; -using _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation; +using Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { [ModelReaderWriterBuildable(typeof(InputModel))] - [ModelReaderWriterBuildable(typeof(OrphanModel))] [ModelReaderWriterBuildable(typeof(OutputModel))] [ModelReaderWriterBuildable(typeof(ResultModel))] [ModelReaderWriterBuildable(typeof(RoundTripModel))] - public partial class _Specs_AzureClientGeneratorCoreUsageContext : ModelReaderWriterContext + [ModelReaderWriterBuildable(typeof(OrphanModel))] + public partial class SpecsAzureClientGeneratorCoreUsageContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.Serialization.cs index c1573688aaa3..081396f830b3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { public partial class OrphanModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.cs index ecb671964282..fc10c20b8ec8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OrphanModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { public partial class OrphanModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.Serialization.cs index c56f9e3222ad..e7ea05c0b489 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class OutputModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.cs index 9ecc54f575e4..21bdeddd2573 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/OutputModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class OutputModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.Serialization.cs index 0948a44660e1..e5cc970b2753 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class ResultModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.cs index 823553f60a0a..a383c6f85f12 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/ResultModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class ResultModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.Serialization.cs index 6fd58f3de4fa..15af6ec46417 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class RoundTripModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.cs index 2732621994ca..cd232dd6001d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/RoundTripModel.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation +namespace Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation { public partial class RoundTripModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClient.cs index dd12345c7fb4..c49cff1dbe53 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClient.cs @@ -7,9 +7,9 @@ using System; using Azure.Core.Pipeline; -using _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation; +using Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { public partial class UsageClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClientOptions.cs index 86bb2ea4a9e0..c3415b3cd858 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/UsageClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { public partial class UsageClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageClientBuilderExtensions.cs index bfd77254dbad..7b2aed76eba6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.ClientGenerator.Core.Usage; +using Specs.Azure.ClientGenerator.Core.Usage; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageModelFactory.cs index 7a9913e9a9bb..9d7fbbbf1f46 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/Generated/_Specs_AzureClientGeneratorCoreUsageModelFactory.cs @@ -5,9 +5,9 @@ #nullable disable -using _Specs_.Azure.ClientGenerator.Core.Usage._ModelInOperation; +using Specs.Azure.ClientGenerator.Core.Usage._ModelInOperation; -namespace _Specs_.Azure.ClientGenerator.Core.Usage +namespace Specs.Azure.ClientGenerator.Core.Usage { public static partial class _Specs_AzureClientGeneratorCoreUsageModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj index c4b823f7ff19..674648e43be7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.ClientGenerator.Core.Usage client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.ClientGenerator.Core.Usage 1.0.0-beta.1 - _Specs_.Azure.ClientGenerator.Core.Usage + Specs.Azure.ClientGenerator.Core.Usage true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json index 186a4b6e207b..1693d3937ea6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json @@ -331,6 +331,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage", "apiVersions": [], @@ -854,6 +855,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClient.cs index a61dd5b36b28..e74b44fa77c8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClient.cs @@ -13,7 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class BasicClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClientOptions.cs index dce2a7094a48..b2b96c4ddb16 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/BasicClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class BasicClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/_Specs_AzureCoreBasicContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/SpecsAzureCoreBasicContext.cs similarity index 77% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/_Specs_AzureCoreBasicContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/SpecsAzureCoreBasicContext.cs index f2021d2889f2..0d37813284ac 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/_Specs_AzureCoreBasicContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/Models/SpecsAzureCoreBasicContext.cs @@ -8,13 +8,13 @@ using System.ClientModel.Primitives; using Azure; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(User))] [ModelReaderWriterBuildable(typeof(UserList))] [ModelReaderWriterBuildable(typeof(UserOrder))] - public partial class _Specs_AzureCoreBasicContext : ModelReaderWriterContext + public partial class SpecsAzureCoreBasicContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.Serialization.cs index 227354b98910..f0173133dbcc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class User : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.cs index 8f74c7e74cc1..d22c64fd0d9d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/User.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class User { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.Serialization.cs index 8b91837e3623..eadea9e98143 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class UserList : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.cs index 7a4cf7af45e3..fe3d3f2b92e4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserList.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class UserList { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.Serialization.cs index b290b7b3fcc9..4f6e67a5b792 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class UserOrder : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.cs index 2751a5333e67..c61732512c52 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/UserOrder.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public partial class UserOrder { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicClientBuilderExtensions.cs index 8429782fbc92..0e49432f02c9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Basic; +using Specs.Azure.Core.Basic; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicModelFactory.cs index c3dcd5805071..7af5445ae6e1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/Generated/_Specs_AzureCoreBasicModelFactory.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure; -namespace _Specs_.Azure.Core.Basic +namespace Specs.Azure.Core.Basic { public static partial class _Specs_AzureCoreBasicModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/_Specs_.Azure.Core.Basic.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/_Specs_.Azure.Core.Basic.csproj index 86d05f9e223b..76f54c7de409 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/_Specs_.Azure.Core.Basic.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/src/_Specs_.Azure.Core.Basic.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Basic client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Basic 1.0.0-beta.1 - _Specs_.Azure.Core.Basic + Specs.Azure.Core.Basic true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/tspCodeModel.json index 33817da088c6..ae8415b756df 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/basic/tspCodeModel.json @@ -2389,8 +2389,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Basic.endpoint" + }, + { + "$id": "176", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Basic.createOrUpdate.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Basic", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.Serialization.cs index c7fae960ee07..5599add3ca1a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class GenerationOptions : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.cs index 2cf1b2d1e6a1..1075da437c52 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationOptions.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class GenerationOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.Serialization.cs index bf0254ca9754..872385ae4a0c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.Serialization.cs @@ -8,9 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; -using Azure; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class GenerationResult : IJsonModel { @@ -33,7 +32,5 @@ public partial class GenerationResult : IJsonModel protected virtual GenerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static explicit operator GenerationResult(Response response) => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.cs index 31dddebeacd7..0eeec2d1bfaf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/GenerationResult.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class GenerationResult { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/SpecsAzureCoreLroRpcContext.cs similarity index 76% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/SpecsAzureCoreLroRpcContext.cs index e354e26e9f17..463210c640a3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/SpecsAzureCoreLroRpcContext.cs @@ -9,12 +9,12 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(GenerationOptions))] [ModelReaderWriterBuildable(typeof(GenerationResult))] - [ModelReaderWriterBuildable(typeof(ResponseError))] - public partial class _Specs_AzureCoreLroRpcContext : ModelReaderWriterContext + public partial class SpecsAzureCoreLroRpcContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs index 0a8f320d2b00..c9dc835c7e9a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class RpcClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs index 2a397dd3a662..5fd718d72b7d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public partial class RpcClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcClientBuilderExtensions.cs index f5649d8dc4d5..443090e7b123 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Lro.Rpc; +using Specs.Azure.Core.Lro.Rpc; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs index 5caf7f0bf220..dccd646272f8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs @@ -9,7 +9,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Rpc +namespace Specs.Azure.Core.Lro.Rpc { public static partial class _Specs_AzureCoreLroRpcModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj index d7862fa61dd8..ff5fd79a5bf5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Lro.Rpc client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Lro.Rpc 1.0.0-beta.1 - _Specs_.Azure.Core.Lro.Rpc + Specs.Azure.Core.Lro.Rpc true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json index 42dbc027ff28..67ab596d0bf6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json @@ -1012,8 +1012,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.endpoint" + }, + { + "$id": "72", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "74", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.Serialization.cs index 0546a1d31099..2977e3cc0810 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.Serialization.cs @@ -8,9 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; -using Azure; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class ExportedUser : IJsonModel { @@ -33,7 +32,5 @@ public partial class ExportedUser : IJsonModel protected virtual ExportedUser PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static explicit operator ExportedUser(Response response) => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.cs index ca2b91b23684..aa3444afab20 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/ExportedUser.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class ExportedUser { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/SpecsAzureCoreLroStandardContext.cs similarity index 74% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/SpecsAzureCoreLroStandardContext.cs index 4786bf7c1e72..d2fb469ff04b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/SpecsAzureCoreLroStandardContext.cs @@ -9,12 +9,12 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { - [ModelReaderWriterBuildable(typeof(ExportedUser))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(ExportedUser))] [ModelReaderWriterBuildable(typeof(User))] - public partial class _Specs_AzureCoreLroStandardContext : ModelReaderWriterContext + public partial class SpecsAzureCoreLroStandardContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs index 580882f9ecd2..56b676afb602 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class StandardClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs index 683db1815f22..5926cbdf2f90 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class StandardClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.Serialization.cs index ec2237fb970e..ec6ca70a5669 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class User : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.cs index e3d7d72c3ce1..3cae57b632cf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/User.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public partial class User { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardClientBuilderExtensions.cs index 326690fcb39f..053610a9d07d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Lro.Standard; +using Specs.Azure.Core.Lro.Standard; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs index f09375539dab..e6f6578ba65b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs @@ -9,7 +9,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Lro.Standard +namespace Specs.Azure.Core.Lro.Standard { public static partial class _Specs_AzureCoreLroStandardModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj index 088704288e28..57ab202c8173 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Lro.Standard client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Lro.Standard 1.0.0-beta.1 - _Specs_.Azure.Core.Lro.Standard + Specs.Azure.Core.Lro.Standard true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json index ef77798f29bd..e107a84cf747 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json @@ -1715,8 +1715,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.endpoint" + }, + { + "$id": "125", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.createOrReplace.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureCoreEmbeddingVector.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureCoreEmbeddingVector.cs index 49429c8b4f99..5caf7b6e606d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureCoreEmbeddingVector.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureCoreEmbeddingVector.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public partial class AzureCoreEmbeddingVector { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.Serialization.cs index b12c819f7d3c..a91c95b4bfb0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public partial class AzureEmbeddingModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.cs index c1ef882525dd..f0f78b67b78b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/AzureEmbeddingModel.cs @@ -7,7 +7,7 @@ using System; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public partial class AzureEmbeddingModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClient.cs index 79e1a099f8cf..091acd471285 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClient.cs @@ -8,7 +8,7 @@ using System; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public partial class ModelClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClientOptions.cs index c3fe58f100e8..cb7fd9c919e5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/ModelClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public partial class ModelClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/_Specs_AzureCoreModelContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/SpecsAzureCoreModelContext.cs similarity index 68% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/_Specs_AzureCoreModelContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/SpecsAzureCoreModelContext.cs index 07b4474a8a07..0b0f5a26a1be 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/_Specs_AzureCoreModelContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/Models/SpecsAzureCoreModelContext.cs @@ -7,10 +7,10 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { [ModelReaderWriterBuildable(typeof(AzureEmbeddingModel))] - public partial class _Specs_AzureCoreModelContext : ModelReaderWriterContext + public partial class SpecsAzureCoreModelContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelClientBuilderExtensions.cs index 8d7807e8add7..7b5fd4070c65 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Model; +using Specs.Azure.Core.Model; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelModelFactory.cs index efa0d51ba7fa..9b068161449f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/Generated/_Specs_AzureCoreModelModelFactory.cs @@ -7,7 +7,7 @@ using System; -namespace _Specs_.Azure.Core.Model +namespace Specs.Azure.Core.Model { public static partial class _Specs_AzureCoreModelModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/_Specs_.Azure.Core.Model.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/_Specs_.Azure.Core.Model.csproj index 2a3871c6e1cd..8ddbf10faa36 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/_Specs_.Azure.Core.Model.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/src/_Specs_.Azure.Core.Model.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Model client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Model 1.0.0-beta.1 - _Specs_.Azure.Core.Model + Specs.Azure.Core.Model true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/tspCodeModel.json index 9f80b89f268a..74fd00fd60cb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/model/tspCodeModel.json @@ -190,6 +190,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Core.Model.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Model", "apiVersions": [ @@ -602,6 +603,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Core.Model.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.Serialization.cs index 36d0cf602d13..77ca2a71c42a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class FirstItem : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.cs index 9eb7d23ea9b8..ca4e4cb6a6c9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/FirstItem.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class FirstItem { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.Serialization.cs index a446861c38d5..d9126b5b4dc5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class ListItemInputBody : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.cs index 8c92924eb1f4..a599809edf3e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputBody.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class ListItemInputBody { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputExtensibleEnum.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputExtensibleEnum.cs index d607d9dbbf3c..b7843870571a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputExtensibleEnum.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/ListItemInputExtensibleEnum.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public enum ListItemInputExtensibleEnum { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/_Specs_AzureCorePageContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/SpecsAzureCorePageContext.cs similarity index 82% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/_Specs_AzureCorePageContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/SpecsAzureCorePageContext.cs index 646713d1c9ea..4045291d8ca7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/_Specs_AzureCorePageContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/Models/SpecsAzureCorePageContext.cs @@ -9,15 +9,15 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(FirstItem))] [ModelReaderWriterBuildable(typeof(ListItemInputBody))] - [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SecondItem))] [ModelReaderWriterBuildable(typeof(User))] [ModelReaderWriterBuildable(typeof(UserOrder))] - public partial class _Specs_AzureCorePageContext : ModelReaderWriterContext + public partial class SpecsAzureCorePageContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClient.cs index 0a0d39e33903..8f4a51793457 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClient.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class PageClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClientOptions.cs index e75582f4f357..082716327742 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/PageClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class PageClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.Serialization.cs index e9c2a058f658..32e59c4d2923 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class SecondItem : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.cs index f7ffeda25cba..c239f6ab7110 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/SecondItem.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class SecondItem { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/TwoModelsAsPageItem.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/TwoModelsAsPageItem.cs index ed8222970fad..59cd2f4b19dd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/TwoModelsAsPageItem.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/TwoModelsAsPageItem.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class TwoModelsAsPageItem { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.Serialization.cs index e8b388936672..33d09a50ea3d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class User : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.cs index 7c0151e75c6b..8bd60e794104 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/User.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class User { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.Serialization.cs index 01ca9f963fc3..99a34caeb6b5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class UserOrder : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.cs index f4480bea7139..17c44eb8439d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/UserOrder.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public partial class UserOrder { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageClientBuilderExtensions.cs index 186d0fb00fe0..e1a40f4c173d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Page; +using Specs.Azure.Core.Page; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageModelFactory.cs index 36b7036d5f3b..d74f25414c0d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/Generated/_Specs_AzureCorePageModelFactory.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Page +namespace Specs.Azure.Core.Page { public static partial class _Specs_AzureCorePageModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/_Specs_.Azure.Core.Page.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/_Specs_.Azure.Core.Page.csproj index 03b2b3f325e3..f4accc468856 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/_Specs_.Azure.Core.Page.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/src/_Specs_.Azure.Core.Page.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Page client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Page 1.0.0-beta.1 - _Specs_.Azure.Core.Page + Specs.Azure.Core.Page true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/tspCodeModel.json index 4bc81b89c1b0..eb836ae4c1ae 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/page/tspCodeModel.json @@ -1868,8 +1868,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Page.endpoint" + }, + { + "$id": "136", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Page.listWithPage.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Page", "apiVersions": [ @@ -1877,13 +1909,13 @@ ], "children": [ { - "$id": "136", + "$id": "139", "kind": "client", "name": "TwoModelsAsPageItem", "namespace": "_Specs_.Azure.Core.Page", "methods": [ { - "$id": "137", + "$id": "140", "kind": "paging", "name": "listFirstItem", "accessibility": "public", @@ -1892,20 +1924,20 @@ ], "doc": "Two operations with two different page item types should be successfully generated. Should generate model for FirstItem.", "operation": { - "$id": "138", + "$id": "141", "name": "listFirstItem", "resourceName": "TwoModelsAsPageItem", "doc": "Two operations with two different page item types should be successfully generated. Should generate model for FirstItem.", "accessibility": "public", "parameters": [ { - "$id": "139", + "$id": "142", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "140", + "$id": "143", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1915,7 +1947,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "141", + "$id": "144", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1929,7 +1961,7 @@ "readOnly": false }, { - "$id": "142", + "$id": "145", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -1971,7 +2003,7 @@ }, "parameters": [ { - "$id": "143", + "$id": "146", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -2013,7 +2045,7 @@ } }, { - "$id": "144", + "$id": "147", "kind": "paging", "name": "listSecondItem", "accessibility": "public", @@ -2022,20 +2054,20 @@ ], "doc": "Two operations with two different page item types should be successfully generated. Should generate model for SecondItem.", "operation": { - "$id": "145", + "$id": "148", "name": "listSecondItem", "resourceName": "TwoModelsAsPageItem", "doc": "Two operations with two different page item types should be successfully generated. Should generate model for SecondItem.", "accessibility": "public", "parameters": [ { - "$id": "146", + "$id": "149", "kind": "query", "name": "apiVersion", "serializedName": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "147", + "$id": "150", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2045,7 +2077,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "148", + "$id": "151", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2059,7 +2091,7 @@ "readOnly": false }, { - "$id": "149", + "$id": "152", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -2101,7 +2133,7 @@ }, "parameters": [ { - "$id": "150", + "$id": "153", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -2145,13 +2177,13 @@ ], "parameters": [ { - "$id": "151", + "$id": "154", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "152", + "$id": "155", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2162,7 +2194,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "153", + "$id": "156", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2173,8 +2205,12 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Page.endpoint" + }, + { + "$ref": "136" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.Serialization.cs index d51ebb6e25a7..3360c070f619 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.Serialization.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public partial class AzureLocationModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.cs index d77d25edc4ff..854edd460a7d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationModel.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public partial class AzureLocationModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationScalar.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationScalar.cs index 71c9e1f2387d..7ca9c46e05a9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationScalar.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/AzureLocationScalar.cs @@ -11,7 +11,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public partial class AzureLocationScalar { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/_Specs_AzureCoreScalarContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/SpecsAzureCoreScalarContext.cs similarity index 68% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/_Specs_AzureCoreScalarContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/SpecsAzureCoreScalarContext.cs index 995d37a93994..a01dea864aa5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/_Specs_AzureCoreScalarContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/Models/SpecsAzureCoreScalarContext.cs @@ -7,10 +7,10 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { [ModelReaderWriterBuildable(typeof(AzureLocationModel))] - public partial class _Specs_AzureCoreScalarContext : ModelReaderWriterContext + public partial class SpecsAzureCoreScalarContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClient.cs index ad1a0ef35dcb..c0f0cd6670f4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClient.cs @@ -8,7 +8,7 @@ using System; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public partial class ScalarClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClientOptions.cs index 3bcd42fe8f7f..2369cad31ac1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/ScalarClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public partial class ScalarClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarClientBuilderExtensions.cs index b3e056d23b0d..679f0bf7e67f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Scalar; +using Specs.Azure.Core.Scalar; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarModelFactory.cs index 8085fffc9860..ddab0f424f2e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/Generated/_Specs_AzureCoreScalarModelFactory.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Scalar +namespace Specs.Azure.Core.Scalar { public static partial class _Specs_AzureCoreScalarModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/_Specs_.Azure.Core.Scalar.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/_Specs_.Azure.Core.Scalar.csproj index 20837f982d99..ba03b010534d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/_Specs_.Azure.Core.Scalar.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/src/_Specs_.Azure.Core.Scalar.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Scalar client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Scalar 1.0.0-beta.1 - _Specs_.Azure.Core.Scalar + Specs.Azure.Core.Scalar true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/tspCodeModel.json index 812d6fbb14a4..1deb1e20cf60 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/scalar/tspCodeModel.json @@ -238,6 +238,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Core.Scalar.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Scalar", "apiVersions": [ @@ -887,6 +888,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Core.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Scalar.AzureLocationScalar", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/_Specs_AzureCoreTraitsContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/SpecsAzureCoreTraitsContext.cs similarity index 78% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/_Specs_AzureCoreTraitsContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/SpecsAzureCoreTraitsContext.cs index 2b06da61c003..83ed0e6ec52c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/_Specs_AzureCoreTraitsContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/Models/SpecsAzureCoreTraitsContext.cs @@ -8,13 +8,13 @@ using System.ClientModel.Primitives; using Azure; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(User))] [ModelReaderWriterBuildable(typeof(UserActionParam))] [ModelReaderWriterBuildable(typeof(UserActionResponse))] - public partial class _Specs_AzureCoreTraitsContext : ModelReaderWriterContext + public partial class SpecsAzureCoreTraitsContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClient.cs index 50d430d004b2..ede372d1a1fe 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class TraitsClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClientOptions.cs index 8b8c79f20876..809e8095507e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/TraitsClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class TraitsClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.Serialization.cs index 95c3e95bb781..e37325a85e17 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class User : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.cs index 58a947af99db..94e0e0ffa2f5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/User.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class User { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.Serialization.cs index c664e7fc5f50..7158317ec073 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class UserActionParam : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.cs index 2079c587e7a9..997ffda7575b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionParam.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class UserActionParam { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.Serialization.cs index 9d57f557ffe6..425103ea362f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class UserActionResponse : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.cs index f4bc9ae60bbc..4055b3429c79 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/UserActionResponse.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public partial class UserActionResponse { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsClientBuilderExtensions.cs index 6427ae51c4ca..7c793d5c97b1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Core.Traits; +using Specs.Azure.Core.Traits; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsModelFactory.cs index e3749e2f079b..c41f4df74bd4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/Generated/_Specs_AzureCoreTraitsModelFactory.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using Azure; -namespace _Specs_.Azure.Core.Traits +namespace Specs.Azure.Core.Traits { public static partial class _Specs_AzureCoreTraitsModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/_Specs_.Azure.Core.Traits.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/_Specs_.Azure.Core.Traits.csproj index 3ce549c07331..ed590c9b340d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/_Specs_.Azure.Core.Traits.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/src/_Specs_.Azure.Core.Traits.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Core.Traits client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Core.Traits 1.0.0-beta.1 - _Specs_.Azure.Core.Traits + Specs.Azure.Core.Traits true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/tspCodeModel.json index bd6d10c895ae..f74cd7c17e0a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/traits/tspCodeModel.json @@ -1439,8 +1439,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Core.Traits.endpoint" + }, + { + "$id": "117", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Traits.smokeTest.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Core.Traits", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClient.cs index c9b9896c195b..667cb23127f2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { public partial class DurationClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClientOptions.cs index 60872f95ec22..ed41461ee49d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { public partial class DurationClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.Serialization.cs index 3f7cd1c0afa0..789fffa313fa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { public partial class DurationModel : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.cs index 657c9efd4bbc..89a512b22d28 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/DurationModel.cs @@ -7,7 +7,7 @@ using System; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { public partial class DurationModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/_Specs_AzureEncodeDurationContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/SpecsAzureEncodeDurationContext.cs similarity index 66% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/_Specs_AzureEncodeDurationContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/SpecsAzureEncodeDurationContext.cs index 93a3ac3f769e..33aa9540f89b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/_Specs_AzureEncodeDurationContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/Models/SpecsAzureEncodeDurationContext.cs @@ -7,10 +7,10 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { [ModelReaderWriterBuildable(typeof(DurationModel))] - public partial class _Specs_AzureEncodeDurationContext : ModelReaderWriterContext + public partial class SpecsAzureEncodeDurationContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationClientBuilderExtensions.cs index e9d11ba4147a..ed2f3f449bed 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Encode.Duration; +using Specs.Azure.Encode.Duration; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationModelFactory.cs index 5efb4e726673..f152f63085c3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/Generated/_Specs_AzureEncodeDurationModelFactory.cs @@ -7,7 +7,7 @@ using System; -namespace _Specs_.Azure.Encode.Duration +namespace Specs.Azure.Encode.Duration { public static partial class _Specs_AzureEncodeDurationModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/_Specs_.Azure.Encode.Duration.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/_Specs_.Azure.Encode.Duration.csproj index 91d88c66ef08..890cf7175ff6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/_Specs_.Azure.Encode.Duration.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/src/_Specs_.Azure.Encode.Duration.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Encode.Duration client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Encode.Duration 1.0.0-beta.1 - _Specs_.Azure.Encode.Duration + Specs.Azure.Encode.Duration true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/tspCodeModel.json index 99a21dc996cd..368b4cdaa77a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/encode/duration/tspCodeModel.json @@ -222,6 +222,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Encode.Duration.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Encode.Duration", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.Serialization.cs index c61d0ca3acf6..7743c7d64b6e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class ActionRequest : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.cs index bdaccaf4a1bd..1f803e94574e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionRequest.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class ActionRequest { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.Serialization.cs index 7f8cb4f4ab26..ad548a461f28 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class ActionResponse : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.cs index 0aa944e0d20c..ebb89aba5afa 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/ActionResponse.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class ActionResponse { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/AzureExampleClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/AzureExampleClient.cs index 02eb64e43a02..73a7ae862484 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/AzureExampleClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/AzureExampleClient.cs @@ -11,7 +11,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; -using _Specs_.Azure.Example.Basic; +using Specs.Azure.Example.Basic; namespace AzureExampleBasicClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Enum.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Enum.cs index 472a40bfa491..4f594b95303c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Enum.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Enum.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public readonly partial struct Enum : IEquatable { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.Serialization.cs index 902ff539e834..7e89dcaeccf1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class Model : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.cs index 7c7e3aa23826..ab68fbf61e79 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Model.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public partial class Model { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/_Specs_AzureExampleBasicContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/SpecsAzureExampleBasicContext.cs similarity index 74% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/_Specs_AzureExampleBasicContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/SpecsAzureExampleBasicContext.cs index 31634afdc52e..01bdfc42131f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/_Specs_AzureExampleBasicContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/Models/SpecsAzureExampleBasicContext.cs @@ -7,12 +7,12 @@ using System.ClientModel.Primitives; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { [ModelReaderWriterBuildable(typeof(ActionRequest))] [ModelReaderWriterBuildable(typeof(ActionResponse))] [ModelReaderWriterBuildable(typeof(Model))] - public partial class _Specs_AzureExampleBasicContext : ModelReaderWriterContext + public partial class SpecsAzureExampleBasicContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/_Specs_AzureExampleBasicModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/_Specs_AzureExampleBasicModelFactory.cs index 34b20d88934d..ffc62f935406 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/_Specs_AzureExampleBasicModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/Generated/_Specs_AzureExampleBasicModelFactory.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Example.Basic +namespace Specs.Azure.Example.Basic { public static partial class _Specs_AzureExampleBasicModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/_Specs_.Azure.Example.Basic.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/_Specs_.Azure.Example.Basic.csproj index b0d74e3811e1..dbfe54562af3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/_Specs_.Azure.Example.Basic.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/_Specs_.Azure.Example.Basic.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Example.Basic client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Example.Basic 1.0.0-beta.1 - _Specs_.Azure.Example.Basic + Specs.Azure.Example.Basic true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/tspCodeModel.json index 7c8c3bd03cd8..aea889adb347 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/tspCodeModel.json @@ -722,8 +722,40 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "_Specs_.Azure.Example.Basic.endpoint" + }, + { + "$id": "57", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "AzureExampleBasicClient.AzureExampleClient.basicAction.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "AzureExampleBasicClient.AzureExampleClient", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/_Specs_AzurePayloadPageableContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/SpecsAzurePayloadPageableContext.cs similarity index 66% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/_Specs_AzurePayloadPageableContext.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/SpecsAzurePayloadPageableContext.cs index 8d2f402fc95e..4a34e143380f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/_Specs_AzurePayloadPageableContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/Models/SpecsAzurePayloadPageableContext.cs @@ -8,10 +8,10 @@ using System.ClientModel.Primitives; using Azure.Core; -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { [ModelReaderWriterBuildable(typeof(User))] - public partial class _Specs_AzurePayloadPageableContext : ModelReaderWriterContext + public partial class SpecsAzurePayloadPageableContext : ModelReaderWriterContext { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClient.cs index 951741e021f9..5dea4dfc1f76 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClient.cs @@ -10,7 +10,7 @@ using Azure; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { public partial class PageableClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClientOptions.cs index 1f2f7efc597b..10197a189b4a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/PageableClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { public partial class PageableClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.Serialization.cs index 11986a99b684..605f9bdcffa0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.Serialization.cs @@ -9,7 +9,7 @@ using System.ClientModel.Primitives; using System.Text.Json; -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { public partial class User : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.cs index a0722f906ab7..778e7c297a47 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/User.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { public partial class User { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableClientBuilderExtensions.cs index ad8230a600ca..7075e6c3d852 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Payload.Pageable; +using Specs.Azure.Payload.Pageable; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableModelFactory.cs index f76464003bf7..11cb18c64f71 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/Generated/_Specs_AzurePayloadPageableModelFactory.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using Azure.Core; -namespace _Specs_.Azure.Payload.Pageable +namespace Specs.Azure.Payload.Pageable { public static partial class _Specs_AzurePayloadPageableModelFactory { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/_Specs_.Azure.Payload.Pageable.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/_Specs_.Azure.Payload.Pageable.csproj index f69a3c3ddd11..7b02d698d859 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/_Specs_.Azure.Payload.Pageable.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/src/_Specs_.Azure.Payload.Pageable.csproj @@ -3,7 +3,7 @@ This is the _Specs_.Azure.Payload.Pageable client library for developing .NET applications with rich experience. SDK Code Generation _Specs_.Azure.Payload.Pageable 1.0.0-beta.1 - _Specs_.Azure.Payload.Pageable + Specs.Azure.Payload.Pageable true diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/tspCodeModel.json index 03b67ae8b959..68bca41fcedf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/payload/pageable/tspCodeModel.json @@ -316,6 +316,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Payload.Pageable.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Payload.Pageable", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json index 9e37aa327d78..5b1e924caab5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json @@ -127,6 +127,7 @@ "crossLanguageDefinitionId": "Azure.SpecialHeaders.XmsClientRequestId.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Azure.SpecialHeaders.XmsClientRequestId", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.Serialization.cs index 84fb311c164d..a33237a9b76e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class ListWidgetsResponse : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.cs index 9618d6cec3e2..f284cf7d550d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/ListWidgetsResponse.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class ListWidgetsResponse { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Models/VersioningPreviewVersionV1Context.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Models/VersioningPreviewVersionV1Context.cs index 1a1ca9fc9bc6..aeaed951aea8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Models/VersioningPreviewVersionV1Context.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Models/VersioningPreviewVersionV1Context.cs @@ -6,7 +6,7 @@ #nullable disable using System.ClientModel.Primitives; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Versioning.PreviewVersion.V1 { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClient.cs index 883ceb60d811..df4b5738723f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class PreviewVersionClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClientOptions.cs index 987d0c637d9f..15f15808a435 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/PreviewVersionClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class PreviewVersionClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ClientBuilderExtensions.cs index cd91810f46d1..98afb27c836f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ModelFactory.cs index 687c7345aaf2..a7deebf9b84a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/VersioningPreviewVersionV1ModelFactory.cs @@ -6,7 +6,7 @@ #nullable disable using System.Collections.Generic; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Versioning.PreviewVersion.V1 { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.Serialization.cs index 9c2c0a19b261..d71777316902 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class Widget : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.cs index 6062de6020c5..b82620a3ede1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/src/Generated/Widget.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class Widget { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/tspCodeModel.json index c2986c427035..8652e98628ab 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v1/tspCodeModel.json @@ -889,6 +889,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Versioning.PreviewVersion.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Versioning.PreviewVersion", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.Serialization.cs index 84fb311c164d..a33237a9b76e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class ListWidgetsResponse : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.cs index 9618d6cec3e2..f284cf7d550d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/ListWidgetsResponse.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class ListWidgetsResponse { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Models/VersioningPreviewVersionV2Context.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Models/VersioningPreviewVersionV2Context.cs index 469980ac0d3c..fd8ecead6ee5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Models/VersioningPreviewVersionV2Context.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Models/VersioningPreviewVersionV2Context.cs @@ -6,7 +6,7 @@ #nullable disable using System.ClientModel.Primitives; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Versioning.PreviewVersion.V2 { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClient.cs index 883ceb60d811..df4b5738723f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClient.cs @@ -12,7 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class PreviewVersionClient { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClientOptions.cs index 987d0c637d9f..15f15808a435 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/PreviewVersionClientOptions.cs @@ -7,7 +7,7 @@ using Azure.Core; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class PreviewVersionClientOptions : ClientOptions { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ClientBuilderExtensions.cs index 5b20cf72acf2..ee038343d3b7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ClientBuilderExtensions.cs @@ -8,7 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Microsoft.Extensions.Azure { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ModelFactory.cs index 0d9d0a765b05..7c3d174815ad 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/VersioningPreviewVersionV2ModelFactory.cs @@ -6,7 +6,7 @@ #nullable disable using System.Collections.Generic; -using _Specs_.Azure.Versioning.PreviewVersion; +using Specs.Azure.Versioning.PreviewVersion; namespace Versioning.PreviewVersion.V2 { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.Serialization.cs index 9c2c0a19b261..d71777316902 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class Widget : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.cs index 6062de6020c5..b82620a3ede1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/src/Generated/Widget.cs @@ -5,7 +5,7 @@ #nullable disable -namespace _Specs_.Azure.Versioning.PreviewVersion +namespace Specs.Azure.Versioning.PreviewVersion { public partial class Widget { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/tspCodeModel.json index 45f75f7aba9b..a48af7445371 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/versioning/previewVersion/v2/tspCodeModel.json @@ -889,6 +889,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.Versioning.PreviewVersion.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.Versioning.PreviewVersion", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientBuilderExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientBuilderExtensions.cs index 8d80183ee179..fb240474cd7f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientBuilderExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientBuilderExtensions.cs @@ -8,27 +8,27 @@ using System; using System.Diagnostics.CodeAnalysis; using Azure.Core.Extensions; -using client.clientnamespace; -using client.clientnamespace.second; +using Client.Clientnamespace; +using Client.Clientnamespace.Second; namespace Microsoft.Extensions.Azure { public static partial class ClientClientNamespaceClientBuilderExtensions { - public static IAzureClientBuilder AddClientNamespaceFirstClient(this TBuilder builder, Uri endpoint) + public static IAzureClientBuilder AddClientNamespaceFirstClient(this TBuilder builder, Uri endpoint) where TBuilder : IAzureClientFactoryBuilder => throw null; [RequiresUnreferencedCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] [RequiresDynamicCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] - public static IAzureClientBuilder AddClientNamespaceFirstClient(this TBuilder builder, TConfiguration configuration) + public static IAzureClientBuilder AddClientNamespaceFirstClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration => throw null; - public static IAzureClientBuilder AddClientNamespaceSecondClient(this TBuilder builder, Uri endpoint) + public static IAzureClientBuilder AddClientNamespaceSecondClient(this TBuilder builder, Uri endpoint) where TBuilder : IAzureClientFactoryBuilder => throw null; [RequiresUnreferencedCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] [RequiresDynamicCode("Requires unreferenced code until we opt into EnableConfigurationBindingGenerator.")] - public static IAzureClientBuilder AddClientNamespaceSecondClient(this TBuilder builder, TConfiguration configuration) + public static IAzureClientBuilder AddClientNamespaceSecondClient(this TBuilder builder, TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientOptions.cs similarity index 61% rename from eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceClientOptions.cs rename to eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientOptions.cs index e704a041c85e..61581fc9cb9f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceClientOptions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceClientOptions.cs @@ -7,9 +7,9 @@ using Azure.Core; -namespace client.clientnamespace +namespace Client.Clientnamespace { - public partial class ClientNamespaceClientOptions : ClientOptions + public partial class ClientClientNamespaceClientOptions : ClientOptions { } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceModelFactory.cs index 99b198a04a10..bdeccaeaf09e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientClientNamespaceModelFactory.cs @@ -5,9 +5,9 @@ #nullable disable -using client.clientnamespace.first; -using client.clientnamespace.second; -using client.clientnamespace.second.sub; +using Client.Clientnamespace.First; +using Client.Clientnamespace.Second; +using Client.Clientnamespace.Second.Sub; namespace Client.ClientNamespace { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClient.cs index 21395d670a1e..c6dd5fc7f9c2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceFirstClient.cs @@ -10,15 +10,15 @@ using System.Threading.Tasks; using Azure; using Azure.Core.Pipeline; -using client.clientnamespace.first; +using Client.Clientnamespace.First; -namespace client.clientnamespace +namespace Client.Clientnamespace { public partial class ClientNamespaceFirstClient { - public ClientNamespaceFirstClient() : this(new Uri("http://localhost:3000"), new ClientNamespaceClientOptions()) => throw null; + public ClientNamespaceFirstClient() : this(new Uri("http://localhost:3000"), new ClientClientNamespaceClientOptions()) => throw null; - public ClientNamespaceFirstClient(Uri endpoint, ClientNamespaceClientOptions options) => throw null; + public ClientNamespaceFirstClient(Uri endpoint, ClientClientNamespaceClientOptions options) => throw null; public virtual HttpPipeline Pipeline => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClient.cs index 0ab831a83234..ad5a8ac3b470 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/ClientNamespaceSecondClient.cs @@ -10,15 +10,15 @@ using System.Threading.Tasks; using Azure; using Azure.Core.Pipeline; -using client.clientnamespace; +using Client.Clientnamespace; -namespace client.clientnamespace.second +namespace Client.Clientnamespace.Second { public partial class ClientNamespaceSecondClient { - public ClientNamespaceSecondClient() : this(new Uri("http://localhost:3000"), new ClientNamespaceClientOptions()) => throw null; + public ClientNamespaceSecondClient() : this(new Uri("http://localhost:3000"), new ClientClientNamespaceClientOptions()) => throw null; - public ClientNamespaceSecondClient(Uri endpoint, ClientNamespaceClientOptions options) => throw null; + public ClientNamespaceSecondClient(Uri endpoint, ClientClientNamespaceClientOptions options) => throw null; public virtual HttpPipeline Pipeline => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.Serialization.cs index a9082eb54263..09e67b1c42c4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace client.clientnamespace.first +namespace Client.Clientnamespace.First { public partial class FirstClientResult : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.cs index e098a31738a8..ce0f346a5980 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/FirstClientResult.cs @@ -5,7 +5,7 @@ #nullable disable -namespace client.clientnamespace.first +namespace Client.Clientnamespace.First { public partial class FirstClientResult { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/Models/ClientClientNamespaceContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/Models/ClientClientNamespaceContext.cs index 5928d29485a5..168af25172da 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/Models/ClientClientNamespaceContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/Models/ClientClientNamespaceContext.cs @@ -6,8 +6,8 @@ #nullable disable using System.ClientModel.Primitives; -using client.clientnamespace.first; -using client.clientnamespace.second; +using Client.Clientnamespace.First; +using Client.Clientnamespace.Second; namespace Client.ClientNamespace { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientEnumType.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientEnumType.cs index 34a70aae3e6d..2c42450987bb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientEnumType.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientEnumType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace client.clientnamespace.second.sub +namespace Client.Clientnamespace.Second.Sub { public readonly partial struct SecondClientEnumType : IEquatable { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.Serialization.cs index 2e8b2f4a3cee..cd4ce5bac52c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure; -namespace client.clientnamespace.second +namespace Client.Clientnamespace.Second { public partial class SecondClientResult : IJsonModel { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.cs index 272c9f3ba491..3f335cb7145e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/src/Generated/SecondClientResult.cs @@ -5,9 +5,9 @@ #nullable disable -using client.clientnamespace.second.sub; +using Client.Clientnamespace.Second.Sub; -namespace client.clientnamespace.second +namespace Client.Clientnamespace.Second { public partial class SecondClientResult { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/tspCodeModel.json index 75948dcccae7..0e79f4fbc0c0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/namespace/tspCodeModel.json @@ -262,6 +262,7 @@ "crossLanguageDefinitionId": "Client.ClientNamespace.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "ClientNameSpaceClient.ClientNamespaceFirstClient", "apiVersions": [] @@ -387,6 +388,7 @@ "crossLanguageDefinitionId": "Client.ClientNamespace.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "ClientNameSpaceClient.ClientNamespaceSecondClient", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/enum-conflict/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/enum-conflict/tspCodeModel.json index e4d4b2bd0f2b..478a99996a7a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/enum-conflict/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/enum-conflict/tspCodeModel.json @@ -327,6 +327,7 @@ "crossLanguageDefinitionId": "Client.Naming.EnumConflict.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Naming.EnumConflict", "apiVersions": [], @@ -528,6 +529,7 @@ "crossLanguageDefinitionId": "Client.Naming.EnumConflict.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Naming.EnumConflict.FirstOperations", "apiVersions": [], @@ -732,6 +734,7 @@ "crossLanguageDefinitionId": "Client.Naming.EnumConflict.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Naming.EnumConflict.SecondOperations", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/src/Generated/Models/ClientNamingContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/src/Generated/Models/ClientNamingContext.cs index 10bc140b9fc7..4e1bee908149 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/src/Generated/Models/ClientNamingContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/src/Generated/Models/ClientNamingContext.cs @@ -12,9 +12,9 @@ namespace Client.Naming { [ModelReaderWriterBuildable(typeof(ClientModel))] + [ModelReaderWriterBuildable(typeof(CSModel))] [ModelReaderWriterBuildable(typeof(ClientNameAndJsonEncodedNameModel))] [ModelReaderWriterBuildable(typeof(ClientNameModel))] - [ModelReaderWriterBuildable(typeof(CSModel))] [ModelReaderWriterBuildable(typeof(LanguageClientNameModel))] public partial class ClientNamingContext : ModelReaderWriterContext { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/tspCodeModel.json index fb7043b920e6..85fa5dca5d90 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/naming/tspCodeModel.json @@ -1041,6 +1041,7 @@ "crossLanguageDefinitionId": "Client.Naming.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Naming", "apiVersions": [], @@ -1310,6 +1311,7 @@ "crossLanguageDefinitionId": "Client.Naming.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Naming.Model", "apiVersions": [], @@ -1578,6 +1580,7 @@ "crossLanguageDefinitionId": "Client.Naming.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Naming.UnionEnum", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/overload/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/overload/tspCodeModel.json index 1db451ac8f13..bb907cd54fbf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/overload/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/overload/tspCodeModel.json @@ -380,6 +380,7 @@ "crossLanguageDefinitionId": "Client.Overload.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Overload", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/tspCodeModel.json index bd0af9b2b5c2..f3a0ba289193 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/tspCodeModel.json @@ -176,6 +176,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.ClientOperationGroup", "apiVersions": [], @@ -302,6 +303,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.ClientOperationGroup.Group3", "apiVersions": [], @@ -394,6 +396,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.ClientOperationGroup.Group4", "apiVersions": [], @@ -488,6 +491,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.AnotherClientOperationGroup", "apiVersions": [], @@ -577,6 +581,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.AnotherClientOperationGroup.Group5", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json index a9041e5fa9b0..ec47ecb0a69b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json @@ -214,6 +214,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service", "apiVersions": [], @@ -265,6 +266,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Baz", "apiVersions": [], @@ -357,6 +359,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Baz.Foo", "apiVersions": [], @@ -451,6 +454,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Qux", "apiVersions": [], @@ -543,6 +547,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Qux.Bar", "apiVersions": [], @@ -674,6 +679,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Foo", "apiVersions": [], @@ -803,6 +809,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.Service.Bar", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/tspCodeModel.json index a5a8f52dfa22..bfe386aef59a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/tspCodeModel.json @@ -250,6 +250,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.MultiClient.ClientA", "apiVersions": [] @@ -413,6 +414,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.MultiClient.ClientB", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/tspCodeModel.json index 5048d3c51231..f1decd7125eb 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/tspCodeModel.json @@ -250,6 +250,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.RenamedOperation", "apiVersions": [], @@ -413,6 +414,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.RenamedOperation.Group", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/tspCodeModel.json index b21a06a2ebc7..4960b53a26db 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/tspCodeModel.json @@ -138,6 +138,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.TwoOperationGroup", "apiVersions": [], @@ -301,6 +302,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.TwoOperationGroup.Group1", "apiVersions": [], @@ -467,6 +469,7 @@ "crossLanguageDefinitionId": "Client.Structure.Service.client" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Client.Structure.TwoOperationGroup.Group2", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json index 63946a7f8258..fe400ee69ea3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json @@ -625,6 +625,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes", "apiVersions": [], @@ -987,6 +988,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Query", "apiVersions": [], @@ -1657,6 +1659,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Property", "apiVersions": [], @@ -2023,6 +2026,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Header", "apiVersions": [], @@ -2670,6 +2674,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.RequestBody", "apiVersions": [], @@ -3188,6 +3193,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json index 91826b721dcc..146d52143d2b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json @@ -448,6 +448,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime", "apiVersions": [], @@ -948,6 +949,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.Query", "apiVersions": [], @@ -1774,6 +1776,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.Property", "apiVersions": [], @@ -2278,6 +2281,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.Header", "apiVersions": [], @@ -2552,6 +2556,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.ResponseHeader", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json index e578da152b3e..7e1d9bb47316 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json @@ -850,6 +850,7 @@ "crossLanguageDefinitionId": "Encode.Duration.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Encode.Duration", "apiVersions": [], @@ -1875,6 +1876,7 @@ "crossLanguageDefinitionId": "Encode.Duration.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Query", "apiVersions": [], @@ -3481,6 +3483,7 @@ "crossLanguageDefinitionId": "Encode.Duration.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property", "apiVersions": [], @@ -4511,6 +4514,7 @@ "crossLanguageDefinitionId": "Encode.Duration.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Header", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json index 26b0bacf4b90..3a5e6b9c0c9f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json @@ -253,6 +253,7 @@ "crossLanguageDefinitionId": "Encode.Numeric.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Encode.Numeric", "apiVersions": [], @@ -764,6 +765,7 @@ "crossLanguageDefinitionId": "Encode.Numeric.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Encode.Numeric.Property", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json index 1882bf001960..415be78e4135 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json @@ -151,6 +151,7 @@ "crossLanguageDefinitionId": "Parameters.Basic.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Parameters.Basic", "apiVersions": [], @@ -307,6 +308,7 @@ "crossLanguageDefinitionId": "Parameters.Basic.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.Basic.ExplicitBody", "apiVersions": [], @@ -470,6 +472,7 @@ "crossLanguageDefinitionId": "Parameters.Basic.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.Basic.ImplicitBody", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json index 2a3434043a7b..5ce9490f0d46 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json @@ -377,6 +377,7 @@ "crossLanguageDefinitionId": "Parameters.BodyOptionality.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Parameters.BodyOptionality", "apiVersions": [], @@ -646,6 +647,7 @@ "crossLanguageDefinitionId": "Parameters.BodyOptionality.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.BodyOptionality.OptionalExplicit", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json index 7ac7d16d0702..dc3c19f7fb44 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json @@ -44,6 +44,7 @@ "crossLanguageDefinitionId": "Parameters.CollectionFormat.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Parameters.CollectionFormat", "apiVersions": [], @@ -397,6 +398,7 @@ "crossLanguageDefinitionId": "Parameters.CollectionFormat.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.CollectionFormat.Query", "apiVersions": [], @@ -519,6 +521,7 @@ "crossLanguageDefinitionId": "Parameters.CollectionFormat.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.CollectionFormat.Header", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json index cc97a2784dde..bdb31ab5be86 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json @@ -211,6 +211,7 @@ "crossLanguageDefinitionId": "Parameters.Path.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Parameters.Path", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json index 43a7e7115d4f..fbe5098f9d7c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json @@ -563,6 +563,7 @@ "crossLanguageDefinitionId": "Parameters.Spread.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Parameters.Spread", "apiVersions": [], @@ -1360,6 +1361,7 @@ "crossLanguageDefinitionId": "Parameters.Spread.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.Spread.Model", "apiVersions": [], @@ -2415,6 +2417,7 @@ "crossLanguageDefinitionId": "Parameters.Spread.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Parameters.Spread.Alias", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json index 89b3dbb40316..795d796a3852 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json @@ -312,6 +312,7 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Payload.ContentNegotiation", "apiVersions": [], @@ -543,6 +544,7 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.ContentNegotiation.SameBody", "apiVersions": [], @@ -773,6 +775,7 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.ContentNegotiation.DifferentBody", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json index 47d995903c99..1a3db1c77989 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json @@ -1104,6 +1104,7 @@ "crossLanguageDefinitionId": "Payload.JsonMergePatch.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json index 52dcc1c487ed..a6649bc7906d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json @@ -173,6 +173,7 @@ "crossLanguageDefinitionId": "Payload.MediaType.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Payload.MediaType", "apiVersions": [], @@ -642,6 +643,7 @@ "crossLanguageDefinitionId": "Payload.MediaType.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.MediaType.StringBody", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json index 1f01dbada0ac..4d855075c339 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json @@ -1764,6 +1764,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart", "apiVersions": [], @@ -2598,6 +2599,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData", "apiVersions": [], @@ -2757,6 +2759,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts", "apiVersions": [], @@ -3142,6 +3145,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType", "apiVersions": [], @@ -3301,6 +3305,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/tspCodeModel.json index 07a053df2fc4..5376c304edb3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/tspCodeModel.json @@ -1009,6 +1009,7 @@ "crossLanguageDefinitionId": "Payload.Pageable.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Payload.Pageable", "apiVersions": [], @@ -1343,6 +1344,7 @@ "crossLanguageDefinitionId": "Payload.Pageable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination", "apiVersions": [], @@ -2751,6 +2753,7 @@ "crossLanguageDefinitionId": "Payload.Pageable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.Pageable.ServerDrivenPagination.ContinuationToken", "apiVersions": [], @@ -3020,6 +3023,7 @@ "crossLanguageDefinitionId": "Payload.Pageable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Payload.Pageable.PageSize", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/tspCodeModel.json index 52942145cee3..7cda299454dd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/tspCodeModel.json @@ -340,6 +340,7 @@ "crossLanguageDefinitionId": "Resiliency.ServiceDriven.apiVersion" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Resiliency.ServiceDriven", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/tspCodeModel.json index f698fbf5ce7c..cb0150079cb5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/tspCodeModel.json @@ -530,6 +530,7 @@ "crossLanguageDefinitionId": "Resiliency.ServiceDriven.apiVersion" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Resiliency.ServiceDriven", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json index 789c55f1de28..e02d5ee29662 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json @@ -82,6 +82,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Routes", "apiVersions": [], @@ -374,6 +375,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters", "apiVersions": [], @@ -586,6 +588,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.ReservedExpansion", "apiVersions": [], @@ -631,6 +634,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.SimpleExpansion", "apiVersions": [], @@ -937,6 +941,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.SimpleExpansion.Standard", "apiVersions": [], @@ -1216,6 +1221,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.SimpleExpansion.Explode", "apiVersions": [], @@ -1263,6 +1269,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.PathExpansion", "apiVersions": [], @@ -1542,6 +1549,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.PathExpansion.Standard", "apiVersions": [], @@ -1821,6 +1829,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.PathExpansion.Explode", "apiVersions": [], @@ -1868,6 +1877,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.LabelExpansion", "apiVersions": [], @@ -2147,6 +2157,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.LabelExpansion.Standard", "apiVersions": [], @@ -2426,6 +2437,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.LabelExpansion.Explode", "apiVersions": [], @@ -2473,6 +2485,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.MatrixExpansion", "apiVersions": [], @@ -2752,6 +2765,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.MatrixExpansion.Standard", "apiVersions": [], @@ -3031,6 +3045,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.PathParameters.MatrixExpansion.Explode", "apiVersions": [], @@ -3321,6 +3336,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters", "apiVersions": [], @@ -3366,6 +3382,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryExpansion", "apiVersions": [], @@ -3636,6 +3653,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryExpansion.Standard", "apiVersions": [], @@ -3906,6 +3924,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryExpansion.Explode", "apiVersions": [], @@ -3953,6 +3972,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryContinuation", "apiVersions": [], @@ -4223,6 +4243,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryContinuation.Standard", "apiVersions": [], @@ -4493,6 +4514,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.QueryParameters.QueryContinuation.Explode", "apiVersions": [], @@ -4580,6 +4602,7 @@ "crossLanguageDefinitionId": "Routes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Routes.InInterface", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json index 1cab3e1f27d1..5039dfa7ac2a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json @@ -115,6 +115,7 @@ "crossLanguageDefinitionId": "Serialization.EncodedName.Json.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Serialization.EncodedName.Json", "apiVersions": [], @@ -353,6 +354,7 @@ "crossLanguageDefinitionId": "Serialization.EncodedName.Json.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Serialization.EncodedName.Json.Property", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json index fad7a89d5542..4997ff6ac689 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json @@ -73,6 +73,7 @@ "crossLanguageDefinitionId": "Server.Endpoint.NotDefined.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Server.Endpoint.NotDefined", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/tspCodeModel.json index 7876207da069..2af4d7eefa87 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/tspCodeModel.json @@ -224,6 +224,7 @@ "crossLanguageDefinitionId": "Server.Path.Multiple.apiVersion" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Server.Path.Multiple", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json index 3b9ad21e6f3f..edb753e6884d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json @@ -73,6 +73,7 @@ "crossLanguageDefinitionId": "Server.Path.Single.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Server.Path.Single", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json index 2b4c537e57e6..e789fd548751 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json @@ -236,6 +236,7 @@ "crossLanguageDefinitionId": "Server.Versions.NotVersioned.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Server.Versions.NotVersioned", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/tspCodeModel.json index 4960f6fcbf6a..3c0577ba1257 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/tspCodeModel.json @@ -340,8 +340,39 @@ "skipUrlEncoding": false, "readOnly": false, "crossLanguageDefinitionId": "Server.Versions.Versioned.endpoint" + }, + { + "$id": "25", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "type": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Server.Versions.Versioned.withQueryApiVersion.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Server.Versions.Versioned", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json index 6593686df2f1..e88aeadaed23 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json @@ -413,6 +413,7 @@ "crossLanguageDefinitionId": "SpecialHeaders.ConditionalRequest.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "SpecialHeaders.ConditionalRequest", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json index 954229eb48ba..63467af47115 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json @@ -240,6 +240,7 @@ "crossLanguageDefinitionId": "SpecialHeaders.Repeatability.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "SpecialHeaders.Repeatability", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models/SpecialWordsContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models/SpecialWordsContext.cs index a8f47c512129..1e32eda50812 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models/SpecialWordsContext.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/Generated/Models/SpecialWordsContext.cs @@ -11,6 +11,7 @@ namespace SpecialWords { + [ModelReaderWriterBuildable(typeof(SameAsModel))] [ModelReaderWriterBuildable(typeof(And))] [ModelReaderWriterBuildable(typeof(As))] [ModelReaderWriterBuildable(typeof(Assert))] @@ -40,7 +41,6 @@ namespace SpecialWords [ModelReaderWriterBuildable(typeof(Pass))] [ModelReaderWriterBuildable(typeof(Raise))] [ModelReaderWriterBuildable(typeof(Return))] - [ModelReaderWriterBuildable(typeof(SameAsModel))] [ModelReaderWriterBuildable(typeof(Try))] [ModelReaderWriterBuildable(typeof(While))] [ModelReaderWriterBuildable(typeof(With))] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json index c60ea13da691..3e16e55a89e1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json @@ -1814,6 +1814,7 @@ "crossLanguageDefinitionId": "SpecialWords.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "SpecialWords", "apiVersions": [], @@ -5587,6 +5588,7 @@ "crossLanguageDefinitionId": "SpecialWords.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models", "apiVersions": [], @@ -5747,6 +5749,7 @@ "crossLanguageDefinitionId": "SpecialWords.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "SpecialWords.ModelProperties", "apiVersions": [], @@ -7015,6 +7018,7 @@ "crossLanguageDefinitionId": "SpecialWords.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Operations", "apiVersions": [], @@ -9782,6 +9786,7 @@ "crossLanguageDefinitionId": "SpecialWords.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Parameters", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json index cb1b1320c0f1..23f0cec21ee5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json @@ -560,6 +560,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Array", "apiVersions": [], @@ -810,6 +811,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.Int32Value", "apiVersions": [], @@ -1063,6 +1065,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.Int64Value", "apiVersions": [], @@ -1316,6 +1319,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.BooleanValue", "apiVersions": [], @@ -1569,6 +1573,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.StringValue", "apiVersions": [], @@ -1822,6 +1827,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.Float32Value", "apiVersions": [], @@ -2083,6 +2089,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.DatetimeValue", "apiVersions": [], @@ -2344,6 +2351,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.DurationValue", "apiVersions": [], @@ -2597,6 +2605,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.UnknownValue", "apiVersions": [], @@ -2839,6 +2848,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.ModelValue", "apiVersions": [], @@ -3097,6 +3107,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.NullableFloatValue", "apiVersions": [], @@ -3355,6 +3366,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.NullableInt32Value", "apiVersions": [], @@ -3613,6 +3625,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.NullableBooleanValue", "apiVersions": [], @@ -3871,6 +3884,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.NullableStringValue", "apiVersions": [], @@ -4125,6 +4139,7 @@ "crossLanguageDefinitionId": "Type.Array.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Array.NullableModelValue", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json index 9b116d7fa28d..d94f8b4738ed 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json @@ -469,6 +469,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary", "apiVersions": [], @@ -724,6 +725,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.Int32Value", "apiVersions": [], @@ -982,6 +984,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.Int64Value", "apiVersions": [], @@ -1240,6 +1243,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.BooleanValue", "apiVersions": [], @@ -1498,6 +1502,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.StringValue", "apiVersions": [], @@ -1756,6 +1761,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.Float32Value", "apiVersions": [], @@ -2022,6 +2028,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.DatetimeValue", "apiVersions": [], @@ -2288,6 +2295,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.DurationValue", "apiVersions": [], @@ -2546,6 +2554,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.UnknownValue", "apiVersions": [], @@ -2788,6 +2797,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.ModelValue", "apiVersions": [], @@ -3030,6 +3040,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.RecursiveModelValue", "apiVersions": [], @@ -3293,6 +3304,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.NullableFloatValue", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json index f89c00fd757c..f44587034846 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json @@ -292,6 +292,7 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Enum.Extensible", "apiVersions": [], @@ -737,6 +738,7 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Enum.Extensible.String", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json index 02de6dd19c49..96a9ad91c4d7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json @@ -260,6 +260,7 @@ "crossLanguageDefinitionId": "Type.Enum.Fixed.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Enum.Fixed", "apiVersions": [], @@ -625,6 +626,7 @@ "crossLanguageDefinitionId": "Type.Enum.Fixed.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Enum.Fixed.String", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json index a95532446891..005de7878b65 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json @@ -495,6 +495,7 @@ "crossLanguageDefinitionId": "Type.Model.Empty.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Empty", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json index 8f8c8b2115db..44274175219c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json @@ -1294,6 +1294,7 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json index 4069c1da2fff..d4d18fcfe643 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json @@ -1101,6 +1101,7 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json index bb09676fe332..0c111b63ec2f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json @@ -579,6 +579,7 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json index 306cfa9ab538..28862ccf6626 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json @@ -354,6 +354,7 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.Recursive.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.Recursive", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json index 30af92137fc9..f60046c387f1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json @@ -1292,6 +1292,7 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json index 6124f8d543f6..af361f5ce123 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json @@ -573,6 +573,7 @@ "crossLanguageDefinitionId": "Type.Model.Usage.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Usage", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json index 667579b41a40..a9b93b399134 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json @@ -1343,6 +1343,7 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility", "apiVersions": [] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json index 5876f35c586a..866ce2b172b5 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json @@ -3030,6 +3030,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties", "apiVersions": [], @@ -3274,6 +3275,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknown", "apiVersions": [], @@ -3521,6 +3523,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDerived", "apiVersions": [], @@ -3768,6 +3771,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated", "apiVersions": [], @@ -4015,6 +4019,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknown", "apiVersions": [], @@ -4262,6 +4267,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDerived", "apiVersions": [], @@ -4509,6 +4515,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDiscriminated", "apiVersions": [], @@ -4756,6 +4763,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsString", "apiVersions": [], @@ -5003,6 +5011,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsString", "apiVersions": [], @@ -5250,6 +5259,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadString", "apiVersions": [], @@ -5497,6 +5507,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloat", "apiVersions": [], @@ -5744,6 +5755,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloat", "apiVersions": [], @@ -5991,6 +6003,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloat", "apiVersions": [], @@ -6238,6 +6251,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModel", "apiVersions": [], @@ -6485,6 +6499,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModel", "apiVersions": [], @@ -6732,6 +6747,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModel", "apiVersions": [], @@ -6979,6 +6995,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArray", "apiVersions": [], @@ -7226,6 +7243,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArray", "apiVersions": [], @@ -7473,6 +7491,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArray", "apiVersions": [], @@ -7720,6 +7739,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentString", "apiVersions": [], @@ -7967,6 +7987,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentFloat", "apiVersions": [], @@ -8214,6 +8235,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModel", "apiVersions": [], @@ -8461,6 +8483,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModelArray", "apiVersions": [], @@ -8708,6 +8731,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString", "apiVersions": [], @@ -8955,6 +8979,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat", "apiVersions": [], @@ -9202,6 +9227,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel", "apiVersions": [], @@ -9449,6 +9475,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray", "apiVersions": [], @@ -9696,6 +9723,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpread", "apiVersions": [], @@ -9943,6 +9971,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordUnion", "apiVersions": [], @@ -10190,6 +10219,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion", "apiVersions": [], @@ -10437,6 +10467,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2", "apiVersions": [], @@ -10684,6 +10715,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json index cdece5aba397..6d96eb20f6ab 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json @@ -1274,6 +1274,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable", "apiVersions": [], @@ -1715,6 +1716,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.String", "apiVersions": [], @@ -2159,6 +2161,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.Bytes", "apiVersions": [], @@ -2603,6 +2606,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.Datetime", "apiVersions": [], @@ -3047,6 +3051,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.Duration", "apiVersions": [], @@ -3491,6 +3496,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte", "apiVersions": [], @@ -3935,6 +3941,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel", "apiVersions": [], @@ -4379,6 +4386,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json index c2d82cde8a26..3d2bccff4c5a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json @@ -1973,6 +1973,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional", "apiVersions": [], @@ -2414,6 +2415,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.String", "apiVersions": [], @@ -2858,6 +2860,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.Bytes", "apiVersions": [], @@ -3302,6 +3305,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.Datetime", "apiVersions": [], @@ -3746,6 +3750,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.Duration", "apiVersions": [], @@ -4190,6 +4195,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.PlainDate", "apiVersions": [], @@ -4634,6 +4640,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.PlainTime", "apiVersions": [], @@ -5078,6 +5085,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte", "apiVersions": [], @@ -5522,6 +5530,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel", "apiVersions": [], @@ -5966,6 +5975,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteral", "apiVersions": [], @@ -6410,6 +6420,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteral", "apiVersions": [], @@ -6854,6 +6865,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral", "apiVersions": [], @@ -7298,6 +7310,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral", "apiVersions": [], @@ -7742,6 +7755,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral", "apiVersions": [], @@ -8186,6 +8200,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral", "apiVersions": [], @@ -8630,6 +8645,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral", "apiVersions": [], @@ -9075,6 +9091,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json index bf01debc68ad..4c6caf13ae77 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json @@ -2469,6 +2469,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes", "apiVersions": [], @@ -2713,6 +2714,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Boolean", "apiVersions": [], @@ -2960,6 +2962,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.String", "apiVersions": [], @@ -3207,6 +3210,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Bytes", "apiVersions": [], @@ -3454,6 +3458,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Int", "apiVersions": [], @@ -3701,6 +3706,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Float", "apiVersions": [], @@ -3948,6 +3954,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal", "apiVersions": [], @@ -4195,6 +4202,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal128", "apiVersions": [], @@ -4442,6 +4450,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Datetime", "apiVersions": [], @@ -4689,6 +4698,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Duration", "apiVersions": [], @@ -4936,6 +4946,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Enum", "apiVersions": [], @@ -5183,6 +5194,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtensibleEnum", "apiVersions": [], @@ -5430,6 +5442,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Model", "apiVersions": [], @@ -5677,6 +5690,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsString", "apiVersions": [], @@ -5924,6 +5938,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsInt", "apiVersions": [], @@ -6171,6 +6186,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsModel", "apiVersions": [], @@ -6418,6 +6434,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.DictionaryString", "apiVersions": [], @@ -6665,6 +6682,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Never", "apiVersions": [], @@ -6912,6 +6930,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownString", "apiVersions": [], @@ -7159,6 +7178,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownInt", "apiVersions": [], @@ -7406,6 +7426,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownDict", "apiVersions": [], @@ -7653,6 +7674,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownArray", "apiVersions": [], @@ -7900,6 +7922,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.StringLiteral", "apiVersions": [], @@ -8147,6 +8170,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.IntLiteral", "apiVersions": [], @@ -8394,6 +8418,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.FloatLiteral", "apiVersions": [], @@ -8641,6 +8666,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.BooleanLiteral", "apiVersions": [], @@ -8888,6 +8914,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteral", "apiVersions": [], @@ -9135,6 +9162,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteral", "apiVersions": [], @@ -9382,6 +9410,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteral", "apiVersions": [], @@ -9629,6 +9658,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionEnumValue", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json index d9ba7ad082ec..586c3e113898 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json @@ -444,6 +444,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar", "apiVersions": [], @@ -706,6 +707,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.String", "apiVersions": [], @@ -971,6 +973,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.Boolean", "apiVersions": [], @@ -1236,6 +1239,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.Unknown", "apiVersions": [], @@ -1576,6 +1580,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.DecimalType", "apiVersions": [], @@ -1916,6 +1921,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.Decimal128Type", "apiVersions": [], @@ -2175,6 +2181,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.DecimalVerify", "apiVersions": [], @@ -2391,6 +2398,7 @@ "crossLanguageDefinitionId": "Type.Scalar.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Scalar.Decimal128Verify", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/tspCodeModel.json index 66a3186874da..dc3a415ed33e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/tspCodeModel.json @@ -360,6 +360,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated", "apiVersions": [], @@ -402,6 +403,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.Envelope", "apiVersions": [], @@ -447,6 +449,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.Envelope.Object", "apiVersions": [], @@ -784,6 +787,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.Envelope.Object.Default", "apiVersions": [], @@ -1121,6 +1125,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.Envelope.Object.CustomProperties", "apiVersions": [], @@ -1170,6 +1175,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.NoEnvelope", "apiVersions": [], @@ -1507,6 +1513,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.NoEnvelope.Default", "apiVersions": [], @@ -1844,6 +1851,7 @@ "crossLanguageDefinitionId": "Type.Union.Discriminated.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.Discriminated.NoEnvelope.CustomDiscriminator", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json index 6eaa7269637f..9cd07042032c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json @@ -1982,6 +1982,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Type.Union", "apiVersions": [], @@ -2221,6 +2222,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringsOnly", "apiVersions": [], @@ -2463,6 +2465,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringExtensible", "apiVersions": [], @@ -2705,6 +2708,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringExtensibleNamed", "apiVersions": [], @@ -2947,6 +2951,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.IntsOnly", "apiVersions": [], @@ -3189,6 +3194,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.FloatsOnly", "apiVersions": [], @@ -3431,6 +3437,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.ModelsOnly", "apiVersions": [], @@ -3673,6 +3680,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.EnumsOnly", "apiVersions": [], @@ -3915,6 +3923,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringAndArray", "apiVersions": [], @@ -4157,6 +4166,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiterals", "apiVersions": [], @@ -4399,6 +4409,7 @@ "crossLanguageDefinitionId": "Type.Union.endpoint" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypes", "apiVersions": [], diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/tspCodeModel.json index dbc8ef9192f2..9eedb2d2d229 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/tspCodeModel.json @@ -383,6 +383,7 @@ "crossLanguageDefinitionId": "Versioning.Added.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.Added", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/tspCodeModel.json index 0dbfd641b731..9e34ecf163db 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/tspCodeModel.json @@ -854,6 +854,7 @@ "crossLanguageDefinitionId": "Versioning.Added.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.Added", "apiVersions": [ @@ -1076,6 +1077,7 @@ "crossLanguageDefinitionId": "Versioning.Added.version" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Versioning.Added.InterfaceV2", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/tspCodeModel.json index 157aed506ac2..7ac3dee87ecd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/tspCodeModel.json @@ -395,6 +395,7 @@ "crossLanguageDefinitionId": "Versioning.MadeOptional.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.MadeOptional", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/tspCodeModel.json index 76c8eca28b30..ec32083ed9d3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/tspCodeModel.json @@ -411,6 +411,7 @@ "crossLanguageDefinitionId": "Versioning.MadeOptional.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.MadeOptional", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/tspCodeModel.json index d09ee945293b..d962c933a0b2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/tspCodeModel.json @@ -1167,6 +1167,7 @@ "crossLanguageDefinitionId": "Versioning.Removed.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.Removed", "apiVersions": [ @@ -1389,6 +1390,7 @@ "crossLanguageDefinitionId": "Versioning.Removed.version" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Versioning.Removed.InterfaceV1", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/tspCodeModel.json index 0a23449714b4..11dd0f6f6878 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/tspCodeModel.json @@ -753,6 +753,7 @@ "crossLanguageDefinitionId": "Versioning.Removed.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.Removed", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/tspCodeModel.json index 572967692eb0..b0728545eb0e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/tspCodeModel.json @@ -1118,6 +1118,7 @@ "crossLanguageDefinitionId": "Versioning.Removed.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.Removed", "apiVersions": [ @@ -1342,6 +1343,7 @@ "crossLanguageDefinitionId": "Versioning.Removed.version" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Versioning.Removed.InterfaceV1", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/tspCodeModel.json index ac931e4c074f..35d96b47bcae 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/tspCodeModel.json @@ -504,6 +504,7 @@ "crossLanguageDefinitionId": "Versioning.RenamedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.RenamedFrom", "apiVersions": [ @@ -725,6 +726,7 @@ "crossLanguageDefinitionId": "Versioning.RenamedFrom.version" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Versioning.RenamedFrom.OldInterface", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/tspCodeModel.json index 985465c61845..3b79da29a3b0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/tspCodeModel.json @@ -520,6 +520,7 @@ "crossLanguageDefinitionId": "Versioning.RenamedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.RenamedFrom", "apiVersions": [ @@ -743,6 +744,7 @@ "crossLanguageDefinitionId": "Versioning.RenamedFrom.version" } ], + "initializedBy": 0, "decorators": [], "crossLanguageDefinitionId": "Versioning.RenamedFrom.NewInterface", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/tspCodeModel.json index 3003bbae3cf8..0a43cc2d0acf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/tspCodeModel.json @@ -342,6 +342,7 @@ "crossLanguageDefinitionId": "Versioning.ReturnTypeChangedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.ReturnTypeChangedFrom", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/tspCodeModel.json index 579664286168..4ac2b2076d5f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/tspCodeModel.json @@ -358,6 +358,7 @@ "crossLanguageDefinitionId": "Versioning.ReturnTypeChangedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.ReturnTypeChangedFrom", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/tspCodeModel.json index 4f86b9e86ee5..d36f274f272d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/tspCodeModel.json @@ -395,6 +395,7 @@ "crossLanguageDefinitionId": "Versioning.TypeChangedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.TypeChangedFrom", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/tspCodeModel.json index 7383d160fccd..93566622684a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/tspCodeModel.json @@ -411,6 +411,7 @@ "crossLanguageDefinitionId": "Versioning.TypeChangedFrom.version" } ], + "initializedBy": 1, "decorators": [], "crossLanguageDefinitionId": "Versioning.TypeChangedFrom", "apiVersions": [ diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json index 85ce2e52c776..df1d444075f8 100644 --- a/eng/packages/http-client-csharp/package-lock.json +++ b/eng/packages/http-client-csharp/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3" + "@typespec/http-client-csharp": "1.0.0-alpha.20251103.8" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.30", @@ -2791,9 +2791,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20251029.3", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.3.tgz", - "integrity": "sha512-MfbuD67sfkPf14vtulmtn57z3tmKRnSXeBYEV7lbs+AFkGHggBOuV1wloFdwqPSYudZVjIJk/flkNiXbZXKrVA==", + "version": "1.0.0-alpha.20251103.8", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251103.8.tgz", + "integrity": "sha512-axVV4R4LSIRHl8Cczg93XQDmHEzTAlgWk/X40B9oNIT8TfHqDa1qIeyGG5OPcAh0sbrtOc5VNqb1LPmKQn765Q==", "license": "MIT", "peerDependencies": { "@azure-tools/typespec-client-generator-core": ">=0.61.0 < 0.62.0 || ~0.62.0-0", @@ -9141,4 +9141,4 @@ } } } -} +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json index 7b3cf2a72b52..9811ac4f7b9e 100644 --- a/eng/packages/http-client-csharp/package.json +++ b/eng/packages/http-client-csharp/package.json @@ -38,7 +38,7 @@ "dist/generator/**" ], "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3" + "@typespec/http-client-csharp": "1.0.0-alpha.20251103.8" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.30", diff --git a/eng/packages/plugins/client/Client.Plugin/ci.yml b/eng/packages/plugins/client/Client.Plugin/ci.yml index 8485fa4ad1ae..e26f690583a3 100644 --- a/eng/packages/plugins/client/Client.Plugin/ci.yml +++ b/eng/packages/plugins/client/Client.Plugin/ci.yml @@ -5,6 +5,7 @@ trigger: paths: include: - eng/packages/plugins/client/Client.Plugin + - eng/packages/http-client-csharp pr: branches: include: @@ -15,6 +16,7 @@ pr: paths: include: - eng/packages/plugins/client/Client.Plugin + - eng/packages/http-client-csharp variables: - template: /eng/pipelines/templates/variables/image.yml diff --git a/eng/packages/plugins/client/Client.Plugin/src/Client.Plugin.csproj b/eng/packages/plugins/client/Client.Plugin/src/Client.Plugin.csproj index 3076ce2177e7..167e972f5755 100644 --- a/eng/packages/plugins/client/Client.Plugin/src/Client.Plugin.csproj +++ b/eng/packages/plugins/client/Client.Plugin/src/Client.Plugin.csproj @@ -14,15 +14,15 @@ - $(MSBuildThisFileDirectory)..\..\..\..\http-client-csharp\generator\Azure.Generator\src\Visitors + $(MSBuildThisFileDirectory)..\..\..\..\http-client-csharp\generator\Azure.Generator\src\ - - - - - + + + + + diff --git a/eng/packages/plugins/client/Client.Plugin/src/ClientPlugin.cs b/eng/packages/plugins/client/Client.Plugin/src/ClientPlugin.cs index e234953472b8..f0b29c56205d 100644 --- a/eng/packages/plugins/client/Client.Plugin/src/ClientPlugin.cs +++ b/eng/packages/plugins/client/Client.Plugin/src/ClientPlugin.cs @@ -19,7 +19,7 @@ public override void Apply(CodeModelGenerator generator) // Rest of the visitors can be added in any order. generator.AddVisitor(new NamespaceVisitor()); - generator.AddVisitor(new SpecialHeadersVisitor()); + generator.AddVisitor(new SpecialHeadersVisitor(includeXmsClientRequestIdInRequest: true)); } } } diff --git a/eng/service.proj b/eng/service.proj index 801e50b1191b..9bb44b519c2d 100644 --- a/eng/service.proj +++ b/eng/service.proj @@ -107,7 +107,11 @@ SkipNonexistentTargets="true" /> - + + + + + - + - + - diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs index 0cd2f43c1f2a..9f94c80f51e3 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// AgriService_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpda /// /// /// Operation Id. - /// CreateOrUpdate. + /// AgriService_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string agriServiceResource /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string agriServiceResourceName, Cancellatio /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIfExi /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs index e2c4f2ae4404..2d7df71bd1b5 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Operation Id. - /// Get. + /// AgriService_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cancel } } - /// Update a AgriServiceResource. + /// + /// Update a AgriServiceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}. + /// + /// + /// Operation Id. + /// AgriService_Update. + /// + /// + /// Default Api Version. + /// 2024-06-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> UpdateAsync( } } - /// Update a AgriServiceResource. + /// + /// Update a AgriServiceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}. + /// + /// + /// Operation Id. + /// AgriService_Update. + /// + /// + /// Default Api Version. + /// 2024-06-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Operation Id. - /// Delete. + /// AgriService_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// AgriService_Delete. /// /// /// Default Api Version. @@ -374,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// GetAvailableSolutions. + /// AgriService_ListAvailableSolutions. /// /// /// Default Api Version. @@ -422,7 +462,7 @@ public virtual async Task> GetAvailabl /// /// /// Operation Id. - /// GetAvailableSolutions. + /// AgriService_ListAvailableSolutions. /// /// /// Default Api Version. diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/ArmAgriculturePlatformModelFactory.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/ArmAgriculturePlatformModelFactory.cs index 66b9c44f9811..0fe06797fb34 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/ArmAgriculturePlatformModelFactory.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/ArmAgriculturePlatformModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.AgriculturePlatform; using Azure.ResourceManager.Models; diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs index c2d4bcd454ab..b740d8929961 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual AgricultureServiceCollection GetAgricultureServices() return GetCachedClient(client => new AgricultureServiceCollection(client, Id)); } - /// Get a AgriServiceResource. + /// + /// Get a AgriServiceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}. + /// + /// + /// Operation Id. + /// AgriService_Get. + /// + /// + /// Default Api Version. + /// 2024-06-01-preview. + /// + /// + /// /// The name of the AgriService resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetAgricultureSe return await GetAgricultureServices().GetAsync(agriServiceResourceName, cancellationToken).ConfigureAwait(false); } - /// Get a AgriServiceResource. + /// + /// Get a AgriServiceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}. + /// + /// + /// Operation Id. + /// AgriService_Get. + /// + /// + /// Default Api Version. + /// 2024-06-01-preview. + /// + /// + /// /// The name of the AgriService resource. /// The cancellation token to use. /// is null. diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs index 976fc3af0692..6f958fb7dad7 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs @@ -213,15 +213,15 @@ protected virtual AgricultureServicePatch PersistableModelCreateCore(BinaryData /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(AgricultureServicePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(AgricultureServicePatch agricultureServicePatch) { - if (patch == null) + if (agricultureServicePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(agricultureServicePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AzureResourceManagerAgriculturePlatformContext.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AzureResourceManagerAgriculturePlatformContext.cs index eb06bdacbc5c..d1cade57a2c0 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AzureResourceManagerAgriculturePlatformContext.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AzureResourceManagerAgriculturePlatformContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.AgriculturePlatform.Models; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; @@ -33,6 +34,7 @@ namespace Azure.ResourceManager.AgriculturePlatform [ModelReaderWriterBuildable(typeof(ManagedOnBehalfOfConfiguration))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(MarketPlaceOfferDetails))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs index a4ddc15334ed..38167ba641ae 100644 --- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs +++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs @@ -533,7 +533,7 @@ public abstract partial class AgentTool : System.ClientModel.Primitives.IJsonMod { internal AgentTool() { } public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUrl, string agentCardPath = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool() { throw null; } + public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Agents.BingCustomSearchAgentTool CreateBingCustomSearchTool(Azure.AI.Agents.BingCustomSearchToolParameters parameters) { throw null; } public static Azure.AI.Agents.BingGroundingAgentTool CreateBingGroundingTool(Azure.AI.Agents.BingGroundingSearchToolParameters parameters) { throw null; } public static Azure.AI.Agents.BrowserAutomationAgentTool CreateBrowserAutomationTool(Azure.AI.Agents.BrowserAutomationToolParameters parameters) { throw null; } @@ -645,25 +645,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.AgentWorkflowActionStatus left, Azure.AI.Agents.AgentWorkflowActionStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AISearchIndexResource(string projectConnectionId) { } - public string Filter { get { throw null; } set { } } - public string IndexAssetId { get { throw null; } set { } } - public string IndexName { get { throw null; } set { } } - public string ProjectConnectionId { get { throw null; } set { } } - public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } } - public int? TopK { get { throw null; } set { } } - protected virtual Azure.AI.Agents.AISearchIndexResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Agents.AISearchIndexResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ApiInnerError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiInnerError() { } @@ -710,10 +691,10 @@ public static partial class AzureAIAgentsModelFactory public static Azure.AI.Agents.AgentVersion AgentVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Agents.AgentDefinition definition = null) { throw null; } public static Azure.AI.Agents.AgentVersionCreationOptions AgentVersionCreationOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, Azure.AI.Agents.AgentDefinition definition = null) { throw null; } public static Azure.AI.Agents.AgentWorkflowActionResponseItem AgentWorkflowActionResponseItem(string id = null, Azure.AI.Agents.CreatedBy createdBy = null, string actionId = null, string parentActionId = null, string previousActionId = null, Azure.AI.Agents.AgentWorkflowActionStatus? status = default(Azure.AI.Agents.AgentWorkflowActionStatus?)) { throw null; } - public static Azure.AI.Agents.AISearchIndexResource AISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Agents.ApiInnerError ApiInnerError(string code = null, Azure.AI.Agents.ApiInnerError innererror = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchToolResource AzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Agents.AzureFunctionAgentTool AzureFunctionAgentTool(Azure.AI.Agents.AzureFunctionDefinition azureFunction = null) { throw null; } public static Azure.AI.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Agents.AzureFunctionBinding outputBinding = null) { throw null; } @@ -774,12 +755,13 @@ public static partial class AzureAIAgentsModelFactory public static Azure.AI.Agents.ToolArgumentBinding ToolArgumentBinding(string toolName = null, string argumentName = null) { throw null; } public static Azure.AI.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Agents.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } - public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflow = null) { throw null; } + public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflowYaml = null) { throw null; } } public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch) { } - public Azure.AI.Agents.AzureAISearchToolResource AzureAiSearch { get { throw null; } set { } } + public AzureAISearchAgentTool() { } + public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options) { } + public Azure.AI.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } } protected override Azure.AI.Agents.AgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Agents.AgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -790,6 +772,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureAISearchIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureAISearchIndex(string projectConnectionId) { } + public string Filter { get { throw null; } set { } } + public string IndexAssetId { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + public string ProjectConnectionId { get { throw null; } set { } } + public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } } + public int? TopK { get { throw null; } set { } } + protected virtual Azure.AI.Agents.AzureAISearchIndex JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Agents.AzureAISearchIndex PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AzureAISearchQueryType : System.IEquatable { @@ -812,19 +813,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.AzureAISearchQueryType left, Azure.AI.Agents.AzureAISearchQueryType right) { throw null; } public override string ToString() { throw null; } } - public partial class AzureAISearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureAISearchToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureAISearchToolResource() { } - public System.Collections.Generic.IList Indexes { get { throw null; } } - protected virtual Azure.AI.Agents.AzureAISearchToolResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public AzureAISearchToolOptions() { } + public System.Collections.Generic.IList Indexes { get { throw null; } } + protected virtual Azure.AI.Agents.AzureAISearchToolOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Agents.AzureAISearchToolResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.Agents.AzureAISearchToolOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class AzureFunctionAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1797,12 +1798,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ResponseCreationOptionsExtensions { + public static void AddStructuredInput(this OpenAI.Responses.ResponseCreationOptions options, string key, string value) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentRecord agentObject, string version = null) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentReference agentReference) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentVersion agentVersion) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string agentName, string version = null) { } public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentConversation conversation) { } public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string conversationId) { } + public static void SetStructuredInputs(this OpenAI.Responses.ResponseCreationOptions options, System.BinaryData structuredInputsBytes) { } } public static partial class ResponseItemExtensions { @@ -1920,8 +1923,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class WorkflowAgentDefinition : Azure.AI.Agents.AgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkflowAgentDefinition() { } - public System.BinaryData TriggerBytes { get { throw null; } set { } } - public string Workflow { get { throw null; } set { } } + public static Azure.AI.Agents.WorkflowAgentDefinition FromYaml(string workflowYamlDocument) { throw null; } protected override Azure.AI.Agents.AgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Agents.AgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs index a4ddc15334ed..38167ba641ae 100644 --- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs @@ -533,7 +533,7 @@ public abstract partial class AgentTool : System.ClientModel.Primitives.IJsonMod { internal AgentTool() { } public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUrl, string agentCardPath = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool() { throw null; } + public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Agents.BingCustomSearchAgentTool CreateBingCustomSearchTool(Azure.AI.Agents.BingCustomSearchToolParameters parameters) { throw null; } public static Azure.AI.Agents.BingGroundingAgentTool CreateBingGroundingTool(Azure.AI.Agents.BingGroundingSearchToolParameters parameters) { throw null; } public static Azure.AI.Agents.BrowserAutomationAgentTool CreateBrowserAutomationTool(Azure.AI.Agents.BrowserAutomationToolParameters parameters) { throw null; } @@ -645,25 +645,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.AgentWorkflowActionStatus left, Azure.AI.Agents.AgentWorkflowActionStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AISearchIndexResource(string projectConnectionId) { } - public string Filter { get { throw null; } set { } } - public string IndexAssetId { get { throw null; } set { } } - public string IndexName { get { throw null; } set { } } - public string ProjectConnectionId { get { throw null; } set { } } - public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } } - public int? TopK { get { throw null; } set { } } - protected virtual Azure.AI.Agents.AISearchIndexResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Agents.AISearchIndexResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ApiInnerError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiInnerError() { } @@ -710,10 +691,10 @@ public static partial class AzureAIAgentsModelFactory public static Azure.AI.Agents.AgentVersion AgentVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Agents.AgentDefinition definition = null) { throw null; } public static Azure.AI.Agents.AgentVersionCreationOptions AgentVersionCreationOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, Azure.AI.Agents.AgentDefinition definition = null) { throw null; } public static Azure.AI.Agents.AgentWorkflowActionResponseItem AgentWorkflowActionResponseItem(string id = null, Azure.AI.Agents.CreatedBy createdBy = null, string actionId = null, string parentActionId = null, string previousActionId = null, Azure.AI.Agents.AgentWorkflowActionStatus? status = default(Azure.AI.Agents.AgentWorkflowActionStatus?)) { throw null; } - public static Azure.AI.Agents.AISearchIndexResource AISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Agents.ApiInnerError ApiInnerError(string code = null, Azure.AI.Agents.ApiInnerError innererror = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch = null) { throw null; } - public static Azure.AI.Agents.AzureAISearchToolResource AzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } + public static Azure.AI.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Agents.AzureFunctionAgentTool AzureFunctionAgentTool(Azure.AI.Agents.AzureFunctionDefinition azureFunction = null) { throw null; } public static Azure.AI.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Agents.AzureFunctionBinding outputBinding = null) { throw null; } @@ -774,12 +755,13 @@ public static partial class AzureAIAgentsModelFactory public static Azure.AI.Agents.ToolArgumentBinding ToolArgumentBinding(string toolName = null, string argumentName = null) { throw null; } public static Azure.AI.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Agents.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } - public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflow = null) { throw null; } + public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflowYaml = null) { throw null; } } public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch) { } - public Azure.AI.Agents.AzureAISearchToolResource AzureAiSearch { get { throw null; } set { } } + public AzureAISearchAgentTool() { } + public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options) { } + public Azure.AI.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } } protected override Azure.AI.Agents.AgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Agents.AgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -790,6 +772,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureAISearchIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureAISearchIndex(string projectConnectionId) { } + public string Filter { get { throw null; } set { } } + public string IndexAssetId { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + public string ProjectConnectionId { get { throw null; } set { } } + public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } } + public int? TopK { get { throw null; } set { } } + protected virtual Azure.AI.Agents.AzureAISearchIndex JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Agents.AzureAISearchIndex PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AzureAISearchQueryType : System.IEquatable { @@ -812,19 +813,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.AzureAISearchQueryType left, Azure.AI.Agents.AzureAISearchQueryType right) { throw null; } public override string ToString() { throw null; } } - public partial class AzureAISearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureAISearchToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AzureAISearchToolResource() { } - public System.Collections.Generic.IList Indexes { get { throw null; } } - protected virtual Azure.AI.Agents.AzureAISearchToolResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public AzureAISearchToolOptions() { } + public System.Collections.Generic.IList Indexes { get { throw null; } } + protected virtual Azure.AI.Agents.AzureAISearchToolOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Agents.AzureAISearchToolResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.AI.Agents.AzureAISearchToolOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class AzureFunctionAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1797,12 +1798,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ResponseCreationOptionsExtensions { + public static void AddStructuredInput(this OpenAI.Responses.ResponseCreationOptions options, string key, string value) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentRecord agentObject, string version = null) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentReference agentReference) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentVersion agentVersion) { } public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string agentName, string version = null) { } public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentConversation conversation) { } public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string conversationId) { } + public static void SetStructuredInputs(this OpenAI.Responses.ResponseCreationOptions options, System.BinaryData structuredInputsBytes) { } } public static partial class ResponseItemExtensions { @@ -1920,8 +1923,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class WorkflowAgentDefinition : Azure.AI.Agents.AgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkflowAgentDefinition() { } - public System.BinaryData TriggerBytes { get { throw null; } set { } } - public string Workflow { get { throw null; } set { } } + public static Azure.AI.Agents.WorkflowAgentDefinition FromYaml(string workflowYamlDocument) { throw null; } protected override Azure.AI.Agents.AgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Agents.AgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/ai/Azure.AI.Agents/assets.json b/sdk/ai/Azure.AI.Agents/assets.json index 20a5b6937fb9..0e6cdc91e702 100644 --- a/sdk/ai/Azure.AI.Agents/assets.json +++ b/sdk/ai/Azure.AI.Agents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Agents", - "Tag": "net/ai/Azure.AI.Agents_34436e25a0" + "Tag": "net/ai/Azure.AI.Agents_80325b3756" } diff --git a/sdk/ai/Azure.AI.Agents/samples/Sample5_MemorySearchTool.md b/sdk/ai/Azure.AI.Agents/samples/Sample5_MemorySearchTool.md index a35c6ad10014..15b69919a893 100644 --- a/sdk/ai/Azure.AI.Agents/samples/Sample5_MemorySearchTool.md +++ b/sdk/ai/Azure.AI.Agents/samples/Sample5_MemorySearchTool.md @@ -142,10 +142,11 @@ memoryClient.UpdateMemories(memoryStore.Id, scope, updateItems); Synchronous sample: ```C# Snippet:Sample_CheckMemorySearch_Sync -MemorySearchOptions opts = new( - maxMemories: 1, - items: [ResponseItem.CreateUserMessageItem("What was the joke?")], - additionalBinaryDataProperties: null); +MemorySearchOptions opts = new() +{ + MaxMemories = 1, + Items = { ResponseItem.CreateUserMessageItem("What was the joke?") }, +}; MemoryStoreSearchResponse resp = memoryClient.SearchMemories( memoryStoreId: memoryStore.Id, scope: scope, @@ -161,10 +162,11 @@ Console.WriteLine("==End of memory search tool output.=="); Asynchronous sample: ```C# Snippet:Sample_CheckMemorySearch_Async -MemorySearchOptions opts = new( - maxMemories: 1, - items: [ResponseItem.CreateUserMessageItem("What was the joke?")], - additionalBinaryDataProperties: null); +MemorySearchOptions opts = new() +{ + MaxMemories = 1, + Items = { ResponseItem.CreateUserMessageItem("What was the joke?") }, +}; MemoryStoreSearchResponse resp = await memoryClient.SearchMemoriesAsync( memoryStoreId: memoryStore.Id, scope: scope, diff --git a/sdk/ai/Azure.AI.Agents/samples/Sample8_FileSearch.md b/sdk/ai/Azure.AI.Agents/samples/Sample8_FileSearch.md index 73b7bc36f257..17074788f822 100644 --- a/sdk/ai/Azure.AI.Agents/samples/Sample8_FileSearch.md +++ b/sdk/ai/Azure.AI.Agents/samples/Sample8_FileSearch.md @@ -16,23 +16,23 @@ OpenAIClient openAIClient = client.GetOpenAIClient(); Synchronous sample: ```C# Snippet:Sample_UploadFile_FileSearch_Sync string filePath = "sample_file_for_upload.txt"; -System.IO.File.WriteAllText( +File.WriteAllText( path: filePath, contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); OpenAIFileClient fileClient = openAIClient.GetOpenAIFileClient(); OpenAIFile uploadedFile = fileClient.UploadFile(filePath: filePath, purpose: FileUploadPurpose.Assistants); -System.IO.File.Delete(filePath); +File.Delete(filePath); ``` Asynchronous sample: ```C# Snippet:Sample_UploadFile_FileSearch_Async string filePath = "sample_file_for_upload.txt"; -System.IO.File.WriteAllText( +File.WriteAllText( path: filePath, contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); OpenAIFileClient fileClient = openAIClient.GetOpenAIFileClient(); OpenAIFile uploadedFile = await fileClient.UploadFileAsync(filePath: filePath, purpose: FileUploadPurpose.Assistants); -System.IO.File.Delete(filePath); +File.Delete(filePath); ``` 3. Create the `VectorStore` and provide it with uploaded file ID. @@ -40,25 +40,23 @@ System.IO.File.Delete(filePath); Synchronous sample: ```C# Snippet:Sample_CreateVectorStore_FileSearch_Sync VectorStoreClient vctStoreClient = openAIClient.GetVectorStoreClient(); -VectorStoreCreationOptions vctOptions = new() +VectorStoreCreationOptions options = new() { Name = "MySampleStore", FileIds = { uploadedFile.Id } }; -VectorStore vectorStore = vctStoreClient.CreateVectorStore(options: vctOptions); +VectorStore vectorStore = vctStoreClient.CreateVectorStore(options: options); ``` Asynchronous sample: ```C# Snippet:Sample_CreateVectorStore_FileSearch_Async VectorStoreClient vctStoreClient = openAIClient.GetVectorStoreClient(); -VectorStoreCreationOptions vctOptions = new() +VectorStoreCreationOptions options = new() { Name = "MySampleStore", FileIds = { uploadedFile.Id } }; -VectorStore vectorStore = await vctStoreClient.CreateVectorStoreAsync( - new VectorStoreCreationOptions() -); +VectorStore vectorStore = await vctStoreClient.CreateVectorStoreAsync(options); ``` 2. Now we can create an agent capable of using File search. @@ -68,13 +66,12 @@ Synchronous sample: PromptAgentDefinition agentDefinition = new(model: modelDeploymentName) { Instructions = "You are a helpful agent that can help fetch data from files you know about.", - Tools = { - ResponseTool.CreateFileSearchTool(vectorStoreIds: [vectorStore.Id]), - } + Tools = { ResponseTool.CreateFileSearchTool(vectorStoreIds: [vectorStore.Id]), } }; AgentVersion agentVersion = client.CreateAgentVersion( agentName: "myAgent", - definition: agentDefinition, options: null); + definition: agentDefinition, + options: null); ``` Asynchronous sample: @@ -82,13 +79,12 @@ Asynchronous sample: PromptAgentDefinition agentDefinition = new(model: modelDeploymentName) { Instructions = "You are a helpful agent that can help fetch data from files you know about.", - Tools = { - ResponseTool.CreateFileSearchTool(vectorStoreIds: [vectorStore.Id]), - } + Tools = { ResponseTool.CreateFileSearchTool(vectorStoreIds: [vectorStore.Id]), } }; AgentVersion agentVersion = await client.CreateAgentVersionAsync( agentName: "myAgent", - definition: agentDefinition, options: null); + definition: agentDefinition, + options: null); ``` 3. In this example we will ask a question to the file contents. diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs index 06708a273ab7..8340abc18da4 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs @@ -5,7 +5,6 @@ using System; using System.ClientModel.Primitives; -using System.Collections.Generic; using OpenAI; using OpenAI.Responses; @@ -19,7 +18,7 @@ public abstract partial class AgentTool public static BingGroundingAgentTool CreateBingGroundingTool(BingGroundingSearchToolParameters parameters) => new BingGroundingAgentTool(parameters); public static MicrosoftFabricAgentTool CreateMicrosoftFabricTool(FabricDataAgentToolParameters parameters) => new MicrosoftFabricAgentTool(parameters); public static SharepointAgentTool CreateSharepointTool(SharepointGroundingToolParameters parameters) => new SharepointAgentTool(parameters); - public static AzureAISearchAgentTool CreateAzureAISearchTool() => new AzureAISearchAgentTool(); + public static AzureAISearchAgentTool CreateAzureAISearchTool(AzureAISearchToolOptions options = null) => new AzureAISearchAgentTool(options ?? new()); public static OpenApiAgentTool CreateOpenApiTool(OpenApiFunctionDefinition definition) => new OpenApiAgentTool(definition); public static BingCustomSearchAgentTool CreateBingCustomSearchTool(BingCustomSearchToolParameters parameters) => new BingCustomSearchAgentTool(parameters); public static BrowserAutomationAgentTool CreateBrowserAutomationTool(BrowserAutomationToolParameters parameters) => new BrowserAutomationAgentTool(parameters); diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs new file mode 100644 index 000000000000..e5b43958e8ca --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +#pragma warning disable OPENAI001 + +using System; +using OpenAI; + +namespace Azure.AI.Agents; + +[CodeGenType("AzureAISearchAgentTool")] +public partial class AzureAISearchAgentTool +{ + /// Options applied to the instance. + [CodeGenMember("AzureAiSearch")] + public AzureAISearchToolOptions Options { get; set; } + + /// Initializes a new instance of . + public AzureAISearchAgentTool() : this(options: new()) + { + } + + /// The azure ai search index resource. + /// is null. + public AzureAISearchAgentTool(AzureAISearchToolOptions options) : base(ToolType.AzureAiSearch) + { + Argument.AssertNotNull(options, nameof(options)); + + Options = options; + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs new file mode 100644 index 000000000000..018a2e1572e4 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +#pragma warning disable OPENAI001 + +namespace Azure.AI.Agents; + +[CodeGenType("AISearchIndexResource")] +public partial class AzureAISearchIndex +{ +} diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs new file mode 100644 index 000000000000..d2d469a2eaf3 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; + +#pragma warning disable OPENAI001 + +namespace Azure.AI.Agents; + +[CodeGenType("AzureAISearchToolResource")] +public partial class AzureAISearchToolOptions +{ + /// + /// The indices attached to this agent. There can be a maximum of 1 index + /// resource attached to the agent. + /// + [CodeGenMember("IndexList")] + public IList Indexes { get; } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs index b5cfa6827e4c..e58e4e09e54f 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs @@ -7,6 +7,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Reflection; +using System.Text.Json.Nodes; #pragma warning disable OPENAI001 @@ -21,34 +22,83 @@ internal static void SetAdditionalProperty(this T instance, string key, U object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance); IDictionary additionalData = (IDictionary)existingSerializedAdditionalRawData ?? new Dictionary(); - BinaryData writtenBinaryData = value switch - { - BinaryData binaryDataObject => binaryDataObject, - string stringObject => BinaryData.FromString(stringObject), - _ => ModelReaderWriter.Write(value, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default), - }; - additionalData[key] = writtenBinaryData; + additionalData[key] = GetBinaryData(value); additionalDataProperty.SetValue(instance, additionalData); } - internal static U GetAdditionalProperty(this T instance, string key) + internal static bool TryGetAdditionalProperty(this T instance, string key, out U value) + where T : IJsonModel { PropertyInfo additionalDataProperty = instance.GetType().GetProperty("SerializedAdditionalRawData", BindingFlags.Instance | BindingFlags.NonPublic); object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance); - IDictionary additionalData = (IDictionary)existingSerializedAdditionalRawData; - if (additionalData?.TryGetValue(key, out BinaryData valueBytes) != true) + if (instance.GetAdditionalProperty(key) is BinaryData valueBytes) { - return default(U); + if (typeof(U) == typeof(string)) + { + value = (U)(object)valueBytes.ToString(); + return true; + } + else if (typeof(U) == typeof(IDictionary) + && JsonNode.Parse(valueBytes.ToString()) is JsonObject dictionaryValueObject) + { + IDictionary valueDictionary = new ChangeTrackingDictionary(); + foreach (KeyValuePair dictionaryPair in dictionaryValueObject) + { + valueDictionary.Add(dictionaryPair.Key, BinaryData.FromString(dictionaryPair.Value.ToString())); + } + value = (U)(object)valueDictionary; + return true; + } } + value = default; + return false; + } - if (typeof(U) == typeof(string)) + private static BinaryData GetBinaryData(T input) + { + if (input is BinaryData passthroughBinaryData) + { + return passthroughBinaryData; + } + else if (input is string stringData) + { + return BinaryData.FromString(stringData); + } + else if (input is IPersistableModel) + { + return ModelReaderWriter.Write(input, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default); + } + else if (input is IDictionary binaryDataDictionary) { - return (U)(object)valueBytes.ToString(); + JsonObject dictionaryObject = new(); + foreach (KeyValuePair dictionaryPair in binaryDataDictionary) + { + dictionaryObject[dictionaryPair.Key] = JsonNode.Parse(dictionaryPair.Value.ToString()); + } + return BinaryData.FromString(dictionaryObject.ToString()); } - else + return null; + } + + private static IDictionary GetAdditionalProperties(this T instance) + where T : IJsonModel + { + PropertyInfo additionalDataProperty = instance + .GetType() + .GetProperty( + "SerializedAdditionalRawData", + BindingFlags.Instance | BindingFlags.NonPublic); + return additionalDataProperty.GetValue(instance) as IDictionary; + } + + private static BinaryData GetAdditionalProperty(this T instance, string key) + where T : IJsonModel + { + if (instance.GetAdditionalProperties()?.TryGetValue(key, out BinaryData value) == true) { - throw new NotImplementedException(); + return value; } + return null; } } diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs index 5eff3909d8e1..0eae489b61ff 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs @@ -199,9 +199,12 @@ public static void AddAzureFinetuningParityPolicy(OpenAIClientOptions options) "Content-Disposition: form-data; name=file; filename=([^;]*);.*") is Match fileContentDispositionMatch && fileContentDispositionMatch.Success) { - newRequestWriter.WriteLine("Content-Type: application/octet-stream"); + // We are explicitly set the line ending as + // WriteLine will add only \n symbol on Unix systems, + // Which will result in error 400 on te service side. + newRequestWriter.Write("Content-Type: application/octet-stream\r\n"); } - newRequestWriter.WriteLine(line); + newRequestWriter.Write($"{line}\r\n"); previousLine = line; } @@ -216,7 +219,13 @@ public static void AddAzureFinetuningParityPolicy(OpenAIClientOptions options) if (message?.Response is not null) { message?.Response.BufferContent(); - if (JsonNode.Parse(message?.Response?.ContentStream) is JsonObject responseObject + + // Only parse as JSON if the response Content-Type indicates JSON + string contentType = message?.Response?.Headers?.TryGetValue("Content-Type", out string ct) == true ? ct : string.Empty; + bool isJsonResponse = contentType.IndexOf("application/json", StringComparison.OrdinalIgnoreCase) >= 0; + + if (isJsonResponse + && JsonNode.Parse(message?.Response?.ContentStream) is JsonObject responseObject && responseObject.TryGetPropertyValue("status", out JsonNode statusNode) && statusNode is JsonValue statusValue && !Enum.TryParse(statusValue.ToString(), out FileStatus _)) diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs index 553a5e058f1e..af3cb32de24a 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs @@ -2,7 +2,11 @@ // Licensed under the MIT License. using System; +using System.ClientModel; using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Text.Json; using OpenAI.Files; #pragma warning disable CS0618 @@ -13,10 +17,18 @@ public static partial class OpenAIFileExtensions { public static string GetAzureFileStatus(this OpenAIFile file) { - if (AdditionalPropertyHelpers.GetAdditionalProperty(file, "_sdk_status") is string extraStatusValue - && extraStatusValue.Length > 2) + using BinaryContent contentBytes = BinaryContent.Create(file, ModelSerializationExtensions.WireOptions); + using var stream = new MemoryStream(); + contentBytes.WriteTo(stream); + string json = Encoding.UTF8.GetString(stream.ToArray()); + JsonDocument doc = JsonDocument.Parse(json); + if (doc.RootElement.TryGetProperty("_sdk_status", out JsonElement extraStatusElement)) { - return extraStatusValue.Substring(1, extraStatusValue.Length - 2); + string extraStatusValue = extraStatusElement.GetString(); + if (!string.IsNullOrEmpty(extraStatusValue)) + { + return extraStatusValue; + } } return null; } diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs index 19a50e93f5f0..c4f2faf614b2 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs @@ -6,10 +6,11 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.Reflection; +using System.Text.Json.Nodes; using OpenAI.Responses; #pragma warning disable OPENAI001 +#pragma warning disable SCME0001 namespace Azure.AI.Agents; @@ -22,9 +23,9 @@ public static partial class ResponseCreationOptionsExtensions /// public static void SetAgentReference(this ResponseCreationOptions responseCreationOptions, AgentReference agentReference) { - AdditionalPropertyHelpers.SetAdditionalProperty(responseCreationOptions, "agent", agentReference); - // Agent specification is mutually exclusive with model specification; see internal issue 4770700 - AdditionalPropertyHelpers.SetAdditionalProperty(responseCreationOptions, "model", BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray())); + BinaryData agentReferenceBin = ModelReaderWriter.Write(agentReference, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default); + responseCreationOptions.Patch.Set("$.agent"u8, agentReferenceBin); + responseCreationOptions.Patch.Remove("$.model"u8); } /// @@ -60,9 +61,7 @@ public static void SetAgentReference(this ResponseCreationOptions responseCreati /// public static void SetConversationReference(this ResponseCreationOptions responseCreationOptions, string conversationId) { - responseCreationOptions.SetAdditionalProperty( - "conversation", - BinaryData.FromString($"\"{conversationId}\"")); + responseCreationOptions.Patch.Set("$.conversation"u8, $"{conversationId}"); } /// @@ -72,4 +71,19 @@ public static void SetConversationReference(this ResponseCreationOptions respons /// public static void SetConversationReference(this ResponseCreationOptions responseCreationOptions, AgentConversation conversation) => SetConversationReference(responseCreationOptions, conversation.Id); + + public static void AddStructuredInput(this ResponseCreationOptions options, string key, string value) + { + IDictionary structuredInputs + = options.TryGetAdditionalProperty("structured_inputs", out IDictionary existingDictionary) + ? existingDictionary + : new ChangeTrackingDictionary(); + structuredInputs[key] = BinaryData.FromString(JsonValue.Create(value).ToJsonString()); + options.SetAdditionalProperty("structured_inputs", structuredInputs); + } + + public static void SetStructuredInputs(this ResponseCreationOptions options, BinaryData structuredInputsBytes) + { + options.SetAdditionalProperty("structured_inputs", structuredInputsBytes); + } } diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs index 9900cd69d1c0..57b030dc25aa 100644 --- a/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs @@ -3,15 +3,19 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Text.Json; - namespace Azure.AI.Agents; [CodeGenType("WorkflowDefinition")] public partial class WorkflowAgentDefinition { - [CodeGenMember("Trigger")] - public BinaryData TriggerBytes { get; set; } + public static WorkflowAgentDefinition FromYaml(string workflowYamlDocument) + { + return new() + { + WorkflowYaml = workflowYamlDocument, + }; + } + + [CodeGenMember("Workflow")] + private string WorkflowYaml { get; set; } } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs index daf94e7bbc19..5419fe6df22a 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs @@ -84,11 +84,11 @@ public static RaiConfig RaiConfig(string raiPolicyName = default) /// The workflow specification in CSDL format. /// Configuration for Responsible AI (RAI) content filtering and safety features. - /// The CSDL YAML definition of the workflow. + /// The CSDL YAML definition of the workflow. /// A new instance for mocking. - public static WorkflowAgentDefinition WorkflowAgentDefinition(RaiConfig raiConfig = default, string workflow = default) + public static WorkflowAgentDefinition WorkflowAgentDefinition(RaiConfig raiConfig = default, string workflowYaml = default) { - return new WorkflowAgentDefinition(AgentKind.Workflow, raiConfig, additionalBinaryDataProperties: null, workflow); + return new WorkflowAgentDefinition(AgentKind.Workflow, raiConfig, additionalBinaryDataProperties: null, workflowYaml); } /// The hosted agent definition. @@ -220,11 +220,11 @@ public static SharepointGroundingToolParameters SharepointGroundingToolParameter } /// The input definition information for an Azure AI search tool as used to configure an agent. - /// The azure ai search index resource. + /// The azure ai search index resource. /// A new instance for mocking. - public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolResource azureAiSearch = default) + public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolOptions options = default) { - return new AzureAISearchAgentTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, azureAiSearch); + return new AzureAISearchAgentTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, options); } /// A set of index resources used by the `azure_ai_search` tool. @@ -232,12 +232,12 @@ public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolRes /// The indices attached to this agent. There can be a maximum of 1 index /// resource attached to the agent. /// - /// A new instance for mocking. - public static AzureAISearchToolResource AzureAISearchToolResource(IEnumerable indexes = default) + /// A new instance for mocking. + public static AzureAISearchToolOptions AzureAISearchToolOptions(IEnumerable indexes = default) { - indexes ??= new ChangeTrackingList(); + indexes ??= new ChangeTrackingList(); - return new AzureAISearchToolResource(indexes.ToList(), additionalBinaryDataProperties: null); + return new AzureAISearchToolOptions(indexes.ToList(), additionalBinaryDataProperties: null); } /// A AI Search Index resource. @@ -247,10 +247,10 @@ public static AzureAISearchToolResource AzureAISearchToolResource(IEnumerable Number of documents to retrieve from search and present to the model. /// filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters). /// Index asset id for search resource. - /// A new instance for mocking. - public static AISearchIndexResource AISearchIndexResource(string projectConnectionId = default, string indexName = default, AzureAISearchQueryType? queryType = default, int? topK = default, string filter = default, string indexAssetId = default) + /// A new instance for mocking. + public static AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = default, string indexName = default, AzureAISearchQueryType? queryType = default, int? topK = default, string filter = default, string indexAssetId = default) { - return new AISearchIndexResource( + return new AzureAISearchIndex( projectConnectionId, indexName, queryType, diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs index b7b83c10b23f..94132e87f187 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs @@ -35,10 +35,10 @@ namespace Azure.AI.Agents [ModelReaderWriterBuildable(typeof(AgentVersion))] [ModelReaderWriterBuildable(typeof(AgentVersionCreationOptions))] [ModelReaderWriterBuildable(typeof(AgentWorkflowActionResponseItem))] - [ModelReaderWriterBuildable(typeof(AISearchIndexResource))] [ModelReaderWriterBuildable(typeof(ApiInnerError))] [ModelReaderWriterBuildable(typeof(AzureAISearchAgentTool))] - [ModelReaderWriterBuildable(typeof(AzureAISearchToolResource))] + [ModelReaderWriterBuildable(typeof(AzureAISearchIndex))] + [ModelReaderWriterBuildable(typeof(AzureAISearchToolOptions))] [ModelReaderWriterBuildable(typeof(AzureFunctionAgentTool))] [ModelReaderWriterBuildable(typeof(AzureFunctionBinding))] [ModelReaderWriterBuildable(typeof(AzureFunctionDefinition))] diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs index 8800d28e5e2b..bc8f66d6d37b 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs @@ -13,11 +13,6 @@ namespace Azure.AI.Agents /// The input definition information for an Azure AI search tool as used to configure an agent. public partial class AzureAISearchAgentTool : AgentTool, IJsonModel { - /// Initializes a new instance of for deserialization. - internal AzureAISearchAgentTool() - { - } - /// The JSON writer. /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) @@ -38,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azure_ai_search"u8); - writer.WriteObjectValue(AzureAiSearch, options); + writer.WriteObjectValue(Options, options); } /// The JSON reader. @@ -68,7 +63,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle } ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - AzureAISearchToolResource azureAiSearch = default; + AzureAISearchToolOptions options0 = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -78,7 +73,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle } if (prop.NameEquals("azure_ai_search"u8)) { - azureAiSearch = AzureAISearchToolResource.DeserializeAzureAISearchToolResource(prop.Value, options); + options0 = AzureAISearchToolOptions.DeserializeAzureAISearchToolOptions(prop.Value, options); continue; } if (options.Format != "W") @@ -86,7 +81,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureAISearchAgentTool(@type, additionalBinaryDataProperties, azureAiSearch); + return new AzureAISearchAgentTool(@type, additionalBinaryDataProperties, options0); } /// The client options for reading and writing models. diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs index 1c7660627703..f3390c700dad 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs @@ -11,26 +11,13 @@ namespace Azure.AI.Agents /// The input definition information for an Azure AI search tool as used to configure an agent. public partial class AzureAISearchAgentTool : AgentTool { - /// Initializes a new instance of . - /// The azure ai search index resource. - /// is null. - public AzureAISearchAgentTool(AzureAISearchToolResource azureAiSearch) : base(ToolType.AzureAiSearch) - { - Argument.AssertNotNull(azureAiSearch, nameof(azureAiSearch)); - - AzureAiSearch = azureAiSearch; - } - /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - /// The azure ai search index resource. - internal AzureAISearchAgentTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureAISearchToolResource azureAiSearch) : base(@type, additionalBinaryDataProperties) + /// The azure ai search index resource. + internal AzureAISearchAgentTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureAISearchToolOptions options) : base(@type, additionalBinaryDataProperties) { - AzureAiSearch = azureAiSearch; + Options = options; } - - /// The azure ai search index resource. - public AzureAISearchToolResource AzureAiSearch { get; set; } } } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs similarity index 75% rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs index 10b10ce1b459..e87513d63bee 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs @@ -10,16 +10,16 @@ namespace Azure.AI.Agents { /// A AI Search Index resource. - public partial class AISearchIndexResource : IJsonModel + public partial class AzureAISearchIndex : IJsonModel { - /// Initializes a new instance of for deserialization. - internal AISearchIndexResource() + /// Initializes a new instance of for deserialization. + internal AzureAISearchIndex() { } /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support writing '{format}' format."); } writer.WritePropertyName("project_connection_id"u8); writer.WriteStringValue(ProjectConnectionId); @@ -81,24 +81,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - AISearchIndexResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + AzureAISearchIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual AISearchIndexResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual AzureAISearchIndex JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAISearchIndexResource(document.RootElement, options); + return DeserializeAzureAISearchIndex(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonElement element, ModelReaderWriterOptions options) + internal static AzureAISearchIndex DeserializeAzureAISearchIndex(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -156,7 +156,7 @@ internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AISearchIndexResource( + return new AzureAISearchIndex( projectConnectionId, indexName, queryType, @@ -167,43 +167,43 @@ internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonEleme } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureAIAgentsContext.Default); default: - throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support writing '{options.Format}' format."); } } /// The data to parse. /// The client options for reading and writing models. - AISearchIndexResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + AzureAISearchIndex IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The data to parse. /// The client options for reading and writing models. - protected virtual AISearchIndexResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual AzureAISearchIndex PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeAISearchIndexResource(document.RootElement, options); + return DeserializeAzureAISearchIndex(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs similarity index 87% rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs index 6b1fb921e616..968801afdb29 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs @@ -8,22 +8,22 @@ namespace Azure.AI.Agents { /// A AI Search Index resource. - public partial class AISearchIndexResource + public partial class AzureAISearchIndex { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; - /// Initializes a new instance of . + /// Initializes a new instance of . /// An index connection ID in an IndexResource attached to this agent. /// is null. - public AISearchIndexResource(string projectConnectionId) + public AzureAISearchIndex(string projectConnectionId) { Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// An index connection ID in an IndexResource attached to this agent. /// The name of an index in an IndexResource attached to this agent. /// Type of query in an AIIndexResource attached to this agent. @@ -31,7 +31,7 @@ public AISearchIndexResource(string projectConnectionId) /// filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters). /// Index asset id for search resource. /// Keeps track of any properties unknown to the library. - internal AISearchIndexResource(string projectConnectionId, string indexName, AzureAISearchQueryType? queryType, int? topK, string filter, string indexAssetId, IDictionary additionalBinaryDataProperties) + internal AzureAISearchIndex(string projectConnectionId, string indexName, AzureAISearchQueryType? queryType, int? topK, string filter, string indexAssetId, IDictionary additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; IndexName = indexName; diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs similarity index 66% rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs index 80cc4aa79d8f..faf6ba6017ea 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs @@ -10,11 +10,11 @@ namespace Azure.AI.Agents { /// A set of index resources used by the `azure_ai_search` tool. - public partial class AzureAISearchToolResource : IJsonModel + public partial class AzureAISearchToolOptions : IJsonModel { /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -25,16 +25,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Indexes)) { writer.WritePropertyName("indexes"u8); writer.WriteStartArray(); - foreach (AISearchIndexResource item in Indexes) + foreach (AzureAISearchIndex item in Indexes) { writer.WriteObjectValue(item, options); } @@ -59,30 +59,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - AzureAISearchToolResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + AzureAISearchToolOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual AzureAISearchToolResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual AzureAISearchToolOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureAISearchToolResource(document.RootElement, options); + return DeserializeAzureAISearchToolOptions(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(JsonElement element, ModelReaderWriterOptions options) + internal static AzureAISearchToolOptions DeserializeAzureAISearchToolOptions(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - IList indexes = default; + IList indexes = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -92,10 +92,10 @@ internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(J { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(AISearchIndexResource.DeserializeAISearchIndexResource(item, options)); + array.Add(AzureAISearchIndex.DeserializeAzureAISearchIndex(item, options)); } indexes = array; continue; @@ -105,47 +105,47 @@ internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(J additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureAISearchToolResource(indexes ?? new ChangeTrackingList(), additionalBinaryDataProperties); + return new AzureAISearchToolOptions(indexes ?? new ChangeTrackingList(), additionalBinaryDataProperties); } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureAIAgentsContext.Default); default: - throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support writing '{options.Format}' format."); } } /// The data to parse. /// The client options for reading and writing models. - AzureAISearchToolResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + AzureAISearchToolOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The data to parse. /// The client options for reading and writing models. - protected virtual AzureAISearchToolResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual AzureAISearchToolOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data)) { - return DeserializeAzureAISearchToolResource(document.RootElement, options); + return DeserializeAzureAISearchToolOptions(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs similarity index 61% rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs index 13429464a90d..9bd6a1995ac3 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs @@ -8,33 +8,27 @@ namespace Azure.AI.Agents { /// A set of index resources used by the `azure_ai_search` tool. - public partial class AzureAISearchToolResource + public partial class AzureAISearchToolOptions { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; - /// Initializes a new instance of . - public AzureAISearchToolResource() + /// Initializes a new instance of . + public AzureAISearchToolOptions() { - Indexes = new ChangeTrackingList(); + Indexes = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// The indices attached to this agent. There can be a maximum of 1 index /// resource attached to the agent. /// /// Keeps track of any properties unknown to the library. - internal AzureAISearchToolResource(IList indexes, IDictionary additionalBinaryDataProperties) + internal AzureAISearchToolOptions(IList indexes, IDictionary additionalBinaryDataProperties) { Indexes = indexes; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - - /// - /// The indices attached to this agent. There can be a maximum of 1 index - /// resource attached to the agent. - /// - public IList Indexes { get; } } } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs index d5da6579c83c..2f54c89059fc 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs @@ -31,10 +31,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WorkflowAgentDefinition)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Workflow)) + if (Optional.IsDefined(WorkflowYaml)) { writer.WritePropertyName("workflow"u8); - writer.WriteStringValue(Workflow); + writer.WriteStringValue(WorkflowYaml); } } @@ -66,7 +66,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE AgentKind kind = default; RaiConfig raiConfig = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - string workflow = default; + string workflowYaml = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("kind"u8)) @@ -85,7 +85,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE } if (prop.NameEquals("workflow"u8)) { - workflow = prop.Value.GetString(); + workflowYaml = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -93,7 +93,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new WorkflowAgentDefinition(kind, raiConfig, additionalBinaryDataProperties, workflow); + return new WorkflowAgentDefinition(kind, raiConfig, additionalBinaryDataProperties, workflowYaml); } /// The client options for reading and writing models. diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs index 577a4939bd90..2dbfa9919b7b 100644 --- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs @@ -19,13 +19,10 @@ public WorkflowAgentDefinition() : base(AgentKind.Workflow) /// /// Configuration for Responsible AI (RAI) content filtering and safety features. /// Keeps track of any properties unknown to the library. - /// The CSDL YAML definition of the workflow. - internal WorkflowAgentDefinition(AgentKind kind, RaiConfig raiConfig, IDictionary additionalBinaryDataProperties, string workflow) : base(kind, raiConfig, additionalBinaryDataProperties) + /// The CSDL YAML definition of the workflow. + internal WorkflowAgentDefinition(AgentKind kind, RaiConfig raiConfig, IDictionary additionalBinaryDataProperties, string workflowYaml) : base(kind, raiConfig, additionalBinaryDataProperties) { - Workflow = workflow; + WorkflowYaml = workflowYaml; } - - /// The CSDL YAML definition of the workflow. - public string Workflow { get; set; } } } diff --git a/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs b/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs index d8dc00bbc6da..2874eb9715c4 100644 --- a/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs +++ b/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs @@ -1,12 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Azure.AI.Agents.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] - // Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. // See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers // for the list of possible values. -[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.CognitiveServices")] diff --git a/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs b/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs index c3778d2e7b0f..e21b0f3868e0 100644 --- a/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs +++ b/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs @@ -11,6 +11,7 @@ namespace Azure.AI.Agents.Tests; [Category("Smoke")] +[SyncOnly] public class AgentsSmokeTests : AgentsTestBase { public AgentsSmokeTests(bool isAsync) : base(isAsync, RecordedTestMode.Live) @@ -59,14 +60,21 @@ public void TestUseAnAgentTool() { ResponseTool.CreateWebSearchTool(), AgentTool.CreateA2ATool(new Uri("https://test-uri.microsoft.com")), + new A2ATool(new Uri("https://test-uri.microsoft.com")), + AgentTool.CreateAzureAISearchTool(), + new AzureAISearchAgentTool(), + AgentTool.CreateAzureAISearchTool(new AzureAISearchToolOptions() + { + Indexes = { new AzureAISearchIndex(projectConnectionId: "project-foo") { TopK = 42 } } + }), } }; - Assert.That(responseOptions.Tools, Has.Count.EqualTo(2)); + Assert.That(responseOptions.Tools, Has.Count.EqualTo(6)); - Assert.That( - ModelReaderWriter.Write(responseOptions).ToString(), - Does.Contain("base_url")); + string serializedOptions = ModelReaderWriter.Write(responseOptions).ToString(); + Assert.That(serializedOptions, Does.Contain("base_url")); + Assert.That(serializedOptions, Does.Contain("topK")); OpenAIResponse mockResponse = ModelReaderWriter.Read(BinaryData.FromString(""" { diff --git a/sdk/ai/Azure.AI.Agents/tests/AgentsTelemetryTests.cs b/sdk/ai/Azure.AI.Agents/tests/AgentsTelemetryTests.cs index 16046e8a6c71..4840b3c69b5d 100644 --- a/sdk/ai/Azure.AI.Agents/tests/AgentsTelemetryTests.cs +++ b/sdk/ai/Azure.AI.Agents/tests/AgentsTelemetryTests.cs @@ -86,9 +86,7 @@ public async Task TestAgentCreateWithTracingActivitySourceDisabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "true", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "false", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -117,9 +115,7 @@ public async Task TestAgentCreateWithTracingContentRecordingEnabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "true", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -149,9 +145,7 @@ public async Task TestAgentCreateWithTracingContentRecordingDisabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "false", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -181,9 +175,7 @@ public async Task TestAgentUpdateWithTracingContentRecordingEnabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "true", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -234,9 +226,7 @@ public async Task TestAgentUpdateWithTracingContentRecordingDisabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "false", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -289,9 +279,7 @@ public async Task TestAgentVersionCreateWithTracingContentRecordingEnabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "true", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -323,9 +311,7 @@ public async Task TestAgentVersionCreateWithTracingContentRecordingDisabled() { Environment.SetEnvironmentVariable(TraceContentsEnvironmentVariable, "false", EnvironmentVariableTarget.Process); Environment.SetEnvironmentVariable(EnableOpenTelemetryEnvironmentVariable, "true", EnvironmentVariableTarget.Process); - var type = typeof(Azure.AI.Agents.Telemetry.OpenTelemetryScope); - var methodInfo = type.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); - methodInfo?.Invoke(null, null); + ReinitializeOpenTelemetryScopeConfiguration(); var client = GetTestClient(); var modelDeploymentName = GetModelDeploymentName(); @@ -350,6 +336,17 @@ public async Task TestAgentVersionCreateWithTracingContentRecordingDisabled() CheckCreateAgentVersionTrace(createAgentVersionSpan, modelDeploymentName, agentName, "\"\""); } + private static void ReinitializeOpenTelemetryScopeConfiguration() + { + Assembly assembly = typeof(AgentsClient).Assembly; + Assert.That(assembly, Is.Not.Null); + Type openTelemetryScopeType = assembly.GetType("Azure.AI.Agents.OpenTelemetryScope"); + Assert.That(openTelemetryScopeType, Is.Not.Null); + MethodInfo reinitializeConfigurationMethod = openTelemetryScopeType.GetMethod("ReinitializeConfiguration", BindingFlags.Static | BindingFlags.NonPublic); + Assert.That(reinitializeConfigurationMethod, Is.Not.Null); + reinitializeConfigurationMethod.Invoke(null, null); + } + #region Helpers private void CheckCreateAgentTrace(Activity createAgentSpan, string modelName, string agentName, string content) { diff --git a/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs b/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs index 25cc75e39f15..1f7a8cbcf6bb 100644 --- a/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs +++ b/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; using Microsoft.ClientModel.TestFramework; @@ -356,7 +357,6 @@ public async Task SimplePromptAgentWithoutConversation() } [RecordedTest] - [Ignore("4771165")] public async Task ErrorsGiveGoodExceptionMessages() { AgentsClient client = GetTestClient(); @@ -375,40 +375,76 @@ public async Task ErrorsGiveGoodExceptionMessages() } [Test] - [Ignore("Bug 4755051")] + public async Task StructuredInputsWork() + { + AgentsClient agentsClient = GetTestClient(); + OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions); + OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME); + + AgentVersion agent = await agentsClient.CreateAgentVersionAsync( + "TestPromptAgentFromDotnetTests2343", + new PromptAgentDefinition(TestEnvironment.MODELDEPLOYMENTNAME) + { + Instructions = "You are a friendly agent. The name of the user talking to you is {{user_name}}.", + StructuredInputs = + { + ["user_name"] = new StructuredInputDefinition() + { + DefaultValue = BinaryData.FromObjectAsJson(JsonValue.Create("Ishmael")), + } + } + }, + new AgentVersionCreationOptions() + { + Metadata = + { + ["test_delete_me"] = "true", + } + }); + + ResponseCreationOptions responseOptions = new(); + responseOptions.SetAgentReference(agent); + + ResponseItem item = ResponseItem.CreateUserMessageItem("What's my name?"); + + OpenAIResponse response = await responseClient.CreateResponseAsync([item], responseOptions); + Assert.That(response.GetOutputText(), Does.Contain("Ishmael")); + + responseOptions.AddStructuredInput("user_name", "Mr. Jingles"); + response = await responseClient.CreateResponseAsync([item], responseOptions); + Assert.That(response.GetOutputText(), Does.Contain("Mr. Jingles")); + + responseOptions.SetStructuredInputs(BinaryData.FromString(""" + { + "user_name": "Le Flufferkins" + } + """)); + response = await responseClient.CreateResponseAsync([item], responseOptions); + Assert.That(response.GetOutputText(), Does.Contain("Le Flufferkins")); + } + + [Test] public async Task SimpleWorkflowAgent() { AgentsClient agentsClient = GetTestClient(); OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions); OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME); - AgentDefinition workflowAgentDefinition = new WorkflowAgentDefinition() - { - TriggerBytes = MATH_TUTOR_TRIGGER_BYTES, - }; + AgentDefinition workflowAgentDefinition = WorkflowAgentDefinition.FromYaml(s_HelloWorkflowYaml); string agentName = null; string agentVersion = null; - AgentRecord existingAgent = await agentsClient.GetAgentAsync("TestWorkflowAgentFromDotnet"); - if (existingAgent is not null) - { - agentName = existingAgent.Name; - agentVersion = existingAgent.Versions.Latest.Version; - } - else - { - AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync( - "TestWorkflowAgentFromDotnet", - workflowAgentDefinition, - new AgentVersionCreationOptions() - { - Description = "A test agent created from the .NET SDK automation suite", - Metadata = { ["freely_deleteable"] = "true" }, - }); - agentName = newAgentVersion.Name; - agentVersion = newAgentVersion.Version; - } + AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync( + "TestWorkflowAgentFromDotnet234", + workflowAgentDefinition, + new AgentVersionCreationOptions() + { + Description = "A test agent created from the .NET SDK automation suite", + Metadata = { ["freely_deleteable"] = "true" }, + }); + agentName = newAgentVersion.Name; + agentVersion = newAgentVersion.Version; AgentConversation newConversation = await agentsClient.GetConversationClient().CreateConversationAsync(); @@ -430,42 +466,27 @@ public async Task SimpleWorkflowAgent() } [Test] - [Ignore("Bug 4755051")] public async Task SimpleWorkflowAgentStreaming() { - if (!IsAsync && Mode != RecordedTestMode.Live) - Assert.Inconclusive(STREAMING_CONSTRAINT); AgentsClient agentsClient = GetTestClient(); OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions); OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME); - AgentDefinition workflowAgentDefinition = new WorkflowAgentDefinition() - { - TriggerBytes = MATH_TUTOR_TRIGGER_BYTES, - }; + AgentDefinition workflowAgentDefinition = WorkflowAgentDefinition.FromYaml(s_HelloWorkflowYaml); string agentName = null; string agentVersion = null; - AgentRecord existingAgent = await agentsClient.GetAgentAsync("TestWorkflowAgentFromDotnet"); - if (existingAgent is not null) - { - agentName = existingAgent.Name; - agentVersion = existingAgent.Versions.Latest.Version; - } - else - { - AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync( - "TestWorkflowAgentFromDotnet", - workflowAgentDefinition, - new AgentVersionCreationOptions() - { - Description = "A test agent created from the .NET SDK automation suite", - Metadata = { ["freely_deleteable"] = "true" }, - }); - agentName = newAgentVersion.Name; - agentVersion = newAgentVersion.Version; - } + AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync( + "TestWorkflowAgentFromDotnet234", + workflowAgentDefinition, + new AgentVersionCreationOptions() + { + Description = "A test agent created from the .NET SDK automation suite", + Metadata = { ["freely_deleteable"] = "true" }, + }); + agentName = newAgentVersion.Name; + agentVersion = newAgentVersion.Version; AgentConversation newConversation = await agentsClient.GetConversationClient().CreateConversationAsync(); @@ -547,10 +568,11 @@ public async Task TestMemorySearch(bool useConversation) // Create an empty scope and make sure we cannot find anything. string scope = "Test scope"; memoryClient.UpdateMemories(store.Id, scope, items: []); - MemorySearchOptions opts = new( - maxMemories: 1, - items: [ResponseItem.CreateUserMessageItem("Name your favorite animal")], - additionalBinaryDataProperties: null); + MemorySearchOptions opts = new() + { + MaxMemories = 1, + Items = { ResponseItem.CreateUserMessageItem("Name your favorite animal") }, + }; MemoryStoreSearchResponse resp = await memoryClient.SearchMemoriesAsync( memoryStoreId: store.Id, scope: scope, @@ -799,98 +821,16 @@ public async Task TestFunctionToolMultiturnWithPersistence(TestItemPersistenceMo Assert.That(response.GetOutputText().ToLower(), Does.Contain(replyToFunctionCall.ToLower())); } - private static BinaryData MATH_TUTOR_TRIGGER_BYTES = BinaryData.FromString(""" - { - "kind": "OnConversationStart", - "id": "my_workflow", - "actions": [ - { - "kind": "SetVariable", - "id": "set_variable_input_task", - "variable": "Local.LatestMessage", - "value": "=UserMessage(System.LastMessageText)" - }, - { - "kind": "CreateConversation", - "id": "create_student_conversation", - "conversationId": "Local.StudentConversationId" - }, - { - "kind": "CreateConversation", - "id": "create_teacher_conversation", - "conversationId": "Local.TeacherConversationId" - }, - { - "kind": "InvokeAzureAgent", - "id": "student_agent", - "description": "The student node", - "conversationId": "=Local.StudentConversationId", - "agent": { - "name": "StudentAgent_123" - }, - "input": { - "messages": "=Local.LatestMessage" - }, - "output": { - "messages": "Local.LatestMessage" - } - }, - { - "kind": "InvokeAzureAgent", - "id": "teacher_agent", - "description": "The teacher node", - "conversationId": "=Local.TeacherConversationId", - "agent": { - "name": "TeacherAgent_123" - }, - "input": { - "messages": "=Local.LatestMessage" - }, - "output": { - "messages": "Local.LatestMessage" - } - }, - { - "kind": "SetVariable", - "id": "set_variable_turncount", - "variable": "Local.TurnCount", - "value": "=Local.TurnCount + 1" - }, - { - "kind": "ConditionGroup", - "id": "completion_check", - "conditions": [ - { - "condition": "=!IsBlank(Find(\"[COMPLETE]\", Upper(Last(Local.LatestMessage).Text)))", - "id": "check_done", - "actions": [ - { - "kind": "EndConversation", - "id": "end_workflow" - } - ] - }, - { - "condition": "=Local.TurnCount >= 4", - "id": "check_turn_count_exceeded", - "actions": [ - { - "kind": "SendActivity", - "id": "send_activity_tired", - "activity": "Let's try again later...I am tired." - } - ] - } - ], - "elseActions": [ - { - "kind": "GotoAction", - "id": "goto_student_agent", - "actionId": "student_agent" - } - ] - } - ] - } - """); + private static readonly string s_HelloWorkflowYaml = """ + kind: workflow + trigger: + kind: OnConversationStart + id: my_workflow + actions: + - kind: SendActivity + id: sendActivity_welcome + activity: hello world + - kind: EndConversation + id: end_conversation + """; } diff --git a/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj index 9a3abb8d9303..7e594863210b 100644 --- a/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj +++ b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj @@ -22,7 +22,7 @@ - + diff --git a/sdk/ai/Azure.AI.Agents/tests/ResponsesParityTests.cs b/sdk/ai/Azure.AI.Agents/tests/ResponsesParityTests.cs index 5d113761faa2..3e4970029288 100644 --- a/sdk/ai/Azure.AI.Agents/tests/ResponsesParityTests.cs +++ b/sdk/ai/Azure.AI.Agents/tests/ResponsesParityTests.cs @@ -27,6 +27,7 @@ public ResponsesParityTests(bool isAsync) : base(isAsync) } [RecordedTest] + [Ignore("Pending CI failure investigation (local recording seems fine)")] public async Task FileSearchToolWorks() { AgentsClient agentsClient = GetTestClient(); diff --git a/sdk/ai/Azure.AI.Agents/tests/Samples/Sample_MemorySearchTool.cs b/sdk/ai/Azure.AI.Agents/tests/Samples/Sample_MemorySearchTool.cs index e4004edc8ae2..d0c43e86a057 100644 --- a/sdk/ai/Azure.AI.Agents/tests/Samples/Sample_MemorySearchTool.cs +++ b/sdk/ai/Azure.AI.Agents/tests/Samples/Sample_MemorySearchTool.cs @@ -88,10 +88,11 @@ public async Task MemorySearchToolAsync() memoryClient.UpdateMemories(memoryStore.Id, scope, updateItems); #endregion #region Snippet:Sample_CheckMemorySearch_Async - MemorySearchOptions opts = new( - maxMemories: 1, - items: [ResponseItem.CreateUserMessageItem("What was the joke?")], - additionalBinaryDataProperties: null); + MemorySearchOptions opts = new() + { + MaxMemories = 1, + Items = { ResponseItem.CreateUserMessageItem("What was the joke?") }, + }; MemoryStoreSearchResponse resp = await memoryClient.SearchMemoriesAsync( memoryStoreId: memoryStore.Id, scope: scope, @@ -208,10 +209,11 @@ public void MemorySearchTool() memoryClient.UpdateMemories(memoryStore.Id, scope, updateItems); #endregion #region Snippet:Sample_CheckMemorySearch_Sync - MemorySearchOptions opts = new( - maxMemories: 1, - items: [ResponseItem.CreateUserMessageItem("What was the joke?")], - additionalBinaryDataProperties: null); + MemorySearchOptions opts = new() + { + MaxMemories = 1, + Items = { ResponseItem.CreateUserMessageItem("What was the joke?") }, + }; MemoryStoreSearchResponse resp = memoryClient.SearchMemories( memoryStoreId: memoryStore.Id, scope: scope, diff --git a/sdk/ai/Azure.AI.Projects/CHANGELOG.md b/sdk/ai/Azure.AI.Projects/CHANGELOG.md index abc8097bfc08..b1076d78a9de 100644 --- a/sdk/ai/Azure.AI.Projects/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Projects/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (Unreleased) ### Features Added @@ -9,7 +9,14 @@ ### Bugs Fixed ### Other Changes -* Added `files` samples for operations create, delete, list, retrieve and download. + +## 1.1.0 (2025-11-03) + +### Features Added + +- Remove `clientRequestId` parameter from `AIProjectConnectionsOperations` and `AIProjectDeploymentsOperations` methods as this value is controlled transparently by `System.ClientModel`. +- Remove `type` parameter from `AzureAIProjectsModelFactory.BlobReferenceSasCredential` as this is a hardcoded value. +- Remove `pendingUploadType` parameter from `AzureAIProjectsModelFactory.PendingUploadRequest` and `AzureAIProjectsModelFactory.PendingUploadConfiguration` as this is a hardcoded value. ## 1.0.0 (2025-10-01) @@ -82,7 +89,7 @@ `AIProjectsClient` to create, run and delete agents. However there have been some breaking changes in these operations. See [Agents package document and samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent) for more details. * Several changes to the `Connections` methods, including the response object (now it is simply called `Connection`). The class `ConnectionProperties` was renamed to `Connection`, and its properties have changed. * `GetAzureOpenAIChatClient` now supports returning an authenticated `AzureOpenAI` ChatClient to be used with -AI models deployed to the Project's AI Services. +AI models deployed to the Project's AI Services. * The method `UploadFileRequest` on `AIProjectClient` had been removed, use `UploadFile` in `Datasets` instead. * Property `scope` on `AIProjectClient` is removed. * Evaluator Ids are available using the class `EvaluatorIDs` and no longer require `Azure.AI.Evaluation` package to be installed. diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs index a77c91049300..8fd2abe81480 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs @@ -199,11 +199,29 @@ public partial class AIProjectConnectionsOperations { protected AIProjectConnectionsOperations() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } - public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnection(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionAsync(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetConnections(string connectionType, bool? defaultConnection, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.CollectionResult GetConnections(string connectionType, bool? defaultConnection, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } public Azure.AI.Projects.AIProjectConnection GetDefaultConnection(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } public System.Threading.Tasks.Task GetDefaultConnectionAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } @@ -302,13 +320,37 @@ public partial class AIProjectDeploymentsOperations { protected AIProjectDeploymentsOperations() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult GetDeployment(string name, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployment(string name, RequestOptions options) instead.")] public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.ClientResult GetDeployment(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, RequestOptions options) instead.")] public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher, string modelName, Azure.AI.Projects.AIProjectDeploymentType? deploymentType, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployments(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, Azure.AI.Projects.AIProjectDeploymentType? deploymentType, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs index a77c91049300..8fd2abe81480 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs @@ -199,11 +199,29 @@ public partial class AIProjectConnectionsOperations { protected AIProjectConnectionsOperations() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } - public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnection(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public Azure.AI.Projects.AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionAsync(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.CollectionResult GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetConnections(string connectionType, bool? defaultConnection, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.CollectionResult GetConnections(string connectionType, bool? defaultConnection, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } public Azure.AI.Projects.AIProjectConnection GetDefaultConnection(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } public System.Threading.Tasks.Task GetDefaultConnectionAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } @@ -302,13 +320,37 @@ public partial class AIProjectDeploymentsOperations { protected AIProjectDeploymentsOperations() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult GetDeployment(string name, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployment(string name, RequestOptions options) instead.")] public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.ClientResult GetDeployment(string name, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.ClientResult GetDeployment(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, RequestOptions options) instead.")] public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher, string modelName, Azure.AI.Projects.AIProjectDeploymentType? deploymentType, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.CollectionResult GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployments(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), string clientRequestId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, Azure.AI.Projects.AIProjectDeploymentType? deploymentType, string clientRequestId, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.AIProjectDeploymentType? deploymentType = default(Azure.AI.Projects.AIProjectDeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, System.ClientModel.Primitives.RequestOptions options) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] public virtual System.ClientModel.Primitives.AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, string clientRequestId, System.ClientModel.Primitives.RequestOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] diff --git a/sdk/ai/Azure.AI.Projects/assets.json b/sdk/ai/Azure.AI.Projects/assets.json index 4f5d893abf52..34a5c7594ddc 100644 --- a/sdk/ai/Azure.AI.Projects/assets.json +++ b/sdk/ai/Azure.AI.Projects/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Projects", - "Tag": "net/ai/Azure.AI.Projects_a5869f551c" + "Tag": "net/ai/Azure.AI.Projects_c11aeaf283" } diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md b/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md index a5498c8df3f0..55e86eef0ea5 100644 --- a/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md +++ b/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md @@ -9,10 +9,6 @@ This sample demonstrates how to use file operations with OpenAI Files API throug - Set the following environment variables: - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. -## Important Note - -File upload via OpenAIClient from AgentsClient.GetOpenAIClient() is not currently supported because it doesn't set the required Content-Type header for individual multipart form parts. The sample demonstrates other file operations using pre-existing file IDs. - ## Asynchronous Sample ```C# Snippet:AI_Projects_FileOperationsAsync @@ -22,7 +18,15 @@ AgentsClient agentClient = projectClient.GetAgentsClient(); OpenAIClient oaiClient = agentClient.GetOpenAIClient(); OpenAIFileClient fileClient = oaiClient.GetOpenAIFileClient(); -string fileId = "file-abc123"; // Replace with an actual file ID from your project +// Upload a file +using FileStream fileStream = File.OpenRead("path/to/your/file.jsonl"); +OpenAIFile uploadedFile = await fileClient.UploadFileAsync( + fileStream, + "training_data.jsonl", + FileUploadPurpose.FineTune); +Console.WriteLine($"File uploaded: {uploadedFile.Id}"); + +string fileId = uploadedFile.Id; // Retrieve file metadata OpenAIFile retrievedFile = await fileClient.GetFileAsync(fileId); diff --git a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj index 32a9966c3031..909a0f5a7867 100644 --- a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj +++ b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj @@ -2,9 +2,9 @@ This is the Azure.AI.Projects client library for developing .NET applications with rich experience. Microsoft Azure.AI.Projects client library - 1.1.0-beta.1 + 1.2.0-beta.1 - 1.0.0 + 1.1.0 Azure.AI.Projects true $(RequiredTargetFrameworks) @@ -32,9 +32,10 @@ + - + diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectConnectionsOperations.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectConnectionsOperations.cs new file mode 100644 index 000000000000..d7f5aebb4298 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectConnectionsOperations.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.ComponentModel; +using System.Threading; + +namespace Azure.AI.Projects +{ + public partial class AIProjectConnectionsOperations + { + /// + /// [Protocol Method] List all connections in the project, without populating connection credentials + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// List connections of this specific type. + /// List connections that are default connections. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] + public virtual CollectionResult GetConnections(string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + { + return GetConnections(connectionType, defaultConnection, options); + } + + /// + /// [Protocol Method] List all connections in the project, without populating connection credentials + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// List connections of this specific type. + /// List connections that are default connections. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(string connectionType, bool? defaultConnection, RequestOptions options) instead.")] + public virtual AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + { + return GetConnectionsAsync(connectionType, defaultConnection, options); + } + + /// List all connections in the project, without populating connection credentials. + /// List connections of this specific type. + /// List connections that are default connections. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnections(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual CollectionResult GetConnections(ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, CancellationToken cancellationToken) + { + return GetConnections(connectionType, defaultConnection, cancellationToken); + } + + /// List all connections in the project, without populating connection credentials. + /// List connections of this specific type. + /// List connections that are default connections. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionsAsync(ConnectionType? connectionType, bool? defaultConnection, CancellationToken cancellationToken) instead.")] + public virtual AsyncCollectionResult GetConnectionsAsync(ConnectionType? connectionType, bool? defaultConnection, string clientRequestId, CancellationToken cancellationToken) + { + return GetConnectionsAsync(connectionType, defaultConnection, cancellationToken); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectDeploymentsOperations.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectDeploymentsOperations.cs new file mode 100644 index 000000000000..0268f97944dc --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectDeploymentsOperations.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + public partial class AIProjectDeploymentsOperations + { + /// + /// [Protocol Method] Get a deployed model. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// Name of the deployment. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployment(string name, RequestOptions options) instead.")] + public virtual ClientResult GetDeployment(string name, string clientRequestId, RequestOptions options) + { + return GetDeployment(name, options); + } + + /// + /// [Protocol Method] Get a deployed model. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// Name of the deployment. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, RequestOptions options) instead.")] + public virtual async Task GetDeploymentAsync(string name, string clientRequestId, RequestOptions options) + { + return await GetDeploymentAsync(name, options).ConfigureAwait(false); + } + + /// Get a deployed model. + /// Name of the deployment. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual ClientResult GetDeployment(string name, string clientRequestId, CancellationToken cancellationToken) + { + return GetDeployment(name, cancellationToken); + } + + /// Get a deployed model. + /// Name of the deployment. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentAsync(string name, CancellationToken cancellationToken) instead.")] + public virtual async Task> GetDeploymentAsync(string name, string clientRequestId, CancellationToken cancellationToken) + { + return await GetDeploymentAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// [Protocol Method] List all deployed models in the project + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeployments(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] + public virtual CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + { + return GetDeployments(modelPublisher, modelName, deploymentType, options); + } + + /// + /// [Protocol Method] List all deployed models in the project + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, RequestOptions options) instead.")] + public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + { + return GetDeploymentsAsync(modelPublisher, modelName, deploymentType, options); + } + + /// List all deployed models in the project. + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual CollectionResult GetDeployments(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, string clientRequestId, CancellationToken cancellationToken) + { + return GetDeployments(modelPublisher, modelName, deploymentType, cancellationToken); + } + + /// List all deployed models in the project. + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, CancellationToken cancellationToken) instead.")] + public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, AIProjectDeploymentType? deploymentType, string clientRequestId, CancellationToken cancellationToken) + { + return GetDeploymentsAsync(modelPublisher, modelName, deploymentType, cancellationToken); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs new file mode 100644 index 000000000000..25cb4dc59b7d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.Projects +{ + [CodeGenType("ProjectsModelFactory")] + public partial class AzureAIProjectsModelFactory + { + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connections/AIProjectConnectionsOperations.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connections/AIProjectConnectionsOperations.cs index 05fdcc685a05..42baaec64f0a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connections/AIProjectConnectionsOperations.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Connections/AIProjectConnectionsOperations.cs @@ -3,6 +3,7 @@ using System; using System.ClientModel; +using System.ComponentModel; using System.Threading; using System.Threading.Tasks; @@ -19,7 +20,38 @@ public partial class AIProjectConnectionsOperations /// The cancellation token that can be used to cancel the operation. /// A object. /// Thrown when the request fails. - public AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, string clientRequestId = default, CancellationToken cancellationToken = default) + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnection(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public AIProjectConnection GetConnection(string connectionName, bool includeCredentials, string clientRequestId, CancellationToken cancellationToken) + { + return GetConnection(connectionName, includeCredentials, cancellationToken); + } + + /// + /// Get a connection by name. + /// + /// The name of the connection. Required. + /// Whether to include credentials in the response. Default is false. + /// An opaque, globally-unique, client-generated string identifier for the request. + /// The cancellation token that can be used to cancel the operation. + /// A object. + /// Thrown when the request fails. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This method is obsolete as the clientRequestId parameter is not used. Please use GetConnectionAsync(string connectionName, bool includeCredentials, CancellationToken cancellationToken) instead.")] + public async Task> GetConnectionAsync(string connectionName, bool includeCredentials, string clientRequestId, CancellationToken cancellationToken) + { + return await GetConnectionAsync(connectionName, includeCredentials, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a connection by name. + /// + /// The name of the connection. Required. + /// Whether to include credentials in the response. Default is false. + /// The cancellation token that can be used to cancel the operation. + /// A object. + /// Thrown when the request fails. + public AIProjectConnection GetConnection(string connectionName, bool includeCredentials = false, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(connectionName)) { @@ -29,10 +61,10 @@ public AIProjectConnection GetConnection(string connectionName, bool includeCred // Use the instance method instead of incorrectly calling it as static if (includeCredentials) { - return GetConnectionWithCredentials(connectionName, clientRequestId, cancellationToken); + return GetConnectionWithCredentials(connectionName, cancellationToken); } - return GetConnection(connectionName, clientRequestId, cancellationToken); + return GetConnection(connectionName, cancellationToken); } /// @@ -40,11 +72,10 @@ public AIProjectConnection GetConnection(string connectionName, bool includeCred /// /// The name of the connection. Required. /// Whether to include credentials in the response. Default is false. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// A object. /// Thrown when the request fails. - public async Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, string clientRequestId = default, CancellationToken cancellationToken = default) + public async Task> GetConnectionAsync(string connectionName, bool includeCredentials = false, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(connectionName)) { @@ -54,10 +85,10 @@ public async Task> GetConnectionAsync(string c // Use the instance method instead of incorrectly calling it as static if (includeCredentials) { - return await GetConnectionWithCredentialsAsync(connectionName, clientRequestId, cancellationToken).ConfigureAwait(false); + return await GetConnectionWithCredentialsAsync(connectionName, cancellationToken).ConfigureAwait(false); } - return await GetConnectionAsync(connectionName, clientRequestId, cancellationToken).ConfigureAwait(false); + return await GetConnectionAsync(connectionName, cancellationToken).ConfigureAwait(false); } /// diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectBlobReference.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectBlobReference.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectBlobReference.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectBlobReference.Serialization.cs index 3a24cc5e1490..5b49556430f2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectBlobReference.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectBlobReference.Serialization.cs @@ -140,7 +140,7 @@ protected virtual AIProjectBlobReference PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectBlobReference(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectBlobReference.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectBlobReference.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectBlobReference.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectBlobReference.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnection.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnection.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnection.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnection.Serialization.cs index dca45b8b001d..19026b4bb4b7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnection.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnection.Serialization.cs @@ -220,7 +220,7 @@ protected virtual AIProjectConnection PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnection(document.RootElement, options); } @@ -235,8 +235,8 @@ protected virtual AIProjectConnection PersistableModelCreateCore(BinaryData data /// The to deserialize the from. public static explicit operator AIProjectConnection(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAIProjectConnection(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnection.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnection.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnection.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnection.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionApiKeyCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionApiKeyCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionApiKeyCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionApiKeyCredential.Serialization.cs index 7d9c684eb485..b1235c2683b8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionApiKeyCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionApiKeyCredential.Serialization.cs @@ -114,7 +114,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionApiKeyCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionApiKeyCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionApiKeyCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionApiKeyCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionApiKeyCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionBaseCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionBaseCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionBaseCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionBaseCredential.Serialization.cs index 6f99899abff6..8ad42ed08e9e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionBaseCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionBaseCredential.Serialization.cs @@ -129,7 +129,7 @@ protected virtual AIProjectConnectionBaseCredential PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionBaseCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionBaseCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionBaseCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionBaseCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionBaseCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionCustomCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionCustomCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionCustomCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionCustomCredential.Serialization.cs index 01e5b8138070..dfa9abf66389 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionCustomCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionCustomCredential.Serialization.cs @@ -111,7 +111,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionCustomCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionCustomCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionCustomCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionCustomCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionCustomCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionEntraIdCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionEntraIdCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionEntraIdCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionEntraIdCredential.Serialization.cs index e17ff1268884..73d6ab6843ff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionEntraIdCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionEntraIdCredential.Serialization.cs @@ -103,7 +103,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionEntraIdCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionEntraIdCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionEntraIdCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionEntraIdCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionEntraIdCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionSasCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionSasCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionSasCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionSasCredential.Serialization.cs index 5feda54a9f57..03ed7def1edb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionSasCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionSasCredential.Serialization.cs @@ -114,7 +114,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionSasCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionSasCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionSasCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectConnectionSasCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionSasCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.RestClient.cs index 89c6d6c7d7dc..3428308aeb2f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.RestClient.cs @@ -14,7 +14,7 @@ public partial class AIProjectConnectionsOperations private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); - internal PipelineMessage CreateGetConnectionRequest(string name, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateGetConnectionRequest(string name, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -23,16 +23,13 @@ internal PipelineMessage CreateGetConnectionRequest(string name, string clientRe uri.AppendQuery("api-version", _apiVersion, true); PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); PipelineRequest request = message.Request; - if (clientRequestId != null) - { - request.Headers.Set("x-ms-client-request-id", clientRequestId); - } request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } - internal PipelineMessage CreateGetConnectionWithCredentialsRequest(string name, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateGetConnectionWithCredentialsRequest(string name, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -42,16 +39,13 @@ internal PipelineMessage CreateGetConnectionWithCredentialsRequest(string name, uri.AppendQuery("api-version", _apiVersion, true); PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); PipelineRequest request = message.Request; - if (clientRequestId != null) - { - request.Headers.Set("x-ms-client-request-id", clientRequestId); - } request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } - internal PipelineMessage CreateGetConnectionsRequest(string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateGetConnectionsRequest(string connectionType, bool? defaultConnection, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -67,16 +61,13 @@ internal PipelineMessage CreateGetConnectionsRequest(string connectionType, bool } PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); PipelineRequest request = message.Request; - if (clientRequestId != null) - { - request.Headers.Set("x-ms-client-request-id", clientRequestId); - } request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } - internal PipelineMessage CreateNextGetConnectionsRequest(Uri nextPage, string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateNextGetConnectionsRequest(Uri nextPage, string connectionType, bool? defaultConnection, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(nextPage); @@ -84,6 +75,7 @@ internal PipelineMessage CreateNextGetConnectionsRequest(Uri nextPage, string co PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.cs index 1f6af09d6188..d6ac098a4004 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperations.cs @@ -44,13 +44,12 @@ internal AIProjectConnectionsOperations(ClientPipeline pipeline, Uri endpoint, s /// /// /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult GetConnection(string name, string clientRequestId, RequestOptions options) + internal virtual ClientResult GetConnection(string name, RequestOptions options) { - using PipelineMessage message = CreateGetConnectionRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetConnectionRequest(name, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -63,35 +62,32 @@ internal virtual ClientResult GetConnection(string name, string clientRequestId, /// /// /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task GetConnectionAsync(string name, string clientRequestId, RequestOptions options) + internal virtual async Task GetConnectionAsync(string name, RequestOptions options) { - using PipelineMessage message = CreateGetConnectionRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetConnectionRequest(name, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// Get a connection by name, without populating connection credentials. /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult GetConnection(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + internal virtual ClientResult GetConnection(string name, CancellationToken cancellationToken = default) { - ClientResult result = GetConnection(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + ClientResult result = GetConnection(name, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((AIProjectConnection)result, result.GetRawResponse()); } /// Get a connection by name, without populating connection credentials. /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> GetConnectionAsync(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + internal virtual async Task> GetConnectionAsync(string name, CancellationToken cancellationToken = default) { - ClientResult result = await GetConnectionAsync(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); + ClientResult result = await GetConnectionAsync(name, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((AIProjectConnection)result, result.GetRawResponse()); } @@ -104,13 +100,12 @@ internal virtual async Task> GetConnectionAsyn /// /// /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult GetConnectionWithCredentials(string name, string clientRequestId, RequestOptions options) + internal virtual ClientResult GetConnectionWithCredentials(string name, RequestOptions options) { - using PipelineMessage message = CreateGetConnectionWithCredentialsRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetConnectionWithCredentialsRequest(name, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -123,35 +118,32 @@ internal virtual ClientResult GetConnectionWithCredentials(string name, string c /// /// /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task GetConnectionWithCredentialsAsync(string name, string clientRequestId, RequestOptions options) + internal virtual async Task GetConnectionWithCredentialsAsync(string name, RequestOptions options) { - using PipelineMessage message = CreateGetConnectionWithCredentialsRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetConnectionWithCredentialsRequest(name, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// Get a connection by name, with its connection credentials. /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult GetConnectionWithCredentials(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + internal virtual ClientResult GetConnectionWithCredentials(string name, CancellationToken cancellationToken = default) { - ClientResult result = GetConnectionWithCredentials(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + ClientResult result = GetConnectionWithCredentials(name, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((AIProjectConnection)result, result.GetRawResponse()); } /// Get a connection by name, with its connection credentials. /// The friendly name of the connection, provided by the user. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> GetConnectionWithCredentialsAsync(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + internal virtual async Task> GetConnectionWithCredentialsAsync(string name, CancellationToken cancellationToken = default) { - ClientResult result = await GetConnectionWithCredentialsAsync(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); + ClientResult result = await GetConnectionWithCredentialsAsync(name, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((AIProjectConnection)result, result.GetRawResponse()); } @@ -165,13 +157,12 @@ internal virtual async Task> GetConnectionWith /// /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual CollectionResult GetConnections(string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public virtual CollectionResult GetConnections(string connectionType, bool? defaultConnection, RequestOptions options) { - return new AIProjectConnectionsOperationsGetConnectionsCollectionResult(this, connectionType, defaultConnection, clientRequestId, options); + return new AIProjectConnectionsOperationsGetConnectionsCollectionResult(this, connectionType, defaultConnection, options); } /// @@ -184,35 +175,32 @@ public virtual CollectionResult GetConnections(string connectionType, bool? defa /// /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public virtual AsyncCollectionResult GetConnectionsAsync(string connectionType, bool? defaultConnection, RequestOptions options) { - return new AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult(this, connectionType, defaultConnection, clientRequestId, options); + return new AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult(this, connectionType, defaultConnection, options); } /// List all connections in the project, without populating connection credentials. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual CollectionResult GetConnections(ConnectionType? connectionType = default, bool? defaultConnection = default, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual CollectionResult GetConnections(ConnectionType? connectionType = default, bool? defaultConnection = default, CancellationToken cancellationToken = default) { - return new AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT(this, connectionType?.ToString(), defaultConnection, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + return new AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT(this, connectionType?.ToString(), defaultConnection, cancellationToken.ToRequestOptions()); } /// List all connections in the project, without populating connection credentials. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual AsyncCollectionResult GetConnectionsAsync(ConnectionType? connectionType = default, bool? defaultConnection = default, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult GetConnectionsAsync(ConnectionType? connectionType = default, bool? defaultConnection = default, CancellationToken cancellationToken = default) { - return new AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT(this, connectionType?.ToString(), defaultConnection, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + return new AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT(this, connectionType?.ToString(), defaultConnection, cancellationToken.ToRequestOptions()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult.cs index ed19199809f6..60182b26fa32 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult.cs @@ -15,21 +15,18 @@ internal partial class AIProjectConnectionsOperationsGetConnectionsAsyncCollecti private readonly AIProjectConnectionsOperations _client; private readonly string _connectionType; private readonly bool? _defaultConnection; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The AIProjectConnectionsOperations client used to send requests. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, RequestOptions options) { _client = client; _connectionType = connectionType; _defaultConnection = defaultConnection; - _clientRequestId = clientRequestId; _options = options; } @@ -37,7 +34,7 @@ public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResult(AIProje /// The raw pages of the collection. public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _options); Uri nextPageUri = null; while (true) { @@ -49,7 +46,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _clientRequestId, _options); + message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT.cs index 8f62744a9dc1..afd777252837 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT.cs @@ -16,21 +16,18 @@ internal partial class AIProjectConnectionsOperationsGetConnectionsAsyncCollecti private readonly AIProjectConnectionsOperations _client; private readonly string _connectionType; private readonly bool? _defaultConnection; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The AIProjectConnectionsOperations client used to send requests. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, RequestOptions options) { _client = client; _connectionType = connectionType; _defaultConnection = defaultConnection; - _clientRequestId = clientRequestId; _options = options; } @@ -38,7 +35,7 @@ public AIProjectConnectionsOperationsGetConnectionsAsyncCollectionResultOfT(AIPr /// The raw pages of the collection. public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _options); Uri nextPageUri = null; while (true) { @@ -50,7 +47,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _clientRequestId, _options); + message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResult.cs index 299f27d2f971..d3053b4b362e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResult.cs @@ -15,21 +15,18 @@ internal partial class AIProjectConnectionsOperationsGetConnectionsCollectionRes private readonly AIProjectConnectionsOperations _client; private readonly string _connectionType; private readonly bool? _defaultConnection; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectConnectionsOperationsGetConnectionsCollectionResult, which is used to iterate over the pages of a collection. /// The AIProjectConnectionsOperations client used to send requests. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectConnectionsOperationsGetConnectionsCollectionResult(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public AIProjectConnectionsOperationsGetConnectionsCollectionResult(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, RequestOptions options) { _client = client; _connectionType = connectionType; _defaultConnection = defaultConnection; - _clientRequestId = clientRequestId; _options = options; } @@ -37,7 +34,7 @@ public AIProjectConnectionsOperationsGetConnectionsCollectionResult(AIProjectCon /// The raw pages of the collection. public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _options); Uri nextPageUri = null; while (true) { @@ -49,7 +46,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _clientRequestId, _options); + message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT.cs index 9dc430aa2848..d6dddbe6ed4c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT.cs @@ -15,21 +15,18 @@ internal partial class AIProjectConnectionsOperationsGetConnectionsCollectionRes private readonly AIProjectConnectionsOperations _client; private readonly string _connectionType; private readonly bool? _defaultConnection; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT, which is used to iterate over the pages of a collection. /// The AIProjectConnectionsOperations client used to send requests. /// List connections of this specific type. /// List connections that are default connections. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, string clientRequestId, RequestOptions options) + public AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT(AIProjectConnectionsOperations client, string connectionType, bool? defaultConnection, RequestOptions options) { _client = client; _connectionType = connectionType; _defaultConnection = defaultConnection; - _clientRequestId = clientRequestId; _options = options; } @@ -37,7 +34,7 @@ public AIProjectConnectionsOperationsGetConnectionsCollectionResultOfT(AIProject /// The raw pages of the collection. public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetConnectionsRequest(_connectionType, _defaultConnection, _options); Uri nextPageUri = null; while (true) { @@ -49,7 +46,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _clientRequestId, _options); + message = _client.CreateNextGetConnectionsRequest(nextPageUri, _connectionType, _defaultConnection, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectCosmosDBIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectCosmosDBIndex.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectCosmosDBIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectCosmosDBIndex.Serialization.cs index 7c062d526d7e..56f0d62a7444 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectCosmosDBIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectCosmosDBIndex.Serialization.cs @@ -206,7 +206,7 @@ protected override AIProjectIndex PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectCosmosDBIndex(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectCosmosDBIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectCosmosDBIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectCosmosDBIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectCosmosDBIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDataset.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDataset.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDataset.Serialization.cs index 22e8bae8a323..e938eaf1e5ee 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDataset.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDataset.Serialization.cs @@ -172,7 +172,7 @@ protected virtual AIProjectDataset PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectDataset(document.RootElement, options); } @@ -187,8 +187,8 @@ protected virtual AIProjectDataset PersistableModelCreateCore(BinaryData data, M /// The to deserialize the from. public static explicit operator AIProjectDataset(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAIProjectDataset(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDataset.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDataset.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDataset.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeployment.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeployment.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeployment.Serialization.cs index 92bfe052eb95..5b6c19c17fc3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeployment.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeployment.Serialization.cs @@ -127,7 +127,7 @@ protected virtual AIProjectDeployment PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectDeployment(document.RootElement, options); } @@ -142,8 +142,8 @@ protected virtual AIProjectDeployment PersistableModelCreateCore(BinaryData data /// The to deserialize the from. public static explicit operator AIProjectDeployment(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAIProjectDeployment(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeployment.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeployment.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeployment.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeploymentType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectDeploymentType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.RestClient.cs index 584218946425..6d0fa507761e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.RestClient.cs @@ -14,7 +14,7 @@ public partial class AIProjectDeploymentsOperations private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 = PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); - internal PipelineMessage CreateGetDeploymentRequest(string name, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateGetDeploymentRequest(string name, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -23,16 +23,13 @@ internal PipelineMessage CreateGetDeploymentRequest(string name, string clientRe uri.AppendQuery("api-version", _apiVersion, true); PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); PipelineRequest request = message.Request; - if (clientRequestId != null) - { - request.Headers.Set("x-ms-client-request-id", clientRequestId); - } request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } - internal PipelineMessage CreateGetDeploymentsRequest(string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateGetDeploymentsRequest(string modelPublisher, string modelName, string deploymentType, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -52,16 +49,13 @@ internal PipelineMessage CreateGetDeploymentsRequest(string modelPublisher, stri } PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); PipelineRequest request = message.Request; - if (clientRequestId != null) - { - request.Headers.Set("x-ms-client-request-id", clientRequestId); - } request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } - internal PipelineMessage CreateNextGetDeploymentsRequest(Uri nextPage, string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + internal PipelineMessage CreateNextGetDeploymentsRequest(Uri nextPage, string modelPublisher, string modelName, string deploymentType, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(nextPage); @@ -69,6 +63,7 @@ internal PipelineMessage CreateNextGetDeploymentsRequest(Uri nextPage, string mo PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); + request.Headers.Set("x-ms-client-request-id", request.ClientRequestId); return message; } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.cs index 35b0457a5584..8be406832ab0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperations.cs @@ -44,17 +44,16 @@ internal AIProjectDeploymentsOperations(ClientPipeline pipeline, Uri endpoint, s /// /// /// Name of the deployment. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult GetDeployment(string name, string clientRequestId, RequestOptions options) + public virtual ClientResult GetDeployment(string name, RequestOptions options) { Argument.AssertNotNullOrEmpty(name, nameof(name)); - using PipelineMessage message = CreateGetDeploymentRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetDeploymentRequest(name, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -67,47 +66,44 @@ public virtual ClientResult GetDeployment(string name, string clientRequestId, R /// /// /// Name of the deployment. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task GetDeploymentAsync(string name, string clientRequestId, RequestOptions options) + public virtual async Task GetDeploymentAsync(string name, RequestOptions options) { Argument.AssertNotNullOrEmpty(name, nameof(name)); - using PipelineMessage message = CreateGetDeploymentRequest(name, clientRequestId, options); + using PipelineMessage message = CreateGetDeploymentRequest(name, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// Get a deployed model. /// Name of the deployment. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult GetDeployment(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual ClientResult GetDeployment(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); - ClientResult result = GetDeployment(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + ClientResult result = GetDeployment(name, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((AIProjectDeployment)result, result.GetRawResponse()); } /// Get a deployed model. /// Name of the deployment. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task> GetDeploymentAsync(string name, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual async Task> GetDeploymentAsync(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); - ClientResult result = await GetDeploymentAsync(name, clientRequestId, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); + ClientResult result = await GetDeploymentAsync(name, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((AIProjectDeployment)result, result.GetRawResponse()); } @@ -122,19 +118,12 @@ public virtual async Task> GetDeploymentAsync( /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public virtual CollectionResult GetDeployments(string modelPublisher, string modelName, string deploymentType, RequestOptions options) { - return new AIProjectDeploymentsOperationsGetDeploymentsCollectionResult( - this, - modelPublisher, - modelName, - deploymentType, - clientRequestId, - options); + return new AIProjectDeploymentsOperationsGetDeploymentsCollectionResult(this, modelPublisher, modelName, deploymentType, options); } /// @@ -148,55 +137,34 @@ public virtual CollectionResult GetDeployments(string modelPublisher, string mod /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, RequestOptions options) { - return new AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult( - this, - modelPublisher, - modelName, - deploymentType, - clientRequestId, - options); + return new AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult(this, modelPublisher, modelName, deploymentType, options); } /// List all deployed models in the project. /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual CollectionResult GetDeployments(string modelPublisher = default, string modelName = default, AIProjectDeploymentType? deploymentType = default, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual CollectionResult GetDeployments(string modelPublisher = default, string modelName = default, AIProjectDeploymentType? deploymentType = default, CancellationToken cancellationToken = default) { - return new AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT( - this, - modelPublisher, - modelName, - deploymentType?.ToString(), - clientRequestId, - cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + return new AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT(this, modelPublisher, modelName, deploymentType?.ToString(), cancellationToken.ToRequestOptions()); } /// List all deployed models in the project. /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = default, string modelName = default, AIProjectDeploymentType? deploymentType = default, string clientRequestId = default, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult GetDeploymentsAsync(string modelPublisher = default, string modelName = default, AIProjectDeploymentType? deploymentType = default, CancellationToken cancellationToken = default) { - return new AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT( - this, - modelPublisher, - modelName, - deploymentType?.ToString(), - clientRequestId, - cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); + return new AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT(this, modelPublisher, modelName, deploymentType?.ToString(), cancellationToken.ToRequestOptions()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult.cs index 71ae489f59ba..7116a6622a1a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult.cs @@ -16,7 +16,6 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsAsyncCollecti private readonly string _modelPublisher; private readonly string _modelName; private readonly string _deploymentType; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult, which is used to iterate over the pages of a collection. @@ -24,15 +23,13 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsAsyncCollecti /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, RequestOptions options) { _client = client; _modelPublisher = modelPublisher; _modelName = modelName; _deploymentType = deploymentType; - _clientRequestId = clientRequestId; _options = options; } @@ -40,7 +37,7 @@ public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResult(AIProje /// The raw pages of the collection. public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _options); Uri nextPageUri = null; while (true) { @@ -52,7 +49,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT.cs index d6141db5ec8e..7525a2ffe8b8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT.cs @@ -17,7 +17,6 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsAsyncCollecti private readonly string _modelPublisher; private readonly string _modelName; private readonly string _deploymentType; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. @@ -25,15 +24,13 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsAsyncCollecti /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, RequestOptions options) { _client = client; _modelPublisher = modelPublisher; _modelName = modelName; _deploymentType = deploymentType; - _clientRequestId = clientRequestId; _options = options; } @@ -41,7 +38,7 @@ public AIProjectDeploymentsOperationsGetDeploymentsAsyncCollectionResultOfT(AIPr /// The raw pages of the collection. public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _options); Uri nextPageUri = null; while (true) { @@ -53,7 +50,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResult.cs index 70b098dd5d73..3fc84a16250c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResult.cs @@ -16,7 +16,6 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsCollectionRes private readonly string _modelPublisher; private readonly string _modelName; private readonly string _deploymentType; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectDeploymentsOperationsGetDeploymentsCollectionResult, which is used to iterate over the pages of a collection. @@ -24,15 +23,13 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsCollectionRes /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectDeploymentsOperationsGetDeploymentsCollectionResult(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public AIProjectDeploymentsOperationsGetDeploymentsCollectionResult(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, RequestOptions options) { _client = client; _modelPublisher = modelPublisher; _modelName = modelName; _deploymentType = deploymentType; - _clientRequestId = clientRequestId; _options = options; } @@ -40,7 +37,7 @@ public AIProjectDeploymentsOperationsGetDeploymentsCollectionResult(AIProjectDep /// The raw pages of the collection. public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _options); Uri nextPageUri = null; while (true) { @@ -52,7 +49,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT.cs index 7028b4c6b353..3b08eb7753ff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT.cs @@ -16,7 +16,6 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsCollectionRes private readonly string _modelPublisher; private readonly string _modelName; private readonly string _deploymentType; - private readonly string _clientRequestId; private readonly RequestOptions _options; /// Initializes a new instance of AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT, which is used to iterate over the pages of a collection. @@ -24,15 +23,13 @@ internal partial class AIProjectDeploymentsOperationsGetDeploymentsCollectionRes /// Model publisher to filter models by. /// Model name (the publisher specific name) to filter models by. /// Type of deployment to filter list by. - /// An opaque, globally-unique, client-generated string identifier for the request. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, string clientRequestId, RequestOptions options) + public AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT(AIProjectDeploymentsOperations client, string modelPublisher, string modelName, string deploymentType, RequestOptions options) { _client = client; _modelPublisher = modelPublisher; _modelName = modelName; _deploymentType = deploymentType; - _clientRequestId = clientRequestId; _options = options; } @@ -40,7 +37,7 @@ public AIProjectDeploymentsOperationsGetDeploymentsCollectionResultOfT(AIProject /// The raw pages of the collection. public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + PipelineMessage message = _client.CreateGetDeploymentsRequest(_modelPublisher, _modelName, _deploymentType, _options); Uri nextPageUri = null; while (true) { @@ -52,7 +49,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _clientRequestId, _options); + message = _client.CreateNextGetDeploymentsRequest(nextPageUri, _modelPublisher, _modelName, _deploymentType, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndex.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndex.Serialization.cs index 97f262a6aa9b..dfb606bb9af4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndex.Serialization.cs @@ -162,7 +162,7 @@ protected virtual AIProjectIndex PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectIndex(document.RootElement, options); } @@ -177,8 +177,8 @@ protected virtual AIProjectIndex PersistableModelCreateCore(BinaryData data, Mod /// The to deserialize the from. public static explicit operator AIProjectIndex(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAIProjectIndex(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndexFieldMapping.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndexFieldMapping.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndexFieldMapping.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndexFieldMapping.Serialization.cs index 2157d7147999..37a954df35dd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndexFieldMapping.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndexFieldMapping.Serialization.cs @@ -260,7 +260,7 @@ protected virtual AIProjectIndexFieldMapping PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectIndexFieldMapping(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndexFieldMapping.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndexFieldMapping.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AIProjectIndexFieldMapping.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AIProjectIndexFieldMapping.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.Serialization.cs index 465ab5e750be..d03a72175506 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.Serialization.cs @@ -195,7 +195,7 @@ protected override AIProjectIndex PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureAISearchIndex(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BlobReferenceSasCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReferenceSasCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/BlobReferenceSasCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/BlobReferenceSasCredential.Serialization.cs index 0435410c4071..f046f8b6c924 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BlobReferenceSasCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReferenceSasCredential.Serialization.cs @@ -133,7 +133,7 @@ protected virtual BlobReferenceSasCredential PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBlobReferenceSasCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BlobReferenceSasCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReferenceSasCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/BlobReferenceSasCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/BlobReferenceSasCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ConnectionType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ConnectionType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CredentialType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/CredentialType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/CredentialType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetCredential.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/DatasetCredential.Serialization.cs index 024e0a64a5e9..c4f9e5372c16 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetCredential.Serialization.cs @@ -125,7 +125,7 @@ protected virtual DatasetCredential PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDatasetCredential(document.RootElement, options); } @@ -140,8 +140,8 @@ protected virtual DatasetCredential PersistableModelCreateCore(BinaryData data, /// The to deserialize the from. public static explicit operator DatasetCredential(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDatasetCredential(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/DatasetCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/DatasetType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EmbeddingConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/EmbeddingConfiguration.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.Serialization.cs index e768788a0bfc..079f2e2e19a5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EmbeddingConfiguration.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.Serialization.cs @@ -132,7 +132,7 @@ protected virtual EmbeddingConfiguration PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEmbeddingConfiguration(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EmbeddingConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/EmbeddingConfiguration.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileDataset.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataset.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/FileDataset.Serialization.cs index 5c29d31a80d7..9082a99595d4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataset.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FileDataset.Serialization.cs @@ -186,7 +186,7 @@ protected override AIProjectDataset PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFileDataset(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileDataset.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataset.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/FileDataset.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FolderDataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDataset.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/FolderDataset.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/FolderDataset.Serialization.cs index 1ecc3298e0c2..8b0d6142a21b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FolderDataset.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDataset.Serialization.cs @@ -186,7 +186,7 @@ protected override AIProjectDataset PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFolderDataset(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FolderDataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDataset.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/FolderDataset.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/FolderDataset.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/IndexType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/IndexType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/IndexType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/IndexType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Internal/CodeGenSerializationAttribute.cs index 3d7b9c00b4cf..771843d66104 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -16,18 +16,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ManagedAzureAISearchIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ManagedAzureAISearchIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs index 460d1ecd1631..8615b1ee6e42 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ManagedAzureAISearchIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs @@ -170,7 +170,7 @@ protected override AIProjectIndex PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeManagedAzureAISearchIndex(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ManagedAzureAISearchIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ManagedAzureAISearchIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeployment.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.Serialization.cs index 78428d75e22e..a5c3b853dda3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeployment.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.Serialization.cs @@ -207,7 +207,7 @@ protected override AIProjectDeployment PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeModelDeployment(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeployment.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeploymentSku.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeploymentSku.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeploymentSku.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ModelDeploymentSku.Serialization.cs index 6b21158242f8..a717ab68c0a9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeploymentSku.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeploymentSku.Serialization.cs @@ -162,7 +162,7 @@ protected virtual ModelDeploymentSku PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeModelDeploymentSku(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeploymentSku.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeploymentSku.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/ModelDeploymentSku.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/ModelDeploymentSku.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs index f4d37ee17b8e..b1fc749fc6fe 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs @@ -12,10 +12,6 @@ namespace Azure.AI.Projects /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information /// - [ModelReaderWriterBuildable(typeof(AgentClusterInsightResult))] - [ModelReaderWriterBuildable(typeof(AgentClusterInsightsRequest))] - [ModelReaderWriterBuildable(typeof(AgenticIdentityCredentials))] - [ModelReaderWriterBuildable(typeof(AgentTaxonomyInput))] [ModelReaderWriterBuildable(typeof(AIProjectBlobReference))] [ModelReaderWriterBuildable(typeof(AIProjectConnection))] [ModelReaderWriterBuildable(typeof(AIProjectConnectionApiKeyCredential))] @@ -28,102 +24,26 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(AIProjectDeployment))] [ModelReaderWriterBuildable(typeof(AIProjectIndex))] [ModelReaderWriterBuildable(typeof(AIProjectIndexFieldMapping))] - [ModelReaderWriterBuildable(typeof(AzureAIAgentTarget))] - [ModelReaderWriterBuildable(typeof(AzureAIAssistantTarget))] - [ModelReaderWriterBuildable(typeof(AzureAIModelTarget))] [ModelReaderWriterBuildable(typeof(AzureAISearchIndex))] - [ModelReaderWriterBuildable(typeof(AzureOpenAIModelConfiguration))] [ModelReaderWriterBuildable(typeof(BlobReferenceSasCredential))] - [ModelReaderWriterBuildable(typeof(ChartCoordinate))] - [ModelReaderWriterBuildable(typeof(ClusterInsightResult))] - [ModelReaderWriterBuildable(typeof(ClusterTokenUsage))] - [ModelReaderWriterBuildable(typeof(CodeBasedEvaluatorDefinition))] - [ModelReaderWriterBuildable(typeof(ContinuousEvaluationRuleAction))] - [ModelReaderWriterBuildable(typeof(CronTrigger))] - [ModelReaderWriterBuildable(typeof(DailyRecurrenceSchedule))] [ModelReaderWriterBuildable(typeof(DatasetCredential))] [ModelReaderWriterBuildable(typeof(EmbeddingConfiguration))] - [ModelReaderWriterBuildable(typeof(EvalCompareReport))] - [ModelReaderWriterBuildable(typeof(EvalResult))] - [ModelReaderWriterBuildable(typeof(EvalRunResultCompareItem))] - [ModelReaderWriterBuildable(typeof(EvalRunResultComparison))] - [ModelReaderWriterBuildable(typeof(EvalRunResultSummary))] - [ModelReaderWriterBuildable(typeof(EvaluationComparisonRequest))] - [ModelReaderWriterBuildable(typeof(EvaluationResultSample))] - [ModelReaderWriterBuildable(typeof(EvaluationRule))] - [ModelReaderWriterBuildable(typeof(EvaluationRuleAction))] - [ModelReaderWriterBuildable(typeof(EvaluationRuleFilter))] - [ModelReaderWriterBuildable(typeof(EvaluationRunClusterInsightResult))] - [ModelReaderWriterBuildable(typeof(EvaluationRunClusterInsightsRequest))] - [ModelReaderWriterBuildable(typeof(EvaluationScheduleTask))] - [ModelReaderWriterBuildable(typeof(EvaluationScheduleTaskEvalRun))] - [ModelReaderWriterBuildable(typeof(EvaluationTaxonomy))] - [ModelReaderWriterBuildable(typeof(EvaluationTaxonomyInput))] - [ModelReaderWriterBuildable(typeof(EvaluatorDefinition))] - [ModelReaderWriterBuildable(typeof(EvaluatorMetric))] - [ModelReaderWriterBuildable(typeof(EvaluatorVersion))] [ModelReaderWriterBuildable(typeof(FileDataset))] [ModelReaderWriterBuildable(typeof(FolderDataset))] - [ModelReaderWriterBuildable(typeof(HourlyRecurrenceSchedule))] - [ModelReaderWriterBuildable(typeof(HumanEvaluationRuleAction))] - [ModelReaderWriterBuildable(typeof(Insight))] - [ModelReaderWriterBuildable(typeof(InsightCluster))] - [ModelReaderWriterBuildable(typeof(InsightModelConfiguration))] - [ModelReaderWriterBuildable(typeof(InsightRequest))] - [ModelReaderWriterBuildable(typeof(InsightResult))] - [ModelReaderWriterBuildable(typeof(InsightSample))] - [ModelReaderWriterBuildable(typeof(InsightScheduleTask))] - [ModelReaderWriterBuildable(typeof(InsightsMetadata))] - [ModelReaderWriterBuildable(typeof(InsightSummary))] [ModelReaderWriterBuildable(typeof(ManagedAzureAISearchIndex))] [ModelReaderWriterBuildable(typeof(ModelDeployment))] [ModelReaderWriterBuildable(typeof(ModelDeploymentSku))] - [ModelReaderWriterBuildable(typeof(ModelSamplingParams))] - [ModelReaderWriterBuildable(typeof(MonthlyRecurrenceSchedule))] [ModelReaderWriterBuildable(typeof(NoAuthenticationCredentials))] - [ModelReaderWriterBuildable(typeof(OneTimeTrigger))] - [ModelReaderWriterBuildable(typeof(PagedConnection))] - [ModelReaderWriterBuildable(typeof(PagedDatasetVersion))] - [ModelReaderWriterBuildable(typeof(PagedDeployment))] - [ModelReaderWriterBuildable(typeof(PagedEvaluationRule))] - [ModelReaderWriterBuildable(typeof(PagedEvaluationTaxonomy))] - [ModelReaderWriterBuildable(typeof(PagedEvaluatorVersion))] - [ModelReaderWriterBuildable(typeof(PagedIndex))] - [ModelReaderWriterBuildable(typeof(PagedInsight))] - [ModelReaderWriterBuildable(typeof(PagedRedTeam))] - [ModelReaderWriterBuildable(typeof(PagedSchedule))] - [ModelReaderWriterBuildable(typeof(PagedScheduleRun))] [ModelReaderWriterBuildable(typeof(PendingUploadConfiguration))] [ModelReaderWriterBuildable(typeof(PendingUploadResult))] - [ModelReaderWriterBuildable(typeof(PromptBasedEvaluatorDefinition))] - [ModelReaderWriterBuildable(typeof(RecurrenceSchedule))] - [ModelReaderWriterBuildable(typeof(RecurrenceTrigger))] - [ModelReaderWriterBuildable(typeof(RedTeam))] - [ModelReaderWriterBuildable(typeof(Schedule))] - [ModelReaderWriterBuildable(typeof(ScheduleRun))] - [ModelReaderWriterBuildable(typeof(ScheduleTask))] - [ModelReaderWriterBuildable(typeof(Target))] - [ModelReaderWriterBuildable(typeof(TargetConfig))] - [ModelReaderWriterBuildable(typeof(TaxonomyCategory))] - [ModelReaderWriterBuildable(typeof(TaxonomySubCategory))] - [ModelReaderWriterBuildable(typeof(ToolDescription))] - [ModelReaderWriterBuildable(typeof(Trigger))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectConnectionBaseCredential))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectDataset))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectDeployment))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectIndex))] - [ModelReaderWriterBuildable(typeof(UnknownEvaluationRuleAction))] - [ModelReaderWriterBuildable(typeof(UnknownEvaluationTaxonomyInput))] - [ModelReaderWriterBuildable(typeof(UnknownEvaluatorDefinition))] - [ModelReaderWriterBuildable(typeof(UnknownInsightRequest))] - [ModelReaderWriterBuildable(typeof(UnknownInsightResult))] - [ModelReaderWriterBuildable(typeof(UnknownInsightSample))] - [ModelReaderWriterBuildable(typeof(UnknownRecurrenceSchedule))] - [ModelReaderWriterBuildable(typeof(UnknownScheduleTask))] - [ModelReaderWriterBuildable(typeof(UnknownTarget))] - [ModelReaderWriterBuildable(typeof(UnknownTargetConfig))] - [ModelReaderWriterBuildable(typeof(UnknownTrigger))] - [ModelReaderWriterBuildable(typeof(WeeklyRecurrenceSchedule))] + [ModelReaderWriterBuildable(typeof(PagedConnection))] + [ModelReaderWriterBuildable(typeof(PagedDeployment))] + [ModelReaderWriterBuildable(typeof(PagedDatasetVersion))] + [ModelReaderWriterBuildable(typeof(PagedIndex))] public partial class AzureAIProjectsContext : ModelReaderWriterContext { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/NoAuthenticationCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/NoAuthenticationCredentials.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.Serialization.cs index 90d578f6454d..bfe409ad70ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/NoAuthenticationCredentials.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.Serialization.cs @@ -103,7 +103,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeNoAuthenticationCredentials(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/NoAuthenticationCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/NoAuthenticationCredentials.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedConnection.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedConnection.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedConnection.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedConnection.Serialization.cs index 95a9363fc3f8..5ffb270317e9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedConnection.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PagedConnection.Serialization.cs @@ -152,7 +152,7 @@ protected virtual PagedConnection PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedConnection(document.RootElement, options); } @@ -167,8 +167,8 @@ protected virtual PagedConnection PersistableModelCreateCore(BinaryData data, Mo /// The to deserialize the from. public static explicit operator PagedConnection(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedConnection(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedConnection.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedConnection.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedConnection.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedConnection.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDatasetVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDatasetVersion.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDatasetVersion.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedDatasetVersion.Serialization.cs index 4cdaadeaf999..1ffc66241ba4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDatasetVersion.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDatasetVersion.Serialization.cs @@ -151,7 +151,7 @@ protected virtual PagedDatasetVersion PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedDatasetVersion(document.RootElement, options); } @@ -166,8 +166,8 @@ protected virtual PagedDatasetVersion PersistableModelCreateCore(BinaryData data /// The to deserialize the from. public static explicit operator PagedDatasetVersion(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedDatasetVersion(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDatasetVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDatasetVersion.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDatasetVersion.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedDatasetVersion.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDeployment.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDeployment.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedDeployment.Serialization.cs index a28e7a57d098..762ec3edd9d1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDeployment.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDeployment.Serialization.cs @@ -152,7 +152,7 @@ protected virtual PagedDeployment PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedDeployment(document.RootElement, options); } @@ -167,8 +167,8 @@ protected virtual PagedDeployment PersistableModelCreateCore(BinaryData data, Mo /// The to deserialize the from. public static explicit operator PagedDeployment(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedDeployment(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedDeployment.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedDeployment.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedDeployment.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedIndex.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedIndex.Serialization.cs index 8c20ca9f1821..658c5d648d31 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PagedIndex.Serialization.cs @@ -151,7 +151,7 @@ protected virtual PagedIndex PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedIndex(document.RootElement, options); } @@ -166,8 +166,8 @@ protected virtual PagedIndex PersistableModelCreateCore(BinaryData data, ModelRe /// The to deserialize the from. public static explicit operator PagedIndex(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedIndex(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PagedIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PagedIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PagedIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadConfiguration.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadConfiguration.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadConfiguration.Serialization.cs index 592eb14e2736..ada1e75ec557 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadConfiguration.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadConfiguration.Serialization.cs @@ -142,7 +142,7 @@ protected virtual PendingUploadConfiguration PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePendingUploadConfiguration(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadConfiguration.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadConfiguration.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadConfiguration.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadResult.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResult.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadResult.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResult.Serialization.cs index 39287ae89630..ad0019d95abb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadResult.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResult.Serialization.cs @@ -152,7 +152,7 @@ protected virtual PendingUploadResult PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePendingUploadResult(document.RootElement, options); } @@ -167,8 +167,8 @@ protected virtual PendingUploadResult PersistableModelCreateCore(BinaryData data /// The to deserialize the from. public static explicit operator PendingUploadResult(ClientResult result) { - using PipelineResponse response = result.GetRawResponse(); - using JsonDocument document = JsonDocument.Parse(response.Content); + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePendingUploadResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResult.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadResult.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResult.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/PendingUploadType.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectConnectionBaseCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectConnectionBaseCredential.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectConnectionBaseCredential.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectConnectionBaseCredential.Serialization.cs index 733330590a7c..e30223af07d1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectConnectionBaseCredential.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectConnectionBaseCredential.Serialization.cs @@ -107,7 +107,7 @@ protected override AIProjectConnectionBaseCredential PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectConnectionBaseCredential(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectConnectionBaseCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectConnectionBaseCredential.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectConnectionBaseCredential.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectConnectionBaseCredential.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDataset.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDataset.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDataset.Serialization.cs index 21a07e5ee403..99c4c56acff0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDataset.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDataset.Serialization.cs @@ -185,7 +185,7 @@ protected override AIProjectDataset PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectDataset(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDataset.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDataset.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDataset.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDeployment.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDeployment.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDeployment.Serialization.cs index fb5e63a5f7fd..e7f25512b945 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDeployment.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDeployment.Serialization.cs @@ -113,7 +113,7 @@ protected override AIProjectDeployment PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectDeployment(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDeployment.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectDeployment.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectDeployment.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectIndex.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectIndex.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectIndex.Serialization.cs index d7d8ddee0d44..f0b0c0277e9c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectIndex.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectIndex.Serialization.cs @@ -160,7 +160,7 @@ protected override AIProjectIndex PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAIProjectIndex(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectIndex.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownAIProjectIndex.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/UnknownAIProjectIndex.cs diff --git a/sdk/ai/Azure.AI.Projects/tests/ConnectionsTest.cs b/sdk/ai/Azure.AI.Projects/tests/ConnectionsTest.cs index 2558c6611a65..ccf771103b6f 100644 --- a/sdk/ai/Azure.AI.Projects/tests/ConnectionsTest.cs +++ b/sdk/ai/Azure.AI.Projects/tests/ConnectionsTest.cs @@ -7,12 +7,6 @@ using System.Threading.Tasks; using Azure.Core.TestFramework; using NUnit.Framework; -using System.ClientModel.Primitives; -using System.Diagnostics; -using System.Collections.Generic; -using Azure.Identity; -using NUnit.Framework.Internal; -using Azure.AI.Projects.Tests.Utils; namespace Azure.AI.Projects.Tests { @@ -23,6 +17,7 @@ public ConnectionsTest(bool isAsync) : base(isAsync) } [RecordedTest] + [Ignore("Pending 2.* investigation")] public async Task ConnectionsBasicTest() { var connectionName = TestEnvironment.STORAGECONNECTIONNAME; diff --git a/sdk/ai/Azure.AI.Projects/tests/DeploymentTest.cs b/sdk/ai/Azure.AI.Projects/tests/DeploymentTest.cs index 93966db0ea5f..8fb6953b7907 100644 --- a/sdk/ai/Azure.AI.Projects/tests/DeploymentTest.cs +++ b/sdk/ai/Azure.AI.Projects/tests/DeploymentTest.cs @@ -22,6 +22,7 @@ public DeploymentTest(bool isAsync) : base(isAsync) //, RecordedTestMode.Record) } [RecordedTest] + [Ignore("Pending 2.* investigation")] public async Task AIDeploymentTest() { var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs index 27ba6b9da4c3..0b9cb84778ba 100644 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs @@ -39,93 +39,52 @@ private Task GetFileClientAsync(string endpoint) [Test] [AsyncOnly] - public async Task FileOperationsCRUDAsync() + public async Task FileOperationsAsync() { - #region Snippet:AI_Projects_FileOperationsAsync -#if SNIPPET - var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); -#else var endpoint = TestEnvironment.PROJECTENDPOINT; -#endif - AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); - AgentsClient agentClient = projectClient.GetAgentsClient(); - OpenAIClient oaiClient = agentClient.GetOpenAIClient(); - OpenAIFileClient fileClient = oaiClient.GetOpenAIFileClient(); - - string fileId = "file-abc123"; // Replace with an actual file ID from your project + var dataDirectory = GetDataDirectory(); + var testFilePath = Path.Combine(dataDirectory, "training_set.jsonl"); - // Retrieve file metadata - OpenAIFile retrievedFile = await fileClient.GetFileAsync(fileId); - Console.WriteLine($"File ID: {retrievedFile.Id}, Filename: {retrievedFile.Filename}"); + OpenAIFileClient fileClient = await GetFileClientAsync(endpoint); - // Download file content - BinaryData fileContent = await fileClient.DownloadFileAsync(fileId); - Console.WriteLine($"Content size: {fileContent.ToMemory().Length} bytes"); + // Step 1: Upload a file + Console.WriteLine("\n=== Step 1: Uploading File ==="); + Console.WriteLine($"Uploading file from: {testFilePath}"); - // List all files - ClientResult filesResult = await fileClient.GetFilesAsync(); - foreach (OpenAIFile file in filesResult.Value) + // Verify file exists and is not empty + if (!File.Exists(testFilePath)) { - Console.WriteLine($"File: {file.Filename} (ID: {file.Id})"); + throw new FileNotFoundException($"Test file not found: {testFilePath}"); } - // Delete file - ClientResult deleteResult = await fileClient.DeleteFileAsync(fileId); - Console.WriteLine($"File deleted: {deleteResult.Value.Deleted}"); - #endregion - } + FileInfo fileInfo = new FileInfo(testFilePath); + Console.WriteLine($"File size on disk: {fileInfo.Length} bytes"); - [Test] - [AsyncOnly] - public async Task FileOperationsAsync() - { - var endpoint = TestEnvironment.PROJECTENDPOINT; - var dataDirectory = GetDataDirectory(); - // var testFilePath = Path.Combine(dataDirectory, "training_set.jsonl"); + if (fileInfo.Length == 0) + { + throw new InvalidOperationException($"Test file is empty: {testFilePath}"); + } - OpenAIFileClient fileClient = await GetFileClientAsync(endpoint); + OpenAIFile uploadedFile; + using (FileStream fileStream = File.OpenRead(testFilePath)) + { + Console.WriteLine($"FileStream length: {fileStream.Length} bytes"); + Console.WriteLine($"FileStream can read: {fileStream.CanRead}"); - // Step 1: Upload a file - // Note: File upload via OpenAIClient from AgentsClient.GetOpenAIClient() is not currently supported - // because it doesn't set the required Content-Type header for individual multipart form parts. - // Using a pre-uploaded file ID for testing other file operations. - // Console.WriteLine("\n=== Step 1: Uploading File ==="); - // Console.WriteLine($"Uploading file from: {testFilePath}"); - // - // // Verify file exists and is not empty - // if (!File.Exists(testFilePath)) - // { - // throw new FileNotFoundException($"Test file not found: {testFilePath}"); - // } - // - // FileInfo fileInfo = new FileInfo(testFilePath); - // Console.WriteLine($"File size on disk: {fileInfo.Length} bytes"); - // - // if (fileInfo.Length == 0) - // { - // throw new InvalidOperationException($"Test file is empty: {testFilePath}"); - // } - // - // OpenAIFile uploadedFile; - // using (FileStream fileStream = File.OpenRead(testFilePath)) - // { - // Console.WriteLine($"FileStream length: {fileStream.Length} bytes"); - // Console.WriteLine($"FileStream can read: {fileStream.CanRead}"); - // - // uploadedFile = await fileClient.UploadFileAsync( - // fileStream, - // "training_set.jsonl", - // FileUploadPurpose.FineTune); - // } - // Console.WriteLine($"✅ File uploaded successfully!"); - // Console.WriteLine($" File ID: {uploadedFile.Id}"); - // Console.WriteLine($" Filename: {uploadedFile.Filename}"); - // Console.WriteLine($" Purpose: {uploadedFile.Purpose}"); - // Console.WriteLine($" Size: {uploadedFile.SizeInBytes} bytes"); - // Console.WriteLine($" Created At: {uploadedFile.CreatedAt}"); - - // Use a pre-existing file ID from the fine-tuning sample - string fileId = "file-6d833125cca94ed4a8798289534d8e38"; // Hardcoded for now, to be replaced by uploadedFile.Id + uploadedFile = await fileClient.UploadFileAsync( + fileStream, + "training_set.jsonl", + FileUploadPurpose.FineTune); + } + Console.WriteLine($"✅ File uploaded successfully!"); + Console.WriteLine($" File ID: {uploadedFile.Id}"); + Console.WriteLine($" Filename: {uploadedFile.Filename}"); + Console.WriteLine($" Purpose: {uploadedFile.Purpose}"); + Console.WriteLine($" Size: {uploadedFile.SizeInBytes} bytes"); + Console.WriteLine($" Created At: {uploadedFile.CreatedAt}"); + + // Use the uploaded file ID + string fileId = uploadedFile.Id; // Step 2: Retrieve file metadata by ID Console.WriteLine("\n=== Step 2: Retrieving File Metadata ==="); @@ -144,6 +103,10 @@ public async Task FileOperationsAsync() Console.WriteLine($"✅ File content retrieved successfully!"); Console.WriteLine($" Content size: {fileContent.ToMemory().Length} bytes"); + // Assert downloaded content matches expected size + Assert.IsNotNull(fileContent, "Downloaded file content should not be null"); + Assert.IsTrue(fileContent.ToMemory().Length > 0, "Downloaded content should not be empty"); + // Display first few lines of content string contentStr = fileContent.ToString(); string[] lines = contentStr.Split('\n'); @@ -183,11 +146,18 @@ public async Task FileOperationsAsync() } } Console.WriteLine($"✅ Listed {fileCount} file(s)"); + + // Assert that we listed at least one file + Assert.IsTrue(fileCount > 0, "Should have listed at least one file"); + if (foundUploadedFile) { Console.WriteLine($"✅ Confirmed our uploaded file is in the list"); } + // Assert that our uploaded file is in the list + Assert.IsTrue(foundUploadedFile, "Uploaded file should appear in the list of files"); + // Step 5: Delete the file Console.WriteLine("\n=== Step 5: Deleting File ==="); Console.WriteLine($"Deleting file with ID: {fileId}"); @@ -225,6 +195,9 @@ public async Task FileOperationsAsync() Console.WriteLine($"✅ Confirmed: File no longer appears in the list"); } + // Assert file no longer exists in the list + Assert.IsFalse(fileStillExists, "Deleted file should not appear in the list of files"); + Console.WriteLine("\n=== File Operations Completed Successfully! ==="); } } diff --git a/sdk/ai/Azure.AI.Projects/tests/TelemetryTest.cs b/sdk/ai/Azure.AI.Projects/tests/TelemetryTest.cs index bed9c12d3c67..a1792ccbdb0d 100644 --- a/sdk/ai/Azure.AI.Projects/tests/TelemetryTest.cs +++ b/sdk/ai/Azure.AI.Projects/tests/TelemetryTest.cs @@ -21,6 +21,7 @@ public TelemetryTest(bool isAsync) : base(isAsync) //, RecordedTestMode.Record) [TestCase] [RecordedTest] + [Ignore("Pending 2.* investigation")] public async Task TelemetryOperationsTest() { AIProjectClient projectClient = GetTestClient(); diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.csproj b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.csproj index b4fcec9b4aec..574a0b61517d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.csproj +++ b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/BasicVoiceAssistant.csproj @@ -12,15 +12,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.csproj b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.csproj index a2a542fb77f5..b15b939b36af 100644 --- a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.csproj +++ b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/CustomerServiceBot.csproj @@ -11,14 +11,14 @@ - - - - - - - - + + + + + + + + diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AnimationOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AnimationOptions.Serialization.cs index 1f08039875fb..fd37f0547435 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AnimationOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AnimationOptions.Serialization.cs @@ -150,7 +150,7 @@ protected virtual AnimationOptions PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAnimationOptions(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AssistantMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AssistantMessageItem.Serialization.cs index 7e5277535452..02fbdd4f3b05 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AssistantMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AssistantMessageItem.Serialization.cs @@ -150,7 +150,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAssistantMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioEchoCancellation.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioEchoCancellation.Serialization.cs index a5219d30b96d..e0a578d588b2 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioEchoCancellation.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioEchoCancellation.Serialization.cs @@ -122,7 +122,7 @@ protected virtual AudioEchoCancellation PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAudioEchoCancellation(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionOptions.Serialization.cs index 9ce13c614a3d..c5bc1aa3e0ae 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioInputTranscriptionOptions.Serialization.cs @@ -213,7 +213,7 @@ protected virtual AudioInputTranscriptionOptions PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAudioInputTranscriptionOptions(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioNoiseReduction.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioNoiseReduction.Serialization.cs index 3c25ca6377db..3a2963495f00 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioNoiseReduction.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AudioNoiseReduction.Serialization.cs @@ -127,7 +127,7 @@ protected virtual AudioNoiseReduction PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAudioNoiseReduction(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs index a80a2cc5d135..b1d41b54da54 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AvatarConfiguration.Serialization.cs @@ -192,7 +192,7 @@ protected virtual AvatarConfiguration PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvatarConfiguration(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureCustomVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureCustomVoice.Serialization.cs index d6353e0f2339..df918df67ee2 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureCustomVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureCustomVoice.Serialization.cs @@ -257,7 +257,7 @@ protected override AzureVoice PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureCustomVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzurePersonalVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzurePersonalVoice.Serialization.cs index 66a486d7577f..20d647ed1982 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzurePersonalVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzurePersonalVoice.Serialization.cs @@ -142,7 +142,7 @@ protected override AzureVoice PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzurePersonalVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetection.Serialization.cs index 1d5a661e4079..f30ba3349913 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetection.Serialization.cs @@ -136,7 +136,7 @@ protected override EouDetection PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticEouDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionEn.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionEn.Serialization.cs index 25e77746ae4a..17b6c5b60625 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionEn.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionEn.Serialization.cs @@ -136,7 +136,7 @@ protected override EouDetection PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticEouDetectionEn(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionMultilingual.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionMultilingual.Serialization.cs index 95b379ae9e3f..878fa5068317 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionMultilingual.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticEouDetectionMultilingual.Serialization.cs @@ -136,7 +136,7 @@ protected override EouDetection PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticEouDetectionMultilingual(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetection.Serialization.cs index f065a8c920b8..bd1ebdf25d39 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetection.Serialization.cs @@ -290,7 +290,7 @@ protected override TurnDetection PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticVadTurnDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionEn.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionEn.Serialization.cs index 427f0875bcd8..39fac62a90ae 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionEn.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionEn.Serialization.cs @@ -252,7 +252,7 @@ protected override TurnDetection PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticVadTurnDetectionEn(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionMultilingual.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionMultilingual.Serialization.cs index cddd09f4c806..8d0001d0ee94 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionMultilingual.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureSemanticVadTurnDetectionMultilingual.Serialization.cs @@ -290,7 +290,7 @@ protected override TurnDetection PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureSemanticVadTurnDetectionMultilingual(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureStandardVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureStandardVoice.Serialization.cs index 223e78d224f9..b3f78c2f0921 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureStandardVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureStandardVoice.Serialization.cs @@ -248,7 +248,7 @@ protected override AzureVoice PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureStandardVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureVoice.Serialization.cs index 1581f1a28f29..20f6a4750b55 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/AzureVoice.Serialization.cs @@ -128,7 +128,7 @@ protected virtual AzureVoice PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs index 4beee16f0c87..1fb5f2e2e98f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/CachedTokenDetails.Serialization.cs @@ -135,7 +135,7 @@ protected virtual CachedTokenDetails PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCachedTokenDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEvent.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEvent.Serialization.cs index 66945f29802a..bb84c235e269 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEvent.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEvent.Serialization.cs @@ -155,7 +155,7 @@ protected virtual ClientEvent PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEvent(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemCreate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemCreate.Serialization.cs index e32eff18f9e9..b5a33b957ff4 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemCreate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemCreate.Serialization.cs @@ -142,7 +142,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventConversationItemCreate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemDelete.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemDelete.Serialization.cs index 6573bfb10255..1789cd220985 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemDelete.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemDelete.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventConversationItemDelete(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemRetrieve.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemRetrieve.Serialization.cs index 46eed66c1197..6b5e339f4e65 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemRetrieve.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemRetrieve.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventConversationItemRetrieve(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemTruncate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemTruncate.Serialization.cs index 92f3b71ec23d..ca90124367c7 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemTruncate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventConversationItemTruncate.Serialization.cs @@ -146,7 +146,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventConversationItemTruncate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferAppend.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferAppend.Serialization.cs index f464e42e5234..0be82a295761 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferAppend.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferAppend.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioBufferAppend(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferClear.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferClear.Serialization.cs index 07f49a43f56e..720bb4e59884 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferClear.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferClear.Serialization.cs @@ -111,7 +111,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioBufferClear(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferCommit.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferCommit.Serialization.cs index fb442c3dca65..0e7233a6aa4b 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferCommit.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioBufferCommit.Serialization.cs @@ -111,7 +111,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioBufferCommit(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioClear.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioClear.Serialization.cs index e657c1d22722..36026d00c140 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioClear.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioClear.Serialization.cs @@ -111,7 +111,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioClear(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnAppend.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnAppend.Serialization.cs index 9012aded8816..aae080fdfbfd 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnAppend.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnAppend.Serialization.cs @@ -132,7 +132,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioTurnAppend(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnCancel.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnCancel.Serialization.cs index 5f20248cf68b..2b7f01d3efd1 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnCancel.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnCancel.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioTurnCancel(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnEnd.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnEnd.Serialization.cs index 0804b5c28cc0..1960d97110c6 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnEnd.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnEnd.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioTurnEnd(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnStart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnStart.Serialization.cs index 4294273c2c19..3563b218d59d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnStart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventInputAudioTurnStart.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventInputAudioTurnStart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCancel.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCancel.Serialization.cs index b6e7d6175d5b..7d25e5de0198 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCancel.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCancel.Serialization.cs @@ -122,7 +122,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventResponseCancel(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCreate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCreate.Serialization.cs index f20c70a5dc64..e2365fbcf2e6 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCreate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventResponseCreate.Serialization.cs @@ -137,7 +137,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventResponseCreate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionAvatarConnect.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionAvatarConnect.Serialization.cs index 06920c276a77..1865b0443c04 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionAvatarConnect.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionAvatarConnect.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventSessionAvatarConnect(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs index 79c1a4c3c7be..97ed495027f4 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ClientEventSessionUpdate.Serialization.cs @@ -124,7 +124,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEventSessionUpdate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ConversationRequestItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ConversationRequestItem.Serialization.cs index fa9579d18d1d..b86ca3873987 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ConversationRequestItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ConversationRequestItem.Serialization.cs @@ -133,7 +133,7 @@ protected virtual ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeConversationRequestItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/EouDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/EouDetection.Serialization.cs index 7a4faab52ea4..75656b12e8fe 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/EouDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/EouDetection.Serialization.cs @@ -128,7 +128,7 @@ protected virtual EouDetection PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEouDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallItem.Serialization.cs index bde18b19375d..12656a1826df 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallItem.Serialization.cs @@ -163,7 +163,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFunctionCallItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallOutputItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallOutputItem.Serialization.cs index c86afb025d6a..8e4eb13efaff 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallOutputItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/FunctionCallOutputItem.Serialization.cs @@ -154,7 +154,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFunctionCallOutputItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/IceServer.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/IceServer.Serialization.cs index 8f6df942f74e..0650678b2305 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/IceServer.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/IceServer.Serialization.cs @@ -171,7 +171,7 @@ protected virtual IceServer PersistableModelCreateCore(BinaryData data, ModelRea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIceServer(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputAudioContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputAudioContentPart.Serialization.cs index d1bdc1b8a7da..9d220432393a 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputAudioContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputAudioContentPart.Serialization.cs @@ -130,7 +130,7 @@ protected override MessageContentPart PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeInputAudioContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTextContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTextContentPart.Serialization.cs index d1629f8c7d5c..d884361705e9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTextContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTextContentPart.Serialization.cs @@ -119,7 +119,7 @@ protected override MessageContentPart PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeInputTextContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs index f5003022920c..bc269af501e8 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/InputTokenDetails.Serialization.cs @@ -151,7 +151,7 @@ protected virtual InputTokenDetails PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeInputTokenDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/Internal/CodeGenSerializationAttribute.cs index 6144cab5703f..dfe8b5b73d2d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs index 16843841563d..8bb34e431c20 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/LogProbProperties.Serialization.cs @@ -150,7 +150,7 @@ protected virtual LogProbProperties PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLogProbProperties(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageContentPart.Serialization.cs index 47270954eb0e..cfe93774448d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageContentPart.Serialization.cs @@ -128,7 +128,7 @@ protected virtual MessageContentPart PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMessageContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageItem.Serialization.cs index 7d5d01d9eb67..47aaf4bf60f9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/MessageItem.Serialization.cs @@ -122,7 +122,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OpenAIVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OpenAIVoice.Serialization.cs index b8eb8bcc2163..7127b4f027dd 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OpenAIVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OpenAIVoice.Serialization.cs @@ -140,7 +140,7 @@ protected virtual OpenAIVoice PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeOpenAIVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTextContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTextContentPart.Serialization.cs index 7eee09ad2548..2b3dd3be06c9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTextContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTextContentPart.Serialization.cs @@ -119,7 +119,7 @@ protected override MessageContentPart PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeOutputTextContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTokenDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTokenDetails.Serialization.cs index 7e0755c8f5a0..bcf3746c559f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTokenDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/OutputTokenDetails.Serialization.cs @@ -135,7 +135,7 @@ protected virtual OutputTokenDetails PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeOutputTokenDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestAudioContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestAudioContentPart.Serialization.cs index 4a7458ccced5..481f197894c7 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestAudioContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestAudioContentPart.Serialization.cs @@ -117,7 +117,7 @@ protected override VoiceLiveContentPart PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRequestAudioContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestTextContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestTextContentPart.Serialization.cs index 4d61b266182a..1a301a31c5ca 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestTextContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RequestTextContentPart.Serialization.cs @@ -117,7 +117,7 @@ protected override VoiceLiveContentPart PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRequestTextContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs index 5c0cfdb5f913..67de351b4ffd 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/RespondingAgentOptions.Serialization.cs @@ -167,7 +167,7 @@ protected virtual RespondingAgentOptions PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRespondingAgentOptions(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseAudioContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseAudioContentPart.Serialization.cs index ae45ca5374e5..5e3581fe5e72 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseAudioContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseAudioContentPart.Serialization.cs @@ -117,7 +117,7 @@ protected override VoiceLiveContentPart PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseAudioContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCancelledDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCancelledDetails.Serialization.cs index e5afa3cf49af..8573ac94ada0 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCancelledDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCancelledDetails.Serialization.cs @@ -119,7 +119,7 @@ protected override ResponseStatusDetails PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseCancelledDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCreateParams.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCreateParams.Serialization.cs index 8f373a28ae9e..d2a285a5b5a3 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCreateParams.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseCreateParams.Serialization.cs @@ -353,7 +353,7 @@ protected virtual ResponseCreateParams PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseCreateParams(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFailedDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFailedDetails.Serialization.cs index c08524a6eaaa..a1b1b3f2fa75 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFailedDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFailedDetails.Serialization.cs @@ -126,7 +126,7 @@ protected override ResponseStatusDetails PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseFailedDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs index b9dbbf69fafb..c9b5473fadeb 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallItem.Serialization.cs @@ -163,7 +163,7 @@ protected override SessionResponseItem PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseFunctionCallItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallOutputItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallOutputItem.Serialization.cs index 8c6e86d19b54..96a99a6ebee3 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallOutputItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseFunctionCallOutputItem.Serialization.cs @@ -145,7 +145,7 @@ protected override SessionResponseItem PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseFunctionCallOutputItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseIncompleteDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseIncompleteDetails.Serialization.cs index 1b8d97869f39..0dcaf9f6b424 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseIncompleteDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseIncompleteDetails.Serialization.cs @@ -119,7 +119,7 @@ protected override ResponseStatusDetails PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseIncompleteDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseStatusDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseStatusDetails.Serialization.cs index ca290d97726a..7f7478c63470 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseStatusDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseStatusDetails.Serialization.cs @@ -128,7 +128,7 @@ protected virtual ResponseStatusDetails PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseStatusDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTextContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTextContentPart.Serialization.cs index e1387b20bb07..7976883f9a42 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTextContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTextContentPart.Serialization.cs @@ -117,7 +117,7 @@ protected override VoiceLiveContentPart PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseTextContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTokenStatistics.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTokenStatistics.Serialization.cs index 4c1c09de609c..a80b5c074e4f 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTokenStatistics.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ResponseTokenStatistics.Serialization.cs @@ -165,7 +165,7 @@ protected virtual ResponseTokenStatistics PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseTokenStatistics(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerVadTurnDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerVadTurnDetection.Serialization.cs index 92cb4c106f47..891b4588f716 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerVadTurnDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ServerVadTurnDetection.Serialization.cs @@ -220,7 +220,7 @@ protected override TurnDetection PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeServerVadTurnDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponse.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponse.Serialization.cs index d1bd50066c7d..e0090b872f2e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponse.Serialization.cs @@ -315,7 +315,7 @@ protected virtual SessionResponse PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionResponse(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseItem.Serialization.cs index 3a399935b2e6..1c495e811a16 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseItem.Serialization.cs @@ -138,7 +138,7 @@ protected virtual SessionResponseItem PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionResponseItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseMessageItem.Serialization.cs index a527240a9792..a04d09b95c52 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionResponseMessageItem.Serialization.cs @@ -164,7 +164,7 @@ protected override SessionResponseItem PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionResponseMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdate.Serialization.cs index 835dc2d8ed07..a63b98354a75 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdate.Serialization.cs @@ -197,7 +197,7 @@ protected virtual SessionUpdate PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateAvatarConnecting.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateAvatarConnecting.Serialization.cs index 3ae6aeaf2e63..9a08196ea8b7 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateAvatarConnecting.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateAvatarConnecting.Serialization.cs @@ -125,7 +125,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateAvatarConnecting(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemCreated.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemCreated.Serialization.cs index d7b9ad7dcd63..bb1a9db64871 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemCreated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemCreated.Serialization.cs @@ -148,7 +148,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemCreated(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemDeleted.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemDeleted.Serialization.cs index 4fe6b1d2507b..78a31e54f923 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemDeleted.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemDeleted.Serialization.cs @@ -134,7 +134,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemDeleted(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionCompleted.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionCompleted.Serialization.cs index cd616e133420..f64585c3bebb 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionCompleted.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionCompleted.Serialization.cs @@ -157,7 +157,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemInputAudioTranscriptionCompleted(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionDelta.Serialization.cs index 0cceadab5cb7..f1b66193176b 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionDelta.Serialization.cs @@ -183,7 +183,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemInputAudioTranscriptionDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionFailed.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionFailed.Serialization.cs index 3369f9aa5435..ef9b933b0273 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionFailed.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemInputAudioTranscriptionFailed.Serialization.cs @@ -151,7 +151,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemInputAudioTranscriptionFailed(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemRetrieved.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemRetrieved.Serialization.cs index 475e7f6209a6..c23efde1c704 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemRetrieved.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemRetrieved.Serialization.cs @@ -132,7 +132,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemRetrieved(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemTruncated.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemTruncated.Serialization.cs index 811b0459509d..a0921dee3178 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemTruncated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateConversationItemTruncated.Serialization.cs @@ -158,7 +158,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateConversationItemTruncated(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs index aef24beac3cb..c53b1d04a710 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateError.Serialization.cs @@ -129,7 +129,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateError(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs index 60a40157916e..b99c6d43b9af 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateErrorDetails.Serialization.cs @@ -174,7 +174,7 @@ protected virtual SessionUpdateErrorDetails PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateErrorDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCleared.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCleared.Serialization.cs index e180cb449684..060a628aa9a2 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCleared.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCleared.Serialization.cs @@ -115,7 +115,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateInputAudioBufferCleared(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCommitted.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCommitted.Serialization.cs index 0b676a8782aa..78676e4f2a1a 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCommitted.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferCommitted.Serialization.cs @@ -141,7 +141,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateInputAudioBufferCommitted(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.Serialization.cs index 49889445eaf6..d3c0ebf5bac9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStarted.Serialization.cs @@ -143,7 +143,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateInputAudioBufferSpeechStarted(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStopped.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStopped.Serialization.cs index 7e163a7f1f60..fa8a15120860 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStopped.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateInputAudioBufferSpeechStopped.Serialization.cs @@ -137,7 +137,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateInputAudioBufferSpeechStopped(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDelta.Serialization.cs index 49dbf91286af..29814fa546e4 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDelta.Serialization.cs @@ -181,7 +181,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAnimationBlendshapeDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDone.Serialization.cs index 08badd11d031..157041423613 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationBlendshapeDone.Serialization.cs @@ -147,7 +147,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAnimationBlendshapeDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDelta.Serialization.cs index 9cbbf69df7fc..3b7f093c0ae1 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDelta.Serialization.cs @@ -174,7 +174,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAnimationVisemeDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs index 2921bf802f0e..d6d6ab5cd1ff 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAnimationVisemeDone.Serialization.cs @@ -156,7 +156,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAnimationVisemeDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs index ea84e5c898d4..1fc5189c4960 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDelta.Serialization.cs @@ -165,7 +165,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDone.Serialization.cs index 146dd6d49890..2aae9937946c 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioDone.Serialization.cs @@ -159,7 +159,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDelta.Serialization.cs index e229d160afe7..ada29292e39d 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDelta.Serialization.cs @@ -192,7 +192,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioTimestampDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDone.Serialization.cs index 76bc005f46ea..3c9d35305772 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTimestampDone.Serialization.cs @@ -156,7 +156,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioTimestampDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDelta.Serialization.cs index dad408e3414b..86d2db18ca4e 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDelta.Serialization.cs @@ -165,7 +165,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioTranscriptDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDone.Serialization.cs index 23e0c6bfe9df..2081cea68832 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseAudioTranscriptDone.Serialization.cs @@ -169,7 +169,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseAudioTranscriptDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartAdded.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartAdded.Serialization.cs index 949d66865d0e..e5514c2f80ea 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartAdded.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartAdded.Serialization.cs @@ -168,7 +168,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseContentPartAdded(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartDone.Serialization.cs index b4476dbade76..c760a8689377 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseContentPartDone.Serialization.cs @@ -168,7 +168,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseContentPartDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseCreated.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseCreated.Serialization.cs index 0a67d2652cd7..a3b987816615 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseCreated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseCreated.Serialization.cs @@ -128,7 +128,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseCreated(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseDone.Serialization.cs index 010dc0f5c5e6..c70f2432fa78 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseDone.Serialization.cs @@ -129,7 +129,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDelta.Serialization.cs index 2537f8fabbdc..f09db017e6f9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDelta.Serialization.cs @@ -165,7 +165,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseFunctionCallArgumentsDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDone.Serialization.cs index 0a3f956a317b..262750d9ea06 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseFunctionCallArgumentsDone.Serialization.cs @@ -177,7 +177,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseFunctionCallArgumentsDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemAdded.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemAdded.Serialization.cs index 3ece95fe4c2b..5adbb0fb1ead 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemAdded.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemAdded.Serialization.cs @@ -154,7 +154,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseOutputItemAdded(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemDone.Serialization.cs index 3d86e19ee72f..e759832b3c76 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseOutputItemDone.Serialization.cs @@ -157,7 +157,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseOutputItemDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDelta.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDelta.Serialization.cs index 09e7d9b17aab..33384c5cbcf8 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDelta.Serialization.cs @@ -165,7 +165,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseTextDelta(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDone.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDone.Serialization.cs index eba36ebcc434..63b23b84eb79 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDone.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateResponseTextDone.Serialization.cs @@ -168,7 +168,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateResponseTextDone(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs index f435d9b3b6d7..83c830cfbcc9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionCreated.Serialization.cs @@ -129,7 +129,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateSessionCreated(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs index 373ad96dd427..0be205af9554 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SessionUpdateSessionUpdated.Serialization.cs @@ -128,7 +128,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdateSessionUpdated(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SystemMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SystemMessageItem.Serialization.cs index 77a8e49540d7..aaf81c7b1817 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/SystemMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/SystemMessageItem.Serialization.cs @@ -150,7 +150,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSystemMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs index 739a3ba8095e..ddb93dec81f7 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceFunctionObject.Serialization.cs @@ -118,7 +118,7 @@ protected override ToolChoiceObject PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeToolChoiceFunctionObject(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs index f671b06e625e..7a0404fca6e5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/ToolChoiceObject.Serialization.cs @@ -120,7 +120,7 @@ protected virtual ToolChoiceObject PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeToolChoiceObject(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/TurnDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/TurnDetection.Serialization.cs index 599175e6caac..a7f7013ee6e5 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/TurnDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/TurnDetection.Serialization.cs @@ -130,7 +130,7 @@ protected virtual TurnDetection PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeTurnDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownAzureVoice.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownAzureVoice.Serialization.cs index bbe58ef95f11..f2892ae6eb43 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownAzureVoice.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownAzureVoice.Serialization.cs @@ -110,7 +110,7 @@ protected override AzureVoice PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAzureVoice(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownClientEvent.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownClientEvent.Serialization.cs index 06363f5f83a0..f319e357a280 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownClientEvent.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownClientEvent.Serialization.cs @@ -116,7 +116,7 @@ protected override ClientEvent PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeClientEvent(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownConversationRequestItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownConversationRequestItem.Serialization.cs index a8d5c64765cb..75fd62d10cb1 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownConversationRequestItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownConversationRequestItem.Serialization.cs @@ -116,7 +116,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeConversationRequestItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownEouDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownEouDetection.Serialization.cs index 43b199b96e38..4f93bba71080 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownEouDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownEouDetection.Serialization.cs @@ -110,7 +110,7 @@ protected override EouDetection PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEouDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageContentPart.Serialization.cs index 9a6021c85f66..a6802e5ab304 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageContentPart.Serialization.cs @@ -110,7 +110,7 @@ protected override MessageContentPart PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMessageContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageItem.Serialization.cs index 33ea90d26296..758713f7a624 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownMessageItem.Serialization.cs @@ -149,7 +149,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownResponseStatusDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownResponseStatusDetails.Serialization.cs index 6eab9085ade9..b131b588692a 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownResponseStatusDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownResponseStatusDetails.Serialization.cs @@ -110,7 +110,7 @@ protected override ResponseStatusDetails PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResponseStatusDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionResponseItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionResponseItem.Serialization.cs index ff5431472be0..a1a42c6038c8 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionResponseItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionResponseItem.Serialization.cs @@ -122,7 +122,7 @@ protected override SessionResponseItem PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionResponseItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionUpdate.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionUpdate.Serialization.cs index fdea4561506c..8dcfc5b95027 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionUpdate.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownSessionUpdate.Serialization.cs @@ -116,7 +116,7 @@ protected override SessionUpdate PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSessionUpdate(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownToolChoiceObject.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownToolChoiceObject.Serialization.cs index 3c83267111aa..28fc99f98c07 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownToolChoiceObject.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownToolChoiceObject.Serialization.cs @@ -110,7 +110,7 @@ protected override ToolChoiceObject PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeToolChoiceObject(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownTurnDetection.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownTurnDetection.Serialization.cs index 394d0eb46c14..3d015ec86e49 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownTurnDetection.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownTurnDetection.Serialization.cs @@ -110,7 +110,7 @@ protected override TurnDetection PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeTurnDetection(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveContentPart.Serialization.cs index 07b6f58abfc4..b93f27dd8c24 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveContentPart.Serialization.cs @@ -110,7 +110,7 @@ protected override VoiceLiveContentPart PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveToolDefinition.Serialization.cs index 01dc0f04f0c7..96840d8a56b9 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UnknownVoiceLiveToolDefinition.Serialization.cs @@ -110,7 +110,7 @@ protected override VoiceLiveToolDefinition PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveToolDefinition(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UserMessageItem.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UserMessageItem.Serialization.cs index 262f45b45fa0..1a5a80183ecb 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/UserMessageItem.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/UserMessageItem.Serialization.cs @@ -150,7 +150,7 @@ protected override ConversationRequestItem PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeUserMessageItem(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoBackground.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoBackground.Serialization.cs index fa130cc71b60..7786e1d63343 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoBackground.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoBackground.Serialization.cs @@ -136,7 +136,7 @@ protected virtual VideoBackground PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVideoBackground(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoCrop.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoCrop.Serialization.cs index d34c59d951e0..f654c31c0207 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoCrop.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoCrop.Serialization.cs @@ -155,7 +155,7 @@ protected virtual VideoCrop PersistableModelCreateCore(BinaryData data, ModelRea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVideoCrop(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoParams.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoParams.Serialization.cs index 39bbecc859ec..9f641c2b0eda 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoParams.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoParams.Serialization.cs @@ -207,7 +207,7 @@ protected virtual VideoParams PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVideoParams(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoResolution.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoResolution.Serialization.cs index a3386dd6ec20..08f7b4cb0181 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoResolution.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VideoResolution.Serialization.cs @@ -135,7 +135,7 @@ protected virtual VideoResolution PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVideoResolution(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveContentPart.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveContentPart.Serialization.cs index 3a9962532414..39b179a31e41 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveContentPart.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveContentPart.Serialization.cs @@ -130,7 +130,7 @@ protected virtual VoiceLiveContentPart PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveContentPart(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveErrorDetails.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveErrorDetails.Serialization.cs index 1c33bb7890ab..9645978eca29 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveErrorDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveErrorDetails.Serialization.cs @@ -177,7 +177,7 @@ protected virtual VoiceLiveErrorDetails PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveErrorDetails(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveFunctionDefinition.Serialization.cs index 8011c593a835..34bdfde25a42 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveFunctionDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveFunctionDefinition.Serialization.cs @@ -152,7 +152,7 @@ protected override VoiceLiveToolDefinition PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveFunctionDefinition(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs index dd866d6a9bab..a223cd248f22 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionOptions.Serialization.cs @@ -432,7 +432,7 @@ protected virtual VoiceLiveSessionOptions PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveSessionOptions(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs index 03fe1c101498..32145666aa23 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveSessionResponse.Serialization.cs @@ -460,7 +460,7 @@ protected virtual VoiceLiveSessionResponse PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveSessionResponse(document.RootElement, options); } diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveToolDefinition.Serialization.cs index 8ebaf66c16ba..5e6df995c584 100644 --- a/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.VoiceLive/src/Generated/VoiceLiveToolDefinition.Serialization.cs @@ -124,7 +124,7 @@ protected virtual VoiceLiveToolDefinition PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeVoiceLiveToolDefinition(document.RootElement, options); } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json b/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json index ae1c03c6733d..abbad599e8f5 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/appconfiguration/Azure.Data.AppConfiguration", - "Tag": "net/appconfiguration/Azure.Data.AppConfiguration_e13e6656e2" + "Tag": "net/appconfiguration/Azure.Data.AppConfiguration_932ea57074" } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ApiVersionPolicy.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ApiVersionPolicy.cs deleted file mode 100644 index 7f35d48ca039..000000000000 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ApiVersionPolicy.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.Data.AppConfiguration -{ - internal class ApiVersionPolicy : HttpPipelineSynchronousPolicy - { - private readonly string _versionString; - - public ApiVersionPolicy(string versionString) - { - _versionString = versionString; - } - - public override void OnSendingRequest(HttpMessage message) - { - message.Request.Uri.AppendQuery("api-version", _versionString); - } - } -} diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs index fd4151d1a1f4..7b63921eb5b1 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs @@ -199,7 +199,7 @@ internal ConfigurationClient(Uri endpoint, TokenCredential credential, string sy private static HttpPipeline CreatePipeline(ConfigurationClientOptions options, HttpPipelinePolicy authenticationPolicy, HttpPipelinePolicy syncTokenPolicy) { return HttpPipelineBuilder.Build(options, - new HttpPipelinePolicy[] { new CustomHeadersPolicy() }, + new HttpPipelinePolicy[] { new CustomHeadersPolicy(), new QueryParamPolicy() }, new HttpPipelinePolicy[] { authenticationPolicy, syncTokenPolicy }, new ResponseClassifier()); } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSetting.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSetting.Serialization.cs index e1d0f1f8a715..7eaa35f98e5b 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSetting.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSetting.Serialization.cs @@ -245,7 +245,7 @@ protected virtual ConfigurationSetting PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeConfigurationSetting(document.RootElement, options); } @@ -272,7 +272,7 @@ public static implicit operator RequestContent(ConfigurationSetting configuratio /// The to deserialize the from. public static explicit operator ConfigurationSetting(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeConfigurationSetting(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSettingsFilter.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSettingsFilter.Serialization.cs index 287c2fc0684b..b52e7696a631 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSettingsFilter.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSettingsFilter.Serialization.cs @@ -178,7 +178,7 @@ protected virtual ConfigurationSettingsFilter PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeConfigurationSettingsFilter(document.RootElement, options); } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSnapshot.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSnapshot.Serialization.cs index 543970d92d3a..0e67fab9b949 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSnapshot.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/ConfigurationSnapshot.Serialization.cs @@ -75,7 +75,7 @@ protected virtual ConfigurationSnapshot PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeConfigurationSnapshot(document.RootElement, options); } @@ -102,7 +102,7 @@ public static implicit operator RequestContent(ConfigurationSnapshot configurati /// The to deserialize the from. public static explicit operator ConfigurationSnapshot(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeConfigurationSnapshot(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Internal/CodeGenSerializationAttribute.cs index 64c1804b62e4..29a32b634212 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Models/AzureDataAppConfigurationContext.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Models/AzureDataAppConfigurationContext.cs index 407a57ddb599..589796775963 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Models/AzureDataAppConfigurationContext.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/Models/AzureDataAppConfigurationContext.cs @@ -17,9 +17,9 @@ namespace Azure.Data.AppConfiguration [ModelReaderWriterBuildable(typeof(ConfigurationSetting))] [ModelReaderWriterBuildable(typeof(ConfigurationSettingsFilter))] [ModelReaderWriterBuildable(typeof(ConfigurationSnapshot))] - [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SettingLabel))] [ModelReaderWriterBuildable(typeof(SnapshotUpdateParameters))] + [ModelReaderWriterBuildable(typeof(ResponseError))] public partial class AzureDataAppConfigurationContext : ModelReaderWriterContext { } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SettingLabel.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SettingLabel.Serialization.cs index a2e18a6f24d0..f8c39b83e5ad 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SettingLabel.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SettingLabel.Serialization.cs @@ -125,7 +125,7 @@ protected virtual SettingLabel PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSettingLabel(document.RootElement, options); } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SnapshotUpdateParameters.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SnapshotUpdateParameters.Serialization.cs index 3fb56085866d..40a332cb09cc 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SnapshotUpdateParameters.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Generated/SnapshotUpdateParameters.Serialization.cs @@ -128,7 +128,7 @@ protected virtual SnapshotUpdateParameters PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSnapshotUpdateParameters(document.RootElement, options); } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationModelFactory.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationModelFactory.cs index 36511878615a..b5d8bf6385b8 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationModelFactory.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationModelFactory.cs @@ -12,7 +12,7 @@ namespace Azure.Data.AppConfiguration /// /// Configuration Setting model factory that enables mocking for the AppConfiguration client library. /// - [CodeGenType("AzureDataAppConfigurationModelFactory")] + [CodeGenType("AppConfigurationModelFactory")] [CodeGenSuppress("ConfigurationSetting", typeof(string), typeof(string), typeof(string), typeof(string), typeof(DateTimeOffset?), typeof(IDictionary), typeof(bool?), typeof(ETag))] public static partial class ConfigurationModelFactory { diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs new file mode 100644 index 000000000000..27b202c5aa7a --- /dev/null +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/QueryParamPolicy.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Data.AppConfiguration +{ + /// + /// Policy that lowercases and sorts outgoing request query parameters. + /// + internal class QueryParamPolicy : HttpPipelineSynchronousPolicy + { + private struct QueryParamEntry + { + public ReadOnlyMemory Name { get; set; } + public ReadOnlyMemory Value { get; set; } + public int Index { get; set; } + } + + public override void OnSendingRequest(HttpMessage message) + { + string originalQuery = message.Request.Uri.Query; + + if (string.IsNullOrEmpty(originalQuery)) + { + return; + } + + ReadOnlyMemory queryMemory = originalQuery.AsMemory(); + + if (queryMemory.Span[0] == '?') + { + queryMemory = queryMemory.Slice(1); + } + + var segments = new List(); + int startIndex = 0; + + for (int i = 0; i < queryMemory.Length; i++) + { + if (queryMemory.Span[i] == '&') + { + if (i > startIndex) + { + AddParameter(queryMemory.Slice(startIndex, i - startIndex), segments); + } + startIndex = i + 1; + } + } + + // Add the last parameter + if (startIndex < queryMemory.Length) + { + AddParameter(queryMemory.Slice(startIndex), segments); + } + + // List.Sort method is not stable. See the remark section: https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.sort + // Sort by lowercase name, preserving relative order for duplicates + segments.Sort((a, b) => + { + int nameComparison = MemoryExtensions.CompareTo( + a.Name.Span, + b.Name.Span, + StringComparison.OrdinalIgnoreCase); + + if (nameComparison != 0) + { + return nameComparison; + } + return a.Index.CompareTo(b.Index); + }); + + var sb = new StringBuilder(); + sb.Append('?'); + + for (int i = 0; i < segments.Count; i++) + { + if (i > 0) + { + sb.Append('&'); + } + + ReadOnlySpan nameSpan = segments[i].Name.Span; + for (int c = 0; c < nameSpan.Length; c++) + { + sb.Append(char.ToLowerInvariant(nameSpan[c])); + } + sb.Append('='); + sb.Append(segments[i].Value); + } + + string newQuery = sb.ToString(); + + if (!newQuery.Equals(originalQuery)) + { + message.Request.Uri.Query = newQuery; + } + } + + private static void AddParameter(ReadOnlyMemory parameter, List segments) + { + if (parameter.IsEmpty) + { + return; + } + + int equalsIndex = parameter.Span.IndexOf('='); + + ReadOnlyMemory name; + ReadOnlyMemory value; + + name = equalsIndex >= 0 ? parameter.Slice(0, equalsIndex) : parameter; + value = equalsIndex >= 0 ? parameter.Slice(equalsIndex + 1) : ReadOnlyMemory.Empty; + + segments.Add(new QueryParamEntry + { + Name = name, + Value = value, + Index = segments.Count + }); + } + } +} diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/SyncTokenPolicy.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/SyncTokenPolicy.cs index 79281252ccf6..cd50a6622ded 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/SyncTokenPolicy.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/SyncTokenPolicy.cs @@ -8,6 +8,9 @@ namespace Azure.Data.AppConfiguration { + /// + /// Policy that manages and applies App Configuration sync tokens to requests. + /// internal class SyncTokenPolicy : HttpPipelineSynchronousPolicy { private const string SyncTokenHeader = "Sync-Token"; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs index 2c35afd77ffe..633be271615a 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationMockTests.cs @@ -997,30 +997,90 @@ public async Task VerifyNullClientFilter() } [Test] - public async Task SupportsCustomTransportUse() + public async Task QueryParametersAreSorted() { - var expectedKey = "abc"; - var expectedValue = "ghi"; - var expectedLabel = "def"; - var expectedContent = @$"{{""key"":""{expectedKey}"",""label"":""{expectedLabel}"",""value"":""{expectedValue}""}}"; - - var client = new ConfigurationClient( - s_connectionString, - new ConfigurationClientOptions - { - Transport = new HttpClientTransport(new EchoHttpMessageHandler(expectedContent)) - } - ); + var response1 = new MockResponse(200); + var mockTags = new Dictionary + { + { "tag2", "value2" }, + { "tag1", "value1" } + }; + ConfigurationSetting testSetting = CreateSetting(0, mockTags); + response1.SetContent(SerializationHelpers.Serialize((Settings: new[] { testSetting }, NextLink: $"/kv?key=key%2A&label=label&tags=tag2%3Dvalue2&tags=tag1%3Dvalue1&after=test_after&api-version={s_version}"), SerializeBatch)); + + var response2 = new MockResponse(200); + var testSetting2 = CreateSetting(1, mockTags); + response2.SetContent(SerializationHelpers.Serialize((Settings: new[] { testSetting2 }, NextLink: (string)null), SerializeBatch)); + + var mockTransport = new MockTransport(response1, response2); + ConfigurationClient service = CreateTestService(mockTransport); + + var query = new SettingSelector + { + KeyFilter = "key*", + LabelFilter = "label" + }; + foreach (var tag in mockTags) + { + query.TagsFilter.Add($"{tag.Key}={tag.Value}"); + } + + await foreach (ConfigurationSetting value in service.GetConfigurationSettingsAsync(query, CancellationToken.None)) + { + continue; + } + + Assert.AreEqual(2, mockTransport.Requests.Count); + + // Verify the first request has sorted query parameters (lowercase, alphabetically ordered) + MockRequest request1 = mockTransport.Requests[0]; + var expectedUri1 = $"https://contoso.appconfig.io/kv?api-version={s_version}&key=key%2A&label=label&tags=tag2%3Dvalue2&tags=tag1%3Dvalue1"; + Assert.AreEqual(expectedUri1, request1.Uri.ToString()); + + // Verify the next link request has sorted query parameters including "after" + MockRequest request2 = mockTransport.Requests[1]; + var expectedUri2 = $"https://contoso.appconfig.io/kv?after=test_after&api-version={s_version}&key=key%2A&label=label&tags=tag2%3Dvalue2&tags=tag1%3Dvalue1"; + Assert.AreEqual(expectedUri2, request2.Uri.ToString()); + } + + [Test] + public async Task GetSnapshot() + { + var mockResponse = new MockResponse(200); + // Minimal snapshot payload; we only validate the request URI + mockResponse.SetContent("{\"name\":\"test-snapshot\"}"); + + var mockTransport = new MockTransport(mockResponse); + ConfigurationClient service = CreateTestService(mockTransport); - var result = await client.GetConfigurationSettingAsync("doesnt-matter"); - Assert.AreEqual(expectedKey, result.Value.Key); - Assert.AreEqual(expectedValue, result.Value.Value); - Assert.AreEqual(expectedLabel, result.Value.Label); + await service.GetSnapshotAsync("test-snapshot"); + + MockRequest request = mockTransport.SingleRequest; + AssertRequestCommon(request); + Assert.AreEqual(RequestMethod.Get, request.Method); + Assert.AreEqual($"https://contoso.appconfig.io/snapshots/test-snapshot?api-version={s_version}", request.Uri.ToString()); + } - var result2 = await client.SetConfigurationSettingAsync("whatever", "somevalue"); - Assert.AreEqual(expectedKey, result.Value.Key); - Assert.AreEqual(expectedValue, result.Value.Value); - Assert.AreEqual(expectedLabel, result.Value.Label); + [Test] + public async Task GetConfigurationSettingsForSnapshot() + { + var mockResponse = new MockResponse(200); + // Reuse existing batch serialization helper for key-values + var settings = new[] { s_testSetting }; + mockResponse.SetContent(SerializationHelpers.Serialize((Settings: settings, NextLink: (string)null), SerializeBatch)); + + var mockTransport = new MockTransport(mockResponse); + ConfigurationClient service = CreateTestService(mockTransport); + + await foreach (ConfigurationSetting setting in service.GetConfigurationSettingsForSnapshotAsync("test-snapshot", CancellationToken.None)) + { + break; + } + + MockRequest request = mockTransport.SingleRequest; + AssertRequestCommon(request); + Assert.AreEqual(RequestMethod.Get, request.Method); + Assert.AreEqual($"https://contoso.appconfig.io/kv?api-version={s_version}&snapshot=test-snapshot", request.Uri.ToString()); } private void AssertContent(byte[] expected, MockRequest request, bool compareAsString = true) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/QueryParamPolicyTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/QueryParamPolicyTests.cs new file mode 100644 index 000000000000..4ac08feab93a --- /dev/null +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/QueryParamPolicyTests.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.Data.AppConfiguration.Tests +{ + public class QueryParamPolicyTests : SyncAsyncPolicyTestBase + { + public QueryParamPolicyTests(bool isAsync) : base(isAsync) { } + + [Test] + public async Task NormalizesQueryParameters() + { + string originalUrl = "https://example.azconfig.io/kv?api-version=1.0&$Select=key&label=%00&key=*"; + string expectedUrl = "https://example.azconfig.io/kv?$select=key&api-version=1.0&key=*&label=%00"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response1 = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task LowercasesParameterNames() + { + string originalUrl = "https://example.azconfig.io/kv?API-VERSION=1.0&LABEL=test&KEY=mykey"; + string expectedUrl = "https://example.azconfig.io/kv?api-version=1.0&key=mykey&label=test"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task SortsByLowercaseName() + { + string originalUrl = "https://example.azconfig.io/kv?zebra=1&alpha=2&beta=3"; + string expectedUrl = "https://example.azconfig.io/kv?alpha=2&beta=3&zebra=1"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task PreservesRelativeOrderOfDuplicates() + { + string originalUrl = "https://example.azconfig.io/kv?tags=tag3%3Dvalue3&other=value&tags=tag2%3Dvalue2&tags=tag1%3Dvalue1"; + string expectedUrl = "https://example.azconfig.io/kv?other=value&tags=tag3%3Dvalue3&tags=tag2%3Dvalue2&tags=tag1%3Dvalue1"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task KeepsOriginalEncodedParameterValue() + { + string originalUrl = "https://example.azconfig.io/kv?key=%25%20%2B"; + string expectedUrl = "https://example.azconfig.io/kv?key=%25%20%2B"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task KeepsEmptyParameterValue() + { + string originalUrl = "https://example.azconfig.io/kv?key=&api-version=2023-11-01&key1&="; + string expectedUrl = "https://example.azconfig.io/kv?=&api-version=2023-11-01&key=&key1="; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task RemovesRedundantAnd() + { + string originalUrl = "https://example.azconfig.io/kv?b=2&&a=1"; + string expectedUrl = "https://example.azconfig.io/kv?a=1&b=2"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + + [Test] + public async Task SkipsWhenNoQueryParametersArePresent() + { + string originalUrl = "https://example.azconfig.io/kv?"; + string expectedUrl = "https://example.azconfig.io/kv?"; + + MockTransport transport = CreateMockTransport(new MockResponse(200)); + QueryParamPolicy policy = new QueryParamPolicy(); + + Response response = await SendRequestAsync(transport, message => + { + message.Request.Uri.Reset(new System.Uri(originalUrl)); + }, policy); + + MockRequest request = transport.SingleRequest; + Assert.AreEqual(expectedUrl, request.Uri.ToString()); + } + } +} diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs index 282370f2fd66..1e287452d03d 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation Create /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Can /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string organizationname, C /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string organizationname, CancellationToken /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs index 469a83fe73db..7ad784ef01e0 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(Cancel } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(Ari /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArmArizeAIObservabilityEvalModelFactory.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArmArizeAIObservabilityEvalModelFactory.cs index 5a86b2475d70..30a0a53e13a5 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArmArizeAIObservabilityEvalModelFactory.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArmArizeAIObservabilityEvalModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.ArizeAIObservabilityEval; using Azure.ResourceManager.Models; diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs index bea197200590..df611c24a4b5 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual ArizeAIObservabilityEvalOrganizationCollection GetArizeAIObservab return GetCachedClient(client => new ArizeAIObservabilityEvalOrganizationCollection(client, Id)); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-10-01. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task return await GetArizeAIObservabilityEvalOrganizations().GetAsync(organizationname, cancellationToken).ConfigureAwait(false); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-10-01. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs index 4149db893152..87a0e03ab270 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs @@ -183,15 +183,15 @@ protected virtual ArizeAIObservabilityEvalOrganizationPatch PersistableModelCrea /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(ArizeAIObservabilityEvalOrganizationPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(ArizeAIObservabilityEvalOrganizationPatch arizeAIObservabilityEvalOrganizationPatch) { - if (patch == null) + if (arizeAIObservabilityEvalOrganizationPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(arizeAIObservabilityEvalOrganizationPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/AzureResourceManagerArizeAIObservabilityEvalContext.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/AzureResourceManagerArizeAIObservabilityEvalContext.cs index 70645ec090b2..730b0d41d7c4 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/AzureResourceManagerArizeAIObservabilityEvalContext.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/AzureResourceManagerArizeAIObservabilityEvalContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.ArizeAIObservabilityEval.Models; using Azure.ResourceManager.Models; @@ -26,6 +27,7 @@ namespace Azure.ResourceManager.ArizeAIObservabilityEval [ModelReaderWriterBuildable(typeof(ArizeAIObservabilityEvalUserDetails))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(OrganizationResourceListResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerArizeAIObservabilityEvalContext : ModelReaderWriterContext diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md index 0f66484af26b..342a09a15e06 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.3 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.0.0-beta.2 (2025-11-03) + +### Bugs Fixed + +Fixed issue [53564](https://github.com/Azure/azure-sdk-for-net/issues/53564): Resolved incorrect request data of `GetSpotPlacementScore` operation. + ## 1.0.0-beta.1 (2025-09-30) ### Features Added diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs index f18534c6bc52..0988db689ec6 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs @@ -27,8 +27,8 @@ protected ComputeRecommenderDiagnosticResource() { } public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location) { throw null; } - public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs index f18534c6bc52..0988db689ec6 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs @@ -27,8 +27,8 @@ protected ComputeRecommenderDiagnosticResource() { } public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location) { throw null; } - public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Azure.ResourceManager.Compute.Recommender.csproj b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Azure.ResourceManager.Compute.Recommender.csproj index f5a3d870a32a..31b2ffd390f7 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Azure.ResourceManager.Compute.Recommender.csproj +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Azure.ResourceManager.Compute.Recommender.csproj @@ -1,7 +1,7 @@ Azure Resource Manager client SDK for Azure resource provider ComputeRecommender. - 1.0.0-beta.2 + 1.0.0-beta.3 azure;management;arm;resource manager;computerecommender Azure.ResourceManager.Compute.Recommender diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ArmComputeRecommenderModelFactory.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ArmComputeRecommenderModelFactory.cs index 96f129492821..26cc6c4a3354 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ArmComputeRecommenderModelFactory.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ArmComputeRecommenderModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Compute.Recommender; using Azure.ResourceManager.Models; diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs index 9ec98186d213..5a15449fa4b5 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// ComputeDiagnosticBases_Get. /// /// /// Default Api Version. @@ -123,7 +123,7 @@ public virtual async Task> GetAsy { CancellationToken = cancellationToken }; - HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Name, context); + HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(ComputeRecommenderDiagnosticData.FromResponse(result), result); if (response.Value == null) @@ -148,7 +148,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// ComputeDiagnosticBases_Get. /// /// /// Default Api Version. @@ -171,7 +171,7 @@ public virtual Response Get(CancellationTo { CancellationToken = cancellationToken }; - HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Name, context); + HttpMessage message = _spotPlacementScoresRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(ComputeRecommenderDiagnosticData.FromResponse(result), result); if (response.Value == null) @@ -196,7 +196,7 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id. - /// Generate. + /// ComputeDiagnosticBases_Post. /// /// /// Default Api Version. @@ -208,12 +208,12 @@ public virtual Response Get(CancellationTo /// /// /// - /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation. + /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation. /// The cancellation token to use. - /// is null. - public virtual async Task> GenerateAsync(ComputeRecommenderGenerateContent spotPlacementScoresInput, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GenerateAsync(ComputeRecommenderGenerateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput)); + Argument.AssertNotNull(content, nameof(content)); using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate"); scope.Start(); @@ -223,7 +223,7 @@ public virtual async Task> GenerateAs { CancellationToken = cancellationToken }; - HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context); + HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, ComputeRecommenderGenerateContent.ToRequestContent(content), context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result); if (response.Value == null) @@ -248,7 +248,7 @@ public virtual async Task> GenerateAs /// /// /// Operation Id. - /// Generate. + /// ComputeDiagnosticBases_Post. /// /// /// Default Api Version. @@ -260,12 +260,12 @@ public virtual async Task> GenerateAs /// /// /// - /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation. + /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation. /// The cancellation token to use. - /// is null. - public virtual Response Generate(ComputeRecommenderGenerateContent spotPlacementScoresInput, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Generate(ComputeRecommenderGenerateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput)); + Argument.AssertNotNull(content, nameof(content)); using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate"); scope.Start(); @@ -275,7 +275,7 @@ public virtual Response Generate(ComputeRecomm { CancellationToken = cancellationToken }; - HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context); + HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Parent.Name, ComputeRecommenderGenerateContent.ToRequestContent(content), context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result); if (response.Value == null) diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs index 110484d982e1..d5a3f8aeb26d 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs @@ -27,7 +27,27 @@ internal MockableComputeRecommenderSubscriptionResource(ArmClient client, Resour { } - /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// + /// Gets Spot Placement Scores metadata. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot. + /// + /// + /// Operation Id. + /// ComputeDiagnosticBases_Get. + /// + /// + /// Default Api Version. + /// 2025-06-05. + /// + /// + /// Resource. + /// . + /// + /// + /// /// Returns a object. public virtual ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic() { diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/AzureResourceManagerComputeRecommenderContext.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/AzureResourceManagerComputeRecommenderContext.cs index 890ad6b24aad..688f08de84c3 100644 --- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/AzureResourceManagerComputeRecommenderContext.cs +++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Models/AzureResourceManagerComputeRecommenderContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Compute.Recommender.Models; using Azure.ResourceManager.Models; @@ -22,6 +23,7 @@ namespace Azure.ResourceManager.Compute.Recommender [ModelReaderWriterBuildable(typeof(ComputeRecommenderGenerateResult))] [ModelReaderWriterBuildable(typeof(ComputeRecommenderPlacementScore))] [ModelReaderWriterBuildable(typeof(ComputeRecommenderResourceSize))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] public partial class AzureResourceManagerComputeRecommenderContext : ModelReaderWriterContext { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md index c483ee98721a..a9d90e5886a5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.4.0 (2025-11-05) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded api-version to 2025-11-01. ## 1.3.1 (2025-08-11) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs index 8f863034c3b7..d6ddb6362e95 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs @@ -248,6 +248,7 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -255,6 +256,7 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? IsNetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public string LoginServer { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } @@ -262,6 +264,7 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -966,7 +969,9 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), bool? isNetworkRuleBypassAllowedForTasks = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } @@ -976,8 +981,12 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } @@ -1012,6 +1021,27 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1812,7 +1842,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } + public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1824,6 +1856,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } + public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -1962,10 +1995,12 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? IsNetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2162,6 +2197,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerRegistryRoleAssignmentMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs index 8f863034c3b7..d6ddb6362e95 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs @@ -248,6 +248,7 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -255,6 +256,7 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? IsNetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public string LoginServer { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } @@ -262,6 +264,7 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -966,7 +969,9 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), bool? isNetworkRuleBypassAllowedForTasks = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } @@ -976,8 +981,12 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } @@ -1012,6 +1021,27 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1812,7 +1842,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } + public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1824,6 +1856,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } + public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -1962,10 +1995,12 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? IsNetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2162,6 +2197,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerRegistryRoleAssignmentMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json index af96147e0919..ae5a1b5cca55 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/containerregistry/Azure.ResourceManager.ContainerRegistry", - "Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_6cf6b7291a" + "Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_072b17d2b5" } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj index aa962d7b52f4..5c4b621b77ee 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Azure.ResourceManager.ContainerRegistry.csproj @@ -1,6 +1,6 @@ - 1.4.0-beta.1 + 1.4.0 1.3.1 Azure.ResourceManager.ContainerRegistry diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs index 22250a1b72f1..12f1d8ef8a08 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs @@ -17,6 +17,161 @@ namespace Azure.ResourceManager.ContainerRegistry.Models /// Model factory for models. public static partial class ArmContainerRegistryModelFactory { + /// Initializes a new instance of . + /// The name of the container registry. + /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource group name of the container registry. + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + /// A new instance for mocking. + public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default, string resourceGroupName = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) + { + return new ContainerRegistryNameAvailabilityContent(name, resourceType, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The complete login server name with domain name label (DNL) hash, if available. + /// The value that indicates whether the name is available. + /// If any, the reason that the name is not available. + /// If any, the error message that provides more detail for the reason that the name is not available. + /// A new instance for mocking. + public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = null, string reason = null, string message = null) + { + return new ContainerRegistryNameAvailableResult(availableLoginServerName, isNameAvailable, reason, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the container registry. + /// The identity of the container registry. + /// The URL that can be used to log into the container registry. + /// The creation date of the container registry in ISO8601 format. + /// The provisioning state of the container registry at the time the operation was called. + /// The status of the container registry at the time the operation was called. + /// The value that indicates whether the admin user is enabled. + /// The network rule set for a container registry. + /// The policies for a container registry. + /// The encryption settings of container registry. + /// Enable a single data endpoint per region for serving data. + /// List of host names that will serve data when dataEndpointEnabled is true. + /// List of private endpoint connections for a container registry. + /// Whether or not public network access is allowed for the container registry. + /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not Tasks allowed to bypass the network rules for this container registry. + /// Whether or not zone redundancy is enabled for this container registry. + /// Enables registry-wide pull from unauthenticated clients. + /// Determines the domain name label reuse scope. + /// Determines registry role assignment mode. + /// A new instance for mocking. + public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, bool? isNetworkRuleBypassAllowedForTasks = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, ContainerRegistryRoleAssignmentMode? roleAssignmentMode = null) + { + tags ??= new Dictionary(); + dataEndpointHostNames ??= new List(); + privateEndpointConnections ??= new List(); + + return new ContainerRegistryData( + id, + name, + resourceType, + systemData, + tags, + location, + sku, + identity, + loginServer, + createdOn, + provisioningState, + status, + isAdminUserEnabled, + networkRuleSet, + policies, + encryption, + isDataEndpointEnabled, + dataEndpointHostNames?.ToList(), + privateEndpointConnections?.ToList(), + publicNetworkAccess, + networkRuleBypassOptions, + isNetworkRuleBypassAllowedForTasks, + zoneRedundancy, + isAnonymousPullEnabled, + autoGeneratedDomainNameLabelScope, + roleAssignmentMode, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The short label for the status. + /// The detailed message for the status, including alerts and error messages. + /// The timestamp when the status was changed to the current value. + /// A new instance for mocking. + public static ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, DateTimeOffset? timestamp = null) + { + return new ContainerRegistryResourceStatus(displayStatus, message, timestamp, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of days to retain an untagged manifest after which it gets purged. + /// The timestamp when the policy was last updated. + /// The value that indicates whether the policy is enabled or not. + /// A new instance for mocking. + public static ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = null, DateTimeOffset? lastUpdatedOn = null, ContainerRegistryPolicyStatus? status = null) + { + return new ContainerRegistryRetentionPolicy(days, lastUpdatedOn, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Key vault uri to access the encryption key. + /// The fully qualified key identifier that includes the version of the key that is actually used for encryption. + /// The client id of the identity which will be used to access key vault. + /// Auto key rotation status for a CMK enabled registry. + /// Timestamp of the last successful key rotation. + /// A new instance for mocking. + public static ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = null, DateTimeOffset? lastKeyRotationTimestamp = null) + { + return new ContainerRegistryKeyVaultProperties( + keyIdentifier, + versionedKeyIdentifier, + identity, + isKeyRotationEnabled, + lastKeyRotationTimestamp, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource of private endpoint. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of private endpoint connection resource. + /// A new instance for mocking. + public static ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, ContainerRegistryProvisioningState? provisioningState = null) + { + return new ContainerRegistryPrivateEndpointConnectionData( + id, + name, + resourceType, + systemData, + privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, + connectionState, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The SKU name of the container registry. Required for registry creation. + /// The SKU tier based on the SKU name. + /// A new instance for mocking. + public static ContainerRegistrySku ContainerRegistrySku(ContainerRegistrySkuName name = default, ContainerRegistrySkuTier? tier = null) + { + return new ContainerRegistrySku(name, tier, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -56,8 +211,8 @@ public static ContainerRegistryCacheRuleData ContainerRegistryCacheRuleData(Reso /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// - /// The properties of the connected registry parent. + /// The activation properties of the connected registry. + /// The parent of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -81,7 +236,7 @@ public static ConnectedRegistryData ConnectedRegistryData(ResourceIdentifier id version, connectionState, lastActivityOn, - activationStatus != null ? new ConnectedRegistryPropertiesActivation(activationStatus, serializedAdditionalRawData: null) : null, + activationStatus != null ? new ConnectedRegistryActivation(activationStatus, serializedAdditionalRawData: null) : null, parent, clientTokenIds?.ToList(), loginServer, @@ -141,7 +296,7 @@ public static ContainerRegistryTlsCertificateProperties ContainerRegistryTlsCert /// Initializes a new instance of . /// The component of the connected registry corresponding to the status. - /// The code of the status. + /// The HTTP status code. /// The description of the status. /// The timestamp of the status. /// The correlation ID of the status. @@ -209,6 +364,28 @@ public static ContainerRegistryCredentialHealth ContainerRegistryCredentialHealt return new ContainerRegistryCredentialHealth(status, errorCode, errorMessage, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The username for a container registry. + /// The list of passwords for a container registry. + /// A new instance for mocking. + public static ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, IEnumerable passwords = null) + { + passwords ??= new List(); + + return new ContainerRegistryGenerateCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The creation datetime of the password. + /// The expiry datetime of the password. + /// The password name "password1" or "password2". + /// The password value. + /// A new instance for mocking. + public static ContainerRegistryTokenPassword ContainerRegistryTokenPassword(DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, ContainerRegistryTokenPasswordName? name = null, string value = null) + { + return new ContainerRegistryTokenPassword(createdOn, expireOn, name, value, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The source of the image. /// List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted). @@ -248,150 +425,24 @@ public static ContainerRegistryImportSourceCredentials ContainerRegistryImportSo return new ContainerRegistryImportSourceCredentials(username, password, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name of the container registry. - /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - /// A new instance for mocking. - public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default) - { - return new ContainerRegistryNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The value that indicates whether the name is available. - /// If any, the reason that the name is not available. - /// If any, the error message that provides more detail for the reason that the name is not available. - /// A new instance for mocking. - public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = null, string reason = null, string message = null) - { - return new ContainerRegistryNameAvailableResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource of private endpoint. - /// A collection of information about the state of the connection between service consumer and provider. - /// The provisioning state of private endpoint connection resource. - /// A new instance for mocking. - public static ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, ContainerRegistryProvisioningState? provisioningState = null) - { - return new ContainerRegistryPrivateEndpointConnectionData( - id, - name, - resourceType, - systemData, - privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, - connectionState, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The SKU of the container registry. - /// The identity of the container registry. - /// The URL that can be used to log into the container registry. - /// The creation date of the container registry in ISO8601 format. - /// The provisioning state of the container registry at the time the operation was called. - /// The status of the container registry at the time the operation was called. - /// The value that indicates whether the admin user is enabled. - /// The network rule set for a container registry. - /// The policies for a container registry. - /// The encryption settings of container registry. - /// Enable a single data endpoint per region for serving data. - /// List of host names that will serve data when dataEndpointEnabled is true. - /// List of private endpoint connections for a container registry. - /// Whether or not public network access is allowed for the container registry. - /// Whether to allow trusted Azure services to access a network restricted registry. - /// Whether or not zone redundancy is enabled for this container registry. - /// Enables registry-wide pull from unauthenticated clients. - /// A new instance for mocking. - public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null) - { - tags ??= new Dictionary(); - dataEndpointHostNames ??= new List(); - privateEndpointConnections ??= new List(); - - return new ContainerRegistryData( - id, - name, - resourceType, - systemData, - tags, - location, - sku, - identity, - loginServer, - createdOn, - provisioningState, - status, - isAdminUserEnabled, - networkRuleSet, - policies, - encryption, - isDataEndpointEnabled, - dataEndpointHostNames?.ToList(), - privateEndpointConnections?.ToList(), - publicNetworkAccess, - networkRuleBypassOptions, - zoneRedundancy, - isAnonymousPullEnabled, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The SKU name of the container registry. Required for registry creation. - /// The SKU tier based on the SKU name. - /// A new instance for mocking. - public static ContainerRegistrySku ContainerRegistrySku(ContainerRegistrySkuName name = default, ContainerRegistrySkuTier? tier = null) - { - return new ContainerRegistrySku(name, tier, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The short label for the status. - /// The detailed message for the status, including alerts and error messages. - /// The timestamp when the status was changed to the current value. - /// A new instance for mocking. - public static ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, DateTimeOffset? timestamp = null) + /// Initializes a new instance of . + /// The username for a container registry. + /// The list of passwords for a container registry. + /// A new instance for mocking. + public static ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, IEnumerable passwords = null) { - return new ContainerRegistryResourceStatus(displayStatus, message, timestamp, serializedAdditionalRawData: null); - } + passwords ??= new List(); - /// Initializes a new instance of . - /// The number of days to retain an untagged manifest after which it gets purged. - /// The timestamp when the policy was last updated. - /// The value that indicates whether the policy is enabled or not. - /// A new instance for mocking. - public static ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = null, DateTimeOffset? lastUpdatedOn = null, ContainerRegistryPolicyStatus? status = null) - { - return new ContainerRegistryRetentionPolicy(days, lastUpdatedOn, status, serializedAdditionalRawData: null); + return new ContainerRegistryListCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Key vault uri to access the encryption key. - /// The fully qualified key identifier that includes the version of the key that is actually used for encryption. - /// The client id of the identity which will be used to access key vault. - /// Auto key rotation status for a CMK enabled registry. - /// Timestamp of the last successful key rotation. - /// A new instance for mocking. - public static ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = null, DateTimeOffset? lastKeyRotationTimestamp = null) + /// Initializes a new instance of . + /// The password name. + /// The password value. + /// A new instance for mocking. + public static ContainerRegistryPassword ContainerRegistryPassword(ContainerRegistryPasswordName? name = null, string value = null) { - return new ContainerRegistryKeyVaultProperties( - keyIdentifier, - versionedKeyIdentifier, - identity, - isKeyRotationEnabled, - lastKeyRotationTimestamp, - serializedAdditionalRawData: null); + return new ContainerRegistryPassword(name, value, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -412,7 +463,7 @@ public static ContainerRegistryUsage ContainerRegistryUsage(string name = null, /// The systemData. /// The private link resource group id. /// The private link resource required member names. - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. /// A new instance for mocking. public static ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) { @@ -430,26 +481,6 @@ public static ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateL serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The username for a container registry. - /// The list of passwords for a container registry. - /// A new instance for mocking. - public static ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, IEnumerable passwords = null) - { - passwords ??= new List(); - - return new ContainerRegistryListCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The password name. - /// The password value. - /// A new instance for mocking. - public static ContainerRegistryPassword ContainerRegistryPassword(ContainerRegistryPasswordName? name = null, string value = null) - { - return new ContainerRegistryPassword(name, value, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -538,28 +569,6 @@ public static ContainerRegistryTokenData ContainerRegistryTokenData(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The creation datetime of the password. - /// The expiry datetime of the password. - /// The password name "password1" or "password2". - /// The password value. - /// A new instance for mocking. - public static ContainerRegistryTokenPassword ContainerRegistryTokenPassword(DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, ContainerRegistryTokenPasswordName? name = null, string value = null) - { - return new ContainerRegistryTokenPassword(createdOn, expireOn, name, value, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The username for a container registry. - /// The list of passwords for a container registry. - /// A new instance for mocking. - public static ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, IEnumerable passwords = null) - { - passwords ??= new List(); - - return new ContainerRegistryGenerateCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -617,12 +626,15 @@ public static ContainerRegistryWebhookCreateOrUpdateContent ContainerRegistryWeb serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The event ID. - /// A new instance for mocking. - public static ContainerRegistryWebhookEventInfo ContainerRegistryWebhookEventInfo(Guid? id = null) + /// Initializes a new instance of . + /// The service URI for the webhook to post notifications. + /// Custom headers that will be added to the webhook notifications. + /// A new instance for mocking. + public static ContainerRegistryWebhookCallbackConfig ContainerRegistryWebhookCallbackConfig(Uri serviceUri = null, IReadOnlyDictionary customHeaders = null) { - return new ContainerRegistryWebhookEventInfo(id, serializedAdditionalRawData: null); + customHeaders ??= new Dictionary(); + + return new ContainerRegistryWebhookCallbackConfig(serviceUri, customHeaders, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -750,15 +762,12 @@ public static ContainerRegistryWebhookEventResponseMessage ContainerRegistryWebh serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The service URI for the webhook to post notifications. - /// Custom headers that will be added to the webhook notifications. - /// A new instance for mocking. - public static ContainerRegistryWebhookCallbackConfig ContainerRegistryWebhookCallbackConfig(Uri serviceUri = null, IReadOnlyDictionary customHeaders = null) + /// Initializes a new instance of . + /// The event ID. + /// A new instance for mocking. + public static ContainerRegistryWebhookEventInfo ContainerRegistryWebhookEventInfo(Guid? id = null) { - customHeaders ??= new Dictionary(); - - return new ContainerRegistryWebhookCallbackConfig(serviceUri, customHeaders, serializedAdditionalRawData: null); + return new ContainerRegistryWebhookEventInfo(id, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -1117,6 +1126,58 @@ public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep( values?.ToList()); } + /// Initializes a new instance of . + /// The name of the container registry. + /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType) + { + return ContainerRegistryNameAvailabilityContent(name: name, resourceType: resourceType, resourceGroupName: default, autoGeneratedDomainNameLabelScope: default); + } + + /// Initializes a new instance of . + /// The value that indicates whether the name is available. + /// If any, the reason that the name is not available. + /// If any, the error message that provides more detail for the reason that the name is not available. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) + { + return ContainerRegistryNameAvailableResult(availableLoginServerName: default, isNameAvailable: isNameAvailable, reason: reason, message: message); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the container registry. + /// The identity of the container registry. + /// The URL that can be used to log into the container registry. + /// The creation date of the container registry in ISO8601 format. + /// The provisioning state of the container registry at the time the operation was called. + /// The status of the container registry at the time the operation was called. + /// The value that indicates whether the admin user is enabled. + /// The network rule set for a container registry. + /// The policies for a container registry. + /// The encryption settings of container registry. + /// Enable a single data endpoint per region for serving data. + /// List of host names that will serve data when dataEndpointEnabled is true. + /// List of private endpoint connections for a container registry. + /// Whether or not public network access is allowed for the container registry. + /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not zone redundancy is enabled for this container registry. + /// Enables registry-wide pull from unauthenticated clients. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IEnumerable dataEndpointHostNames, IEnumerable privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) + { + return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, isNetworkRuleBypassAllowedForTasks: default, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: isAnonymousPullEnabled, autoGeneratedDomainNameLabelScope: default, roleAssignmentMode: default); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1144,7 +1205,7 @@ public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep( [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IEnumerable dataEndpointHostNames, IEnumerable privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy) { - return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default); + return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, isNetworkRuleBypassAllowedForTasks: default, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default, autoGeneratedDomainNameLabelScope: default, roleAssignmentMode: default); } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs index 80c59dc5486f..3a579e582fdf 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectedRegistryN /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string connectedRegistryNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string connectedRegistryName, CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs index 2108020d2e5f..df71c14cff4d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs @@ -158,7 +158,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme string version = default; ConnectedRegistryConnectionState? connectionState = default; DateTimeOffset? lastActivityTime = default; - ConnectedRegistryPropertiesActivation activation = default; + ConnectedRegistryActivation activation = default; ConnectedRegistryParent parent = default; IList clientTokenIds = default; ConnectedRegistryLoginServer loginServer = default; @@ -250,7 +250,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme { continue; } - activation = ConnectedRegistryPropertiesActivation.DeserializeConnectedRegistryPropertiesActivation(property0.Value, options); + activation = ConnectedRegistryActivation.DeserializeConnectedRegistryActivation(property0.Value, options); continue; } if (property0.NameEquals("parent"u8)) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs index 30fc1097128c..d45939008e2b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs @@ -69,8 +69,8 @@ public ConnectedRegistryData() /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// - /// The properties of the connected registry parent. + /// The activation properties of the connected registry. + /// The parent of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -78,7 +78,7 @@ public ConnectedRegistryData() /// The list of notifications subscription information for the connected registry. /// The garbage collection properties of the connected registry. /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryPropertiesActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; Mode = mode; @@ -111,8 +111,8 @@ internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType /// The last activity time of the connected registry. [WirePath("properties.lastActivityTime")] public DateTimeOffset? LastActivityOn { get; } - /// Gets the activation. - internal ConnectedRegistryPropertiesActivation Activation { get; } + /// The activation properties of the connected registry. + internal ConnectedRegistryActivation Activation { get; } /// The activation status of the connected registry. [WirePath("properties.activation.status")] public ConnectedRegistryActivationStatus? ActivationStatus @@ -120,7 +120,7 @@ public ConnectedRegistryActivationStatus? ActivationStatus get => Activation?.Status; } - /// The properties of the connected registry parent. + /// The parent of the connected registry. [WirePath("properties.parent")] public ConnectedRegistryParent Parent { get; set; } /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs index c8be909c06cf..7d9eee6a5427 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task DeactivateAsync(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs index edee44a67e74..66047feccc0f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string cacheRule /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string cacheRuleName, Canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string cacheRuleName, CancellationToken can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs index c678eee7fb9b..aa8854f396d3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs index 61a650d420a9..f1a18ddb6dc4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string registryName, Canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string registryName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string registryName, CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs index 9557fe1e0d76..6a8e47669207 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string crede /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string credentialSetName, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string credentialSetName, CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs index f0cfd4a45b2c..6e801bd20c6c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs index 640a65997157..def8405629b9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs @@ -123,6 +123,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("networkRuleBypassOptions"u8); writer.WriteStringValue(NetworkRuleBypassOptions.Value.ToString()); } + if (Optional.IsDefined(IsNetworkRuleBypassAllowedForTasks)) + { + writer.WritePropertyName("networkRuleBypassAllowedForTasks"u8); + writer.WriteBooleanValue(IsNetworkRuleBypassAllowedForTasks.Value); + } if (Optional.IsDefined(ZoneRedundancy)) { writer.WritePropertyName("zoneRedundancy"u8); @@ -133,6 +138,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); + writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); + } + if (Optional.IsDefined(RoleAssignmentMode)) + { + writer.WritePropertyName("roleAssignmentMode"u8); + writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -177,8 +192,11 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme IReadOnlyList privateEndpointConnections = default; ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default; ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; + bool? networkRuleBypassAllowedForTasks = default; ContainerRegistryZoneRedundancy? zoneRedundancy = default; bool? anonymousPullEnabled = default; + AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; + ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -372,6 +390,15 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme networkRuleBypassOptions = new ContainerRegistryNetworkRuleBypassOption(property0.Value.GetString()); continue; } + if (property0.NameEquals("networkRuleBypassAllowedForTasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRuleBypassAllowedForTasks = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("zoneRedundancy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -390,6 +417,24 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme anonymousPullEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("autoGeneratedDomainNameLabelScope"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("roleAssignmentMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); + continue; + } } continue; } @@ -421,8 +466,11 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme privateEndpointConnections ?? new ChangeTrackingList(), publicNetworkAccess, networkRuleBypassOptions, + networkRuleBypassAllowedForTasks, zoneRedundancy, anonymousPullEnabled, + autoGeneratedDomainNameLabelScope, + roleAssignmentMode, serializedAdditionalRawData); } @@ -806,6 +854,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsNetworkRuleBypassAllowedForTasks), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkRuleBypassAllowedForTasks: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsNetworkRuleBypassAllowedForTasks)) + { + builder.Append(" networkRuleBypassAllowedForTasks: "); + var boolValue = IsNetworkRuleBypassAllowedForTasks.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ZoneRedundancy), out propertyOverride); if (hasPropertyOverride) { @@ -837,6 +901,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AutoGeneratedDomainNameLabelScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" autoGeneratedDomainNameLabelScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + builder.Append(" autoGeneratedDomainNameLabelScope: "); + builder.AppendLine($"'{AutoGeneratedDomainNameLabelScope.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RoleAssignmentMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" roleAssignmentMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RoleAssignmentMode)) + { + builder.Append(" roleAssignmentMode: "); + builder.AppendLine($"'{RoleAssignmentMode.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs index 5a71a85d65f4..b421d2217329 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs @@ -86,10 +86,13 @@ public ContainerRegistryData(AzureLocation location, ContainerRegistrySku sku) : /// List of private endpoint connections for a container registry. /// Whether or not public network access is allowed for the container registry. /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not Tasks allowed to bypass the network rules for this container registry. /// Whether or not zone redundancy is enabled for this container registry. /// Enables registry-wide pull from unauthenticated clients. + /// Determines the domain name label reuse scope. + /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isNetworkRuleBypassAllowedForTasks, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -106,8 +109,11 @@ internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType PrivateEndpointConnections = privateEndpointConnections; PublicNetworkAccess = publicNetworkAccess; NetworkRuleBypassOptions = networkRuleBypassOptions; + IsNetworkRuleBypassAllowedForTasks = isNetworkRuleBypassAllowedForTasks; ZoneRedundancy = zoneRedundancy; IsAnonymousPullEnabled = isAnonymousPullEnabled; + AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; + RoleAssignmentMode = roleAssignmentMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -161,11 +167,20 @@ internal ContainerRegistryData() /// Whether to allow trusted Azure services to access a network restricted registry. [WirePath("properties.networkRuleBypassOptions")] public ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get; set; } + /// Whether or not Tasks allowed to bypass the network rules for this container registry. + [WirePath("properties.networkRuleBypassAllowedForTasks")] + public bool? IsNetworkRuleBypassAllowedForTasks { get; set; } /// Whether or not zone redundancy is enabled for this container registry. [WirePath("properties.zoneRedundancy")] public ContainerRegistryZoneRedundancy? ZoneRedundancy { get; set; } /// Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } + /// Determines the domain name label reuse scope. + [WirePath("properties.autoGeneratedDomainNameLabelScope")] + public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// Determines registry role assignment mode. + [WirePath("properties.roleAssignmentMode")] + public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs index 7f63a61eb6f9..b58faec3986b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs index 75bcbac5f805..ef7f08e50bca 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs index a3f1751b60b2..a8782e57825c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs index 9028c36e88df..e6f83c7ccf79 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -109,7 +109,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsy /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -154,7 +154,7 @@ public virtual Response Get(string groupNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -345,7 +345,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs index 4b6ed2e4fea6..ade1cb620adf 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs @@ -40,12 +40,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(GroupId)) + if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); writer.WriteStringValue(GroupId); } - if (Optional.IsCollectionDefined(RequiredMembers)) + if (options.Format != "W" && Optional.IsCollectionDefined(RequiredMembers)) { writer.WritePropertyName("requiredMembers"u8); writer.WriteStartArray(); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs index 6121f4c5d7cb..04ba602e290e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ContainerRegistry { /// /// A class representing the ContainerRegistryPrivateLinkResource data model. - /// A resource that supports private link capabilities. + /// A private link resource. /// public partial class ContainerRegistryPrivateLinkResourceData : ResourceData { @@ -64,7 +64,7 @@ internal ContainerRegistryPrivateLinkResourceData() /// The systemData. /// The private link resource group id. /// The private link resource required member names. - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. /// Keeps track of any properties unknown to the library. internal ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IReadOnlyList requiredZoneNames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -80,7 +80,7 @@ internal ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id, string /// The private link resource required member names. [WirePath("properties.requiredMembers")] public IReadOnlyList RequiredMembers { get; } - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. [WirePath("properties.requiredZoneNames")] public IReadOnlyList RequiredZoneNames { get; } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs index 09d6834f91ae..887154bfbb8e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string replica /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string replicationName, Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string replicationName, CancellationToken c /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs index 73a0703a0904..63d8af3aa6fd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs index a6cfcf1c5130..9ee38f40e354 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs @@ -99,6 +99,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of ContainerRegistryPrivateLinkResources in the ContainerRegistry. + /// An object representing collection of ContainerRegistryPrivateLinkResources and their operations over a ContainerRegistryPrivateLinkResource. + public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegistryPrivateLinkResources() + { + return GetCachedClient(client => new ContainerRegistryPrivateLinkResourceCollection(client, Id)); + } + + /// + /// Gets a private link resource by a specified group name for a container registry. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// Registries_GetPrivateLinkResource + /// + /// + /// Default Api Version + /// 2025-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link associated with the Azure resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetContainerRegistryPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) + { + return await GetContainerRegistryPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a private link resource by a specified group name for a container registry. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// Registries_GetPrivateLinkResource + /// + /// + /// Default Api Version + /// 2025-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link associated with the Azure resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetContainerRegistryPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) + { + return GetContainerRegistryPrivateLinkResources().Get(groupName, cancellationToken); + } + /// Gets a collection of ContainerRegistryCacheRuleResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryCacheRuleResources and their operations over a ContainerRegistryCacheRuleResource. public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRules() @@ -119,7 +188,7 @@ public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRul /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -150,7 +219,7 @@ public virtual async Task> GetConta /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -188,7 +257,7 @@ public virtual ConnectedRegistryCollection GetConnectedRegistries() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -219,7 +288,7 @@ public virtual async Task> GetConnectedRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -257,7 +326,7 @@ public virtual ContainerRegistryCredentialSetCollection GetContainerRegistryCred /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -288,7 +357,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -306,75 +375,6 @@ public virtual Response GetContainerRegi return GetContainerRegistryCredentialSets().Get(credentialSetName, cancellationToken); } - /// Gets a collection of ContainerRegistryPrivateLinkResources in the ContainerRegistry. - /// An object representing collection of ContainerRegistryPrivateLinkResources and their operations over a ContainerRegistryPrivateLinkResource. - public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegistryPrivateLinkResources() - { - return GetCachedClient(client => new ContainerRegistryPrivateLinkResourceCollection(client, Id)); - } - - /// - /// Gets a private link resource by a specified group name for a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// Registries_GetPrivateLinkResource - /// - /// - /// Default Api Version - /// 2025-04-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a private link resource by a specified group name for a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// Registries_GetPrivateLinkResource - /// - /// - /// Default Api Version - /// 2025-04-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryPrivateLinkResources().Get(groupName, cancellationToken); - } - /// Gets a collection of ContainerRegistryPrivateEndpointConnectionResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryPrivateEndpointConnectionResources and their operations over a ContainerRegistryPrivateEndpointConnectionResource. public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainerRegistryPrivateEndpointConnections() @@ -395,7 +395,7 @@ public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainer /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -464,7 +464,7 @@ public virtual ContainerRegistryReplicationCollection GetContainerRegistryReplic /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual async Task> GetCon /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual ScopeMapCollection GetScopeMaps() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetScopeMapAsync(string sc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -602,7 +602,7 @@ public virtual ContainerRegistryTokenCollection GetContainerRegistryTokens() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -633,7 +633,7 @@ public virtual async Task> GetContainer /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -671,7 +671,7 @@ public virtual ContainerRegistryWebhookCollection GetContainerRegistryWebhooks() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -702,7 +702,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1009,7 +1009,7 @@ public virtual Response GetContainerRegistryTask( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1049,7 +1049,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1089,7 +1089,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1131,7 +1131,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1253,19 +1253,19 @@ public virtual ArmOperation Update(WaitUntil waitUnti } /// - /// Copies an image to this container registry from the specified container registry. + /// Generate keys for a token of a specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials /// /// /// Operation Id - /// Registries_ImportImage + /// Registries_GenerateCredentials /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1274,21 +1274,21 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters specifying the image to copy and the source container registry. + /// The parameters for generating credentials. /// The cancellation token to use. /// is null. - public virtual async Task ImportImageAsync(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) + public virtual async Task> GenerateCredentialsAsync(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); scope.Start(); try { - var response = await _containerRegistryRegistriesRestClient.ImportImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _containerRegistryRegistriesRestClient.GenerateCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1299,19 +1299,19 @@ public virtual async Task ImportImageAsync(WaitUntil waitUntil, Co } /// - /// Copies an image to this container registry from the specified container registry. + /// Generate keys for a token of a specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials /// /// /// Operation Id - /// Registries_ImportImage + /// Registries_GenerateCredentials /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1320,21 +1320,21 @@ public virtual async Task ImportImageAsync(WaitUntil waitUntil, Co /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters specifying the image to copy and the source container registry. + /// The parameters for generating credentials. /// The cancellation token to use. /// is null. - public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation GenerateCredentials(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); scope.Start(); try { - var response = _containerRegistryRegistriesRestClient.ImportImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _containerRegistryRegistriesRestClient.GenerateCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -1345,19 +1345,19 @@ public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryIm } /// - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage /// /// /// Operation Id - /// Registries_ListUsages + /// Registries_ImportImage /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1365,28 +1365,45 @@ public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryIm /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetUsagesAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ImportImageAsync(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + scope.Start(); + try + { + var response = await _containerRegistryRegistriesRestClient.ImportImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage /// /// /// Operation Id - /// Registries_ListUsages + /// Registries_ImportImage /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1394,12 +1411,29 @@ public virtual AsyncPageable GetUsagesAsync(Cancellation /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetUsages(CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + scope.Start(); + try + { + var response = _containerRegistryRegistriesRestClient.ImportImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -1415,7 +1449,7 @@ public virtual Pageable GetUsages(CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1453,7 +1487,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1479,19 +1513,19 @@ public virtual Response GetCredentials(C } /// - /// Regenerates one of the login credentials for the specified container registry. + /// Gets the quota usages for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages /// /// /// Operation Id - /// Registries_RegenerateCredential + /// Registries_ListUsages /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1499,41 +1533,28 @@ public virtual Response GetCredentials(C /// /// /// - /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. - /// is null. - public virtual async Task> RegenerateCredentialAsync(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetUsagesAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); - scope.Start(); - try - { - var response = await _containerRegistryRegistriesRestClient.RegenerateCredentialAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); } /// - /// Regenerates one of the login credentials for the specified container registry. + /// Gets the quota usages for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages /// /// /// Operation Id - /// Registries_RegenerateCredential + /// Registries_ListUsages /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1541,41 +1562,28 @@ public virtual async Task> Rege /// /// /// - /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. - /// is null. - public virtual Response RegenerateCredential(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetUsages(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); - scope.Start(); - try - { - var response = _containerRegistryRegistriesRestClient.RegenerateCredential(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); } /// - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential /// /// /// Operation Id - /// Registries_GenerateCredentials + /// Registries_RegenerateCredential /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1583,23 +1591,19 @@ public virtual Response RegenerateCreden /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// is null. - public virtual async Task> GenerateCredentialsAsync(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RegenerateCredentialAsync(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); scope.Start(); try { - var response = await _containerRegistryRegistriesRestClient.GenerateCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _containerRegistryRegistriesRestClient.RegenerateCredentialAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1609,19 +1613,19 @@ public virtual async Task - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential /// /// /// Operation Id - /// Registries_GenerateCredentials + /// Registries_RegenerateCredential /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1629,23 +1633,19 @@ public virtual async Task /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// is null. - public virtual ArmOperation GenerateCredentials(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public virtual Response RegenerateCredential(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); scope.Start(); try { - var response = _containerRegistryRegistriesRestClient.GenerateCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _containerRegistryRegistriesRestClient.RegenerateCredential(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; } catch (Exception e) { @@ -1819,7 +1819,7 @@ public virtual Response GetBuildSourceUploadUrl(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1881,7 +1881,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1943,7 +1943,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2000,7 +2000,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2057,7 +2057,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2117,7 +2117,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs index 1d4488d63c10..922f6c707ca7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tokenName, Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string tokenName, Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string tokenName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs index b74b1f10b7b1..5b79e26fefd8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs index 3e3d00a77815..98639ebb7600 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string webhookName /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string webhookName, Cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string webhookName, CancellationToken cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs index 65063da4a9e8..692121b6f860 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -348,19 +348,19 @@ public virtual ArmOperation Update(WaitUntil w } /// - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig /// /// /// Operation Id - /// Webhooks_Ping + /// Webhooks_GetCallbackConfig /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -369,13 +369,13 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// The cancellation token to use. - public virtual async Task> PingAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetCallbackConfigAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); scope.Start(); try { - var response = await _containerRegistryWebhookWebhooksRestClient.PingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerRegistryWebhookWebhooksRestClient.GetCallbackConfigAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -386,19 +386,19 @@ public virtual async Task> PingAsync } /// - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig /// /// /// Operation Id - /// Webhooks_Ping + /// Webhooks_GetCallbackConfig /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -407,13 +407,13 @@ public virtual async Task> PingAsync /// /// /// The cancellation token to use. - public virtual Response Ping(CancellationToken cancellationToken = default) + public virtual Response GetCallbackConfig(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); scope.Start(); try { - var response = _containerRegistryWebhookWebhooksRestClient.Ping(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerRegistryWebhookWebhooksRestClient.GetCallbackConfig(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -436,7 +436,7 @@ public virtual Response Ping(CancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual AsyncPageable GetEventsAsync(Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -484,19 +484,19 @@ public virtual Pageable GetEvents(CancellationTok } /// - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping /// /// /// Operation Id - /// Webhooks_GetCallbackConfig + /// Webhooks_Ping /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -505,13 +505,13 @@ public virtual Pageable GetEvents(CancellationTok /// /// /// The cancellation token to use. - public virtual async Task> GetCallbackConfigAsync(CancellationToken cancellationToken = default) + public virtual async Task> PingAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); scope.Start(); try { - var response = await _containerRegistryWebhookWebhooksRestClient.GetCallbackConfigAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerRegistryWebhookWebhooksRestClient.PingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -522,19 +522,19 @@ public virtual async Task> GetC } /// - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping /// /// /// Operation Id - /// Webhooks_GetCallbackConfig + /// Webhooks_Ping /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -543,13 +543,13 @@ public virtual async Task> GetC /// /// /// The cancellation token to use. - public virtual Response GetCallbackConfig(CancellationToken cancellationToken = default) + public virtual Response Ping(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); scope.Start(); try { - var response = _containerRegistryWebhookWebhooksRestClient.GetCallbackConfig(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerRegistryWebhookWebhooksRestClient.Ping(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -572,7 +572,7 @@ public virtual Response GetCallbackConfi /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -696,7 +696,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -753,7 +753,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -870,7 +870,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs index 719ccf0d88b1..a206cbd6d47b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs @@ -34,98 +34,98 @@ private static MockableContainerRegistrySubscriptionResource GetMockableContaine } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryResource GetContainerRegistryResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCacheRuleResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ConnectedRegistryResource GetConnectedRegistryResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetConnectedRegistryResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPrivateLinkResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCredentialSetResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCacheRuleResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryResource GetContainerRegistryResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ConnectedRegistryResource GetConnectedRegistryResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryResource(id); + return GetMockableContainerRegistryArmClient(client).GetConnectedRegistryResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPrivateLinkResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCredentialSetResource(id); } /// @@ -329,7 +329,7 @@ public static ContainerRegistryCollection GetContainerRegistries(this ResourceGr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -367,7 +367,7 @@ public static async Task> GetContainerRegist /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -405,7 +405,7 @@ public static Response GetContainerRegistry(this Reso /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -418,7 +418,7 @@ public static Response GetContainerRegistry(this Reso /// /// /// The instance the method will execute against. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. public static async Task> CheckContainerRegistryNameAvailabilityAsync(this SubscriptionResource subscriptionResource, ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -441,7 +441,7 @@ public static async Task> CheckCo /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -454,7 +454,7 @@ public static async Task> CheckCo /// /// /// The instance the method will execute against. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. public static Response CheckContainerRegistryNameAvailability(this SubscriptionResource subscriptionResource, ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -477,7 +477,7 @@ public static Response CheckContainerRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -513,7 +513,7 @@ public static AsyncPageable GetContainerRegistriesAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs index 37abbc0770c9..1466e65fe2d5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs @@ -34,6 +34,30 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerRegistryResource GetContainerRegistryResource(ResourceIdentifier id) + { + ContainerRegistryResource.ValidateResourceId(id); + return new ContainerRegistryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(ResourceIdentifier id) + { + ContainerRegistryPrivateLinkResource.ValidateResourceId(id); + return new ContainerRegistryPrivateLinkResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -70,30 +94,6 @@ public virtual ContainerRegistryCredentialSetResource GetContainerRegistryCreden return new ContainerRegistryCredentialSetResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ContainerRegistryResource GetContainerRegistryResource(ResourceIdentifier id) - { - ContainerRegistryResource.ValidateResourceId(id); - return new ContainerRegistryResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(ResourceIdentifier id) - { - ContainerRegistryPrivateLinkResource.ValidateResourceId(id); - return new ContainerRegistryPrivateLinkResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs index a14a12a821af..a3b8a6b69d66 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ContainerRegistryCollection GetContainerRegistries() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetContainerRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs index 6e23a83e85a0..e69b3acdb0c3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -63,7 +63,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// is null. public virtual async Task> CheckContainerRegistryNameAvailabilityAsync(ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -97,7 +97,7 @@ public virtual async Task> CheckC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> CheckC /// /// /// - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// is null. public virtual Response CheckContainerRegistryNameAvailability(ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -139,7 +139,7 @@ public virtual Response CheckContainerRegi /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual AsyncPageable GetContainerRegistriesAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs new file mode 100644 index 000000000000..4f6f0c364d12 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoGeneratedDomainNameLabelScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnsecureValue = "Unsecure"; + private const string TenantReuseValue = "TenantReuse"; + private const string SubscriptionReuseValue = "SubscriptionReuse"; + private const string ResourceGroupReuseValue = "ResourceGroupReuse"; + private const string NoReuseValue = "NoReuse"; + + /// Unsecure. + public static AutoGeneratedDomainNameLabelScope Unsecure { get; } = new AutoGeneratedDomainNameLabelScope(UnsecureValue); + /// TenantReuse. + public static AutoGeneratedDomainNameLabelScope TenantReuse { get; } = new AutoGeneratedDomainNameLabelScope(TenantReuseValue); + /// SubscriptionReuse. + public static AutoGeneratedDomainNameLabelScope SubscriptionReuse { get; } = new AutoGeneratedDomainNameLabelScope(SubscriptionReuseValue); + /// ResourceGroupReuse. + public static AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get; } = new AutoGeneratedDomainNameLabelScope(ResourceGroupReuseValue); + /// NoReuse. + public static AutoGeneratedDomainNameLabelScope NoReuse { get; } = new AutoGeneratedDomainNameLabelScope(NoReuseValue); + /// Determines if two values are the same. + public static bool operator ==(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoGeneratedDomainNameLabelScope(string value) => new AutoGeneratedDomainNameLabelScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoGeneratedDomainNameLabelScope other && Equals(other); + /// + public bool Equals(AutoGeneratedDomainNameLabelScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs index 98a1ff236195..3e905847e51a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. internal partial class AzureADAuthenticationAsArmPolicy { /// diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs index 5cd1be10e66a..93ee2809a3a0 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs @@ -25,7 +25,6 @@ namespace Azure.ResourceManager.ContainerRegistry [ModelReaderWriterBuildable(typeof(ConnectedRegistryLoginServer))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryParent))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryPatch))] - [ModelReaderWriterBuildable(typeof(ConnectedRegistryPropertiesActivation))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryResource))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryStatusDetail))] [ModelReaderWriterBuildable(typeof(ConnectedRegistrySyncProperties))] diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs index 36db9684ddda..aab551f5c0d2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs @@ -52,8 +52,8 @@ internal CacheRulesListResult() } /// Initializes a new instance of . - /// The list of cache rules. - /// If provided, client must use NextLink URI to request next list of cache rules. + /// The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules. + /// The URI that can be used to request the next list of cache rules. /// Keeps track of any properties unknown to the library. internal CacheRulesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal CacheRulesListResult(IReadOnlyList valu _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of cache rules. + /// The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules. public IReadOnlyList Value { get; } - /// If provided, client must use NextLink URI to request next list of cache rules. + /// The URI that can be used to request the next list of cache rules. public string NextLink { get; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs index b4146f220dcb..10a0dcc15443 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs @@ -43,7 +43,7 @@ internal partial class ConnectedRegistryActivation /// /// /// - private protected IDictionary _serializedAdditionalRawData; + private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . internal ConnectedRegistryActivation() diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs index 30d117394bc5..d243f0fe0f42 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs @@ -54,7 +54,7 @@ public ConnectedRegistryPatch() } /// Initializes a new instance of . - /// The parameters for updating the sync properties of the connected registry with its parent. + /// The sync properties of the connected registry with its parent. /// The logging properties of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The list of notifications subscription information for the connected registry. @@ -70,7 +70,7 @@ internal ConnectedRegistryPatch(ConnectedRegistrySyncUpdateProperties syncProper _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The parameters for updating the sync properties of the connected registry with its parent. + /// The sync properties of the connected registry with its parent. [WirePath("properties.syncProperties")] public ConnectedRegistrySyncUpdateProperties SyncProperties { get; set; } /// The logging properties of the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs deleted file mode 100644 index 1d71de6a5be5..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ConnectedRegistryPropertiesActivation : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - ConnectedRegistryPropertiesActivation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); - } - - internal static ConnectedRegistryPropertiesActivation DeserializeConnectedRegistryPropertiesActivation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConnectedRegistryActivationStatus? status = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConnectedRegistryActivationStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConnectedRegistryPropertiesActivation(status, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Status)) - { - builder.Append(" status: "); - builder.AppendLine($"'{Status.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerContainerRegistryContext.Default); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{options.Format}' format."); - } - } - - ConnectedRegistryPropertiesActivation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs deleted file mode 100644 index 124a7f7eba9c..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The ConnectedRegistryPropertiesActivation. - internal partial class ConnectedRegistryPropertiesActivation : ConnectedRegistryActivation - { - /// Initializes a new instance of . - internal ConnectedRegistryPropertiesActivation() - { - } - - /// Initializes a new instance of . - /// The activation status of the connected registry. - /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryPropertiesActivation(ConnectedRegistryActivationStatus? status, IDictionary serializedAdditionalRawData) : base(status, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs index c067829c4355..4ada263eda53 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs @@ -52,7 +52,7 @@ internal ConnectedRegistryStatusDetail() /// Initializes a new instance of . /// The component of the connected registry corresponding to the status. - /// The code of the status. + /// The HTTP status code. /// The description of the status. /// The timestamp of the status. /// The correlation ID of the status. @@ -70,7 +70,7 @@ internal ConnectedRegistryStatusDetail(string statusDetailType, string code, str /// The component of the connected registry corresponding to the status. [WirePath("type")] public string StatusDetailType { get; } - /// The code of the status. + /// The HTTP status code. [WirePath("code")] public string Code { get; } /// The description of the status. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs index ff0d2219c4e1..907dc457b4ce 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs @@ -38,6 +38,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceType.ToString()); + if (Optional.IsDefined(ResourceGroupName)) + { + writer.WritePropertyName("resourceGroupName"u8); + writer.WriteStringValue(ResourceGroupName); + } + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); + writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +87,8 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg } string name = default; ContainerRegistryResourceType type = default; + string resourceGroupName = default; + AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +103,27 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg type = new ContainerRegistryResourceType(property.Value.GetString()); continue; } + if (property.NameEquals("resourceGroupName"u8)) + { + resourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoGeneratedDomainNameLabelScope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailabilityContent(name, type, serializedAdditionalRawData); + return new ContainerRegistryNameAvailabilityContent(name, type, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs index 467ee56cc19c..bde516a1947a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs @@ -59,11 +59,15 @@ public ContainerRegistryNameAvailabilityContent(string name) /// Initializes a new instance of . /// The name of the container registry. /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource group name of the container registry. + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, string resourceGroupName, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) { Name = name; ResourceType = resourceType; + ResourceGroupName = resourceGroupName; + AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,5 +82,11 @@ internal ContainerRegistryNameAvailabilityContent() /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. [WirePath("type")] public ContainerRegistryResourceType ResourceType { get; } + /// The resource group name of the container registry. + [WirePath("resourceGroupName")] + public string ResourceGroupName { get; set; } + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + [WirePath("autoGeneratedDomainNameLabelScope")] + public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs index 2dfe064295cd..2068638d7060 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs @@ -35,6 +35,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryNameAvailableResult)} does not support writing '{format}' format."); } + if (Optional.IsDefined(AvailableLoginServerName)) + { + writer.WritePropertyName("availableLoginServerName"u8); + writer.WriteStringValue(AvailableLoginServerName); + } if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -87,6 +92,7 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr { return null; } + string availableLoginServerName = default; bool? nameAvailable = default; string reason = default; string message = default; @@ -94,6 +100,11 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("availableLoginServerName"u8)) + { + availableLoginServerName = property.Value.GetString(); + continue; + } if (property.NameEquals("nameAvailable"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -119,7 +130,7 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailableResult(nameAvailable, reason, message, serializedAdditionalRawData); + return new ContainerRegistryNameAvailableResult(availableLoginServerName, nameAvailable, reason, message, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -133,6 +144,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableLoginServerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableLoginServerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AvailableLoginServerName)) + { + builder.Append(" availableLoginServerName: "); + if (AvailableLoginServerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AvailableLoginServerName}'''"); + } + else + { + builder.AppendLine($"'{AvailableLoginServerName}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsNameAvailable), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs index f283691e35d6..58cc7b79002e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs @@ -51,18 +51,23 @@ internal ContainerRegistryNameAvailableResult() } /// Initializes a new instance of . + /// The complete login server name with domain name label (DNL) hash, if available. /// The value that indicates whether the name is available. /// If any, the reason that the name is not available. /// If any, the error message that provides more detail for the reason that the name is not available. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailableResult(string availableLoginServerName, bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) { + AvailableLoginServerName = availableLoginServerName; IsNameAvailable = isNameAvailable; Reason = reason; Message = message; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The complete login server name with domain name label (DNL) hash, if available. + [WirePath("availableLoginServerName")] + public string AvailableLoginServerName { get; } /// The value that indicates whether the name is available. [WirePath("nameAvailable")] public bool? IsNameAvailable { get; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs index 64c4c5ddcaa1..2a6afc11d2de 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs @@ -94,11 +94,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("networkRuleBypassOptions"u8); writer.WriteStringValue(NetworkRuleBypassOptions.Value.ToString()); } + if (Optional.IsDefined(IsNetworkRuleBypassAllowedForTasks)) + { + writer.WritePropertyName("networkRuleBypassAllowedForTasks"u8); + writer.WriteBooleanValue(IsNetworkRuleBypassAllowedForTasks.Value); + } if (Optional.IsDefined(IsAnonymousPullEnabled)) { writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } + if (Optional.IsDefined(RoleAssignmentMode)) + { + writer.WritePropertyName("roleAssignmentMode"u8); + writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -147,7 +157,9 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle bool? dataEndpointEnabled = default; ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default; ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; + bool? networkRuleBypassAllowedForTasks = default; bool? anonymousPullEnabled = default; + ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -256,6 +268,15 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle networkRuleBypassOptions = new ContainerRegistryNetworkRuleBypassOption(property0.Value.GetString()); continue; } + if (property0.NameEquals("networkRuleBypassAllowedForTasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRuleBypassAllowedForTasks = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("anonymousPullEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -265,6 +286,15 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle anonymousPullEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("roleAssignmentMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); + continue; + } } continue; } @@ -285,7 +315,9 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle dataEndpointEnabled, publicNetworkAccess, networkRuleBypassOptions, + networkRuleBypassAllowedForTasks, anonymousPullEnabled, + roleAssignmentMode, serializedAdditionalRawData); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs index fbef70e6a45a..2b9cc15afab6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs @@ -63,9 +63,11 @@ public ContainerRegistryPatch() /// Enable a single data endpoint per region for serving data. /// Whether or not public network access is allowed for the container registry. /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether to allow ACR Tasks service to access a network restricted registry. /// Enables registry-wide pull from unauthenticated clients. + /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) + internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isNetworkRuleBypassAllowedForTasks, bool? isAnonymousPullEnabled, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) { Identity = identity; Tags = tags; @@ -77,7 +79,9 @@ internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary Whether to allow trusted Azure services to access a network restricted registry. [WirePath("properties.networkRuleBypassOptions")] public ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get; set; } + /// Whether to allow ACR Tasks service to access a network restricted registry. + [WirePath("properties.networkRuleBypassAllowedForTasks")] + public bool? IsNetworkRuleBypassAllowedForTasks { get; set; } /// Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } + /// Determines registry role assignment mode. + [WirePath("properties.roleAssignmentMode")] + public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs index 206355707397..244767c07685 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs @@ -55,7 +55,7 @@ public ContainerRegistryPolicies() /// The content trust policy for a container registry. /// The retention policy for a container registry. /// The export policy for a container registry. - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. /// Keeps track of any properties unknown to the library. internal ContainerRegistryPolicies(ContainerRegistryQuarantinePolicy quarantinePolicy, ContainerRegistryTrustPolicy trustPolicy, ContainerRegistryRetentionPolicy retentionPolicy, ContainerRegistryExportPolicy exportPolicy, AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy, IDictionary serializedAdditionalRawData) { @@ -103,7 +103,7 @@ public ContainerRegistryExportPolicyStatus? ExportStatus } } - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. internal AzureADAuthenticationAsArmPolicy AzureADAuthenticationAsArmPolicy { get; set; } /// The value that indicates whether the policy is enabled or not. [WirePath("azureADAuthenticationAsArmPolicy.status")] diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs index fd0c8fecc008..9616b4b7a4d3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource type for Container Registry. public readonly partial struct ContainerRegistryResourceType : IEquatable { private readonly string _value; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs new file mode 100644 index 000000000000..d827654379a1 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + /// Determines registry role assignment mode. + public readonly partial struct ContainerRegistryRoleAssignmentMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerRegistryRoleAssignmentMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AbacRepositoryPermissionsValue = "AbacRepositoryPermissions"; + private const string LegacyRegistryPermissionsValue = "LegacyRegistryPermissions"; + + /// AbacRepositoryPermissions. + public static ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(AbacRepositoryPermissionsValue); + /// LegacyRegistryPermissions. + public static ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(LegacyRegistryPermissionsValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerRegistryRoleAssignmentMode(string value) => new ContainerRegistryRoleAssignmentMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerRegistryRoleAssignmentMode other && Equals(other); + /// + public bool Equals(ContainerRegistryRoleAssignmentMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs index 47da4d93b01b..28ddbcb041e8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs @@ -32,7 +32,7 @@ public CacheRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,65 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a cache rule resource from a container registry. + /// Updates a cache rule for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. + /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a cache rule resource from a container registry. + /// Updates a cache rule for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. + /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -442,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -460,66 +468,58 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a cache rule for a container registry with the specified parameters. + /// Deletes a cache rule resource from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. - /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a cache rule for a container registry with the specified parameters. + /// Deletes a cache rule resource from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. - /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs index 4a21a3113b4f..d785853ce16f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs @@ -32,10 +32,114 @@ public ConnectedRegistriesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/connectedRegistries", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/connectedRegistries", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all connected registries for the specified container registry. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedRegistryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all connected registries for the specified container registry. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedRegistryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var uri = new RawRequestUriBuilder(); @@ -434,110 +538,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all connected registries for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ConnectedRegistryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all connected registries for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ConnectedRegistryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateDeactivateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs index 626f987933ac..f9791ce078f2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs @@ -32,7 +32,7 @@ public CredentialSetsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,65 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a credential set from a container registry. + /// Updates a credential set for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. + /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a credential set from a container registry. + /// Updates a credential set for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. + /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -442,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -460,66 +468,58 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a credential set for a container registry with the specified parameters. + /// Deletes a credential set from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. - /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a credential set for a container registry with the specified parameters. + /// Deletes a credential set from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. - /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index a85b56949851..95ea285b737a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -367,6 +367,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(privateEndpointConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs index 85e10b61ac4e..4392d98de813 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs @@ -32,103 +32,10 @@ public RegistriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateImportImageRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importImage", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateImportImageRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importImage", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Copies an image to this container registry from the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The parameters specifying the image to copy and the source container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ImportImageAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Copies an image to this container registry from the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The parameters specifying the image to copy and the source container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ImportImage(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, ContainerRegistryNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); @@ -163,7 +70,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, C /// Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length. /// The ID of the target subscription. The value must be an UUID. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -190,7 +97,7 @@ public async Task> CheckNameAvail /// Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length. /// The ID of the target subscription. The value must be an UUID. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -567,6 +474,98 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a container registry with the specified parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// The parameters for updating a container registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a container registry with the specified parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// The parameters for updating a container registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); @@ -596,6 +595,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(registryName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -652,7 +652,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -662,15 +662,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); + uri.AppendPath("/generateCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -679,72 +680,73 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); + uri.AppendPath("/generateCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Updates a container registry with the specified parameters. + /// Generate keys for a token of a specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for updating a container registry. + /// The parameters for generating credentials. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + public async Task GenerateCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a container registry with the specified parameters. + /// Generate keys for a token of a specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for updating a container registry. + /// The parameters for generating credentials. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + public Response GenerateCredentials(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateImportImageRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -754,16 +756,16 @@ internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listUsages", false); + uri.AppendPath("/importImage", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateImportImageRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -772,73 +774,73 @@ internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listUsages", false); + uri.AppendPath("/importImage", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListUsagesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task ImportImageAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ContainerRegistryUsageListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListUsages(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ImportImage(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ContainerRegistryUsageListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -848,16 +850,16 @@ internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subsc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/listCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -866,7 +868,7 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/listCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -874,28 +876,28 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId return message; } - /// Lists the private link resources for a container registry. + /// Lists the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task> ListCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceListResult value = default; + ContainerRegistryListCredentialsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -903,28 +905,28 @@ public async Task> List } } - /// Lists the private link resources for a container registry. + /// Lists the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListPrivateLinkResources(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ListCredentials(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceListResult value = default; + ContainerRegistryListCredentialsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -932,7 +934,7 @@ public Response ListPrivateLinkR } } - internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscriptionId, string resourceGroupName, string registryName, string groupName) + internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -942,13 +944,12 @@ internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); + uri.AppendPath("/listUsages", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, string resourceGroupName, string registryName, string groupName) + internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -961,8 +962,7 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); + uri.AppendPath("/listUsages", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -970,73 +970,65 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, return message; } - /// Gets a private link resource by a specified group name for a container registry. + /// Gets the quota usages for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the private link resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateLinkResourceAsync(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); + using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceData value = default; + ContainerRegistryUsageListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); + value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets a private link resource by a specified group name for a container registry. + /// Gets the quota usages for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the private link resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPrivateLinkResource(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListUsages(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); + using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceData value = default; + ContainerRegistryUsageListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); + value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1046,16 +1038,16 @@ internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listCredentials", false); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1064,7 +1056,7 @@ internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listCredentials", false); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1072,28 +1064,28 @@ internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string return message; } - /// Lists the login credentials for the specified container registry. + /// Lists the private link resources for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task> ListPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1101,28 +1093,28 @@ public async Task> ListCredenti } } - /// Lists the login credentials for the specified container registry. + /// Lists the private link resources for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListCredentials(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ListPrivateLinkResources(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1130,7 +1122,7 @@ public Response ListCredentials(string s } } - internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) + internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscriptionId, string resourceGroupName, string registryName, string groupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1140,16 +1132,17 @@ internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/regenerateCredential", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) + internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, string resourceGroupName, string registryName, string groupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1158,81 +1151,82 @@ internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/regenerateCredential", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Regenerates one of the login credentials for the specified container registry. + /// Gets a private link resource by a specified group name for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// Specifies name of the password which should be regenerated -- password or password2. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> RegenerateCredentialAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateLinkResourceAsync(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Regenerates one of the login credentials for the specified container registry. + /// Gets a private link resource by a specified group name for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// Specifies name of the password which should be regenerated -- password or password2. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response RegenerateCredential(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPrivateLinkResource(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) + internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1242,12 +1236,12 @@ internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/generateCredentials", false); + uri.AppendPath("/regenerateCredential", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) + internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1260,7 +1254,7 @@ internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/generateCredentials", false); + uri.AppendPath("/regenerateCredential", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1272,55 +1266,63 @@ internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, str return message; } - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task GenerateCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public async Task> RegenerateCredentialAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryListCredentialsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GenerateCredentials(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public Response RegenerateCredential(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryListCredentialsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs index 1acc4a7e9e26..ad6bfd710133 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs @@ -32,7 +32,7 @@ public ReplicationsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -367,67 +367,74 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(replicationName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a replication from a container registry. + /// Updates a replication for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. + /// The parameters for updating a replication. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a replication from a container registry. + /// Updates a replication for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. + /// The parameters for updating a replication. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -443,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -461,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a replication for a container registry with the specified parameters. + /// Deletes a replication from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. - /// The parameters for updating a replication. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a replication for a container registry with the specified parameters. + /// Deletes a replication from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. - /// The parameters for updating a replication. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs index b69836ba9bfb..6d3821523553 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs @@ -32,7 +32,7 @@ public ScopeMapsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a scope map from a container registry. + /// Updates a scope map with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. + /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a scope map from a container registry. + /// Updates a scope map with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. + /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a scope map with the specified parameters. + /// Deletes a scope map from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. - /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a scope map with the specified parameters. + /// Deletes a scope map from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. - /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs index 10ba1af82be2..df7028bcbef6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs @@ -32,7 +32,7 @@ public TokensRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a token from a container registry. + /// Updates a token with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. + /// The parameters for updating a token. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a token from a container registry. + /// Updates a token with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. + /// The parameters for updating a token. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a token with the specified parameters. + /// Deletes a token from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. - /// The parameters for updating a token. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a token with the specified parameters. + /// Deletes a token from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. - /// The parameters for updating a token. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs index 0b36a06d516f..9cb49f39be72 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs @@ -32,7 +32,7 @@ public WebhooksRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -367,67 +367,74 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(webhookName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a webhook from a container registry. + /// Updates a webhook with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. + /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a webhook from a container registry. + /// Updates a webhook with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. + /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -443,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -461,73 +468,67 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a webhook with the specified parameters. + /// Deletes a webhook from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. - /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a webhook with the specified parameters. + /// Deletes a webhook from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. - /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -539,12 +540,12 @@ internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string re uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/ping", false); + uri.AppendPath("/getCallbackConfig", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -559,7 +560,7 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/ping", false); + uri.AppendPath("/getCallbackConfig", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -567,7 +568,7 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro return message; } - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -575,22 +576,22 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> PingAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task> GetCallbackConfigAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookEventInfo value = default; + ContainerRegistryWebhookCallbackConfig value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); + value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -598,7 +599,7 @@ public async Task> PingAsync(string } } - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -606,22 +607,22 @@ public async Task> PingAsync(string /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Ping(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response GetCallbackConfig(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookEventInfo value = default; + ContainerRegistryWebhookCallbackConfig value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); + value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -731,7 +732,7 @@ public Response ListEvents(string subsc } } - internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -743,12 +744,12 @@ internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscription uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/getCallbackConfig", false); + uri.AppendPath("/ping", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -763,7 +764,7 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/getCallbackConfig", false); + uri.AppendPath("/ping", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -771,7 +772,7 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin return message; } - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -779,22 +780,22 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetCallbackConfigAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task> PingAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookCallbackConfig value = default; + ContainerRegistryWebhookEventInfo value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); + value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -802,7 +803,7 @@ public async Task> GetCallbackC } } - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -810,22 +811,22 @@ public async Task> GetCallbackC /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetCallbackConfig(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response Ping(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookCallbackConfig value = default; + ContainerRegistryWebhookEventInfo value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); + value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs index 3d8c8bc363fe..0d094cebdf31 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string scopeMapNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string scopeMapName, CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string scopeMapName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string scopeMapName, CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs index cb37df2b586c..ffeaad6c255e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md index 62d5b7184bfb..007b43198ebe 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md @@ -7,7 +7,10 @@ azure-arm: true csharp: true library-name: ContainerRegistry namespace: Azure.ResourceManager.ContainerRegistry -require: https://github.com/Azure/azure-rest-api-specs/blob/a55917cb512540bc3d0aec760d4e28712c3a4ae0/specification/containerregistry/resource-manager/readme.md +# Temporarily releasing the SDK from the Swagger specification; this will be updated once support for generating SDKs from multiple TypeSpec sources is available. +input-file: + - https://github.com/Azure/azure-rest-api-specs/blob/aaea49a20b10e8ab526495309e14fdfdcd23bb7e/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/containerregistry.json + - https://github.com/Azure/azure-rest-api-specs/blob/aaea49a20b10e8ab526495309e14fdfdcd23bb7e/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/containerregistry_build.json output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -69,8 +72,6 @@ prepend-rp-prefix: - AgentPoolListResult - AgentPoolQueueStatus - AgentProperties - - Archive - - ArchiveVersion - AuthCredential - BaseImageDependency - BaseImageDependencyType @@ -78,15 +79,14 @@ prepend-rp-prefix: - BaseImageTriggerType - CacheRule - CertificateType - - CredentialName - CredentialHealth - CredentialHealthStatus + - CredentialName - Credentials - CredentialSet - DockerBuildStep - EncodedTaskStep - EncryptionStatus - - ExportPipeline - ExportPolicy - ExportPolicyStatus - FileTaskStep @@ -95,22 +95,13 @@ prepend-rp-prefix: - ImageUpdateTrigger - ImportImageParameters - ImportMode - - ImportPipeline - ImportSource - ImportSourceCredentials - IPRule - KeyVaultProperties - - MetadataSearch - NetworkRuleSet - OverrideTaskStepProperties - PasswordName - - PipelineOptions - - PipelineRun - - PipelineRunSourceProperties - - PipelineRunSourceType - - PipelineRunTargetProperties - - PipelineRunTargetType - - PipelineSourceType - PlatformProperties - Policies - PolicyStatus @@ -127,7 +118,6 @@ prepend-rp-prefix: - RunType - SecretObject - SecretObjectType - - SoftDeletePolicy - SourceTrigger - SourceTriggerDescriptor - SourceTriggerEvent @@ -161,112 +151,109 @@ prepend-rp-prefix: - ZoneRedundancy rename-mapping: - OS: ContainerRegistryOS - KeyVaultProperties.keyRotationEnabled: IsKeyRotationEnabled - RegistryNameStatus: ContainerRegistryNameAvailableResult - RegistryNameStatus.nameAvailable: IsNameAvailable - RegistryUpdateParameters: ContainerRegistryPatch - RegistryUpdateParameters.properties.anonymousPullEnabled: IsAnonymousPullEnabled - RegistryUpdateParameters.properties.adminUserEnabled: IsAdminUserEnabled - Registry.properties.adminUserEnabled: IsAdminUserEnabled - RegistryUpdateParameters.properties.dataEndpointEnabled: IsDataEndpointEnabled - Registry.properties.dataEndpointEnabled: IsDataEndpointEnabled - Registry.properties.anonymousPullEnabled: IsAnonymousPullEnabled - ReplicationUpdateParameters.properties.regionEndpointEnabled: IsRegionEndpointEnabled - Replication.properties.regionEndpointEnabled: IsRegionEndpointEnabled - Registry: ContainerRegistry - AuthInfo.expiresIn: ExpireInSeconds - TaskStepUpdateParameters: ContainerRegistryTaskStepUpdateContent - DockerBuildStepUpdateParameters: ContainerRegistryDockerBuildStepUpdateContent - EncodedTaskStepUpdateParameters: ContainerRegistryEncodedTaskStepUpdateContent - FileTaskStepUpdateParameters: ContainerRegistryFileTaskStepUpdateContent - TaskRunRequest: ContainerRegistryTaskRunContent - RunRequest: ContainerRegistryRunContent - DockerBuildRequest: ContainerRegistryDockerBuildContent - EncodedTaskRunRequest: ContainerRegistryEncodedTaskRunContent - FileTaskRunRequest: ContainerRegistryFileTaskRunContent - TriggerUpdateParameters: ContainerRegistryTriggerUpdateContent - TimerTriggerUpdateParameters: ContainerRegistryTimerTriggerUpdateContent - SourceTriggerUpdateParameters: ContainerRegistrySourceTriggerUpdateContent - BaseImageTriggerUpdateParameters: ContainerRegistryBaseImageTriggerUpdateContent - Run.properties.createTime: CreatedOn Action: ContainerRegistryIPRuleAction + ActivationProperties: ConnectedRegistryActivation + ActivationStatus: ConnectedRegistryActivationStatus + Actor: ContainerRegistryWebhookEventActor ActionsRequired: ActionsRequiredForPrivateLinkServiceConsumer Architecture: ContainerRegistryOSArchitecture Argument: ContainerRegistryRunArgument - SourceProperties: SourceCodeRepoProperties + AuditLogStatus: ConnectedRegistryAuditLogStatus AuthInfo: SourceCodeRepoAuthInfo + AuthInfo.expiresIn: ExpireInSeconds AuthInfoUpdateParameters: SourceCodeRepoAuthInfoUpdateContent - TokenType: SourceCodeRepoAuthTokenType + AzureADAuthenticationAsArmPolicyStatus: AadAuthenticationAsArmPolicyStatus + BaseImageTriggerUpdateParameters: ContainerRegistryBaseImageTriggerUpdateContent CallbackConfig: ContainerRegistryWebhookCallbackConfig + ConnectionState: ConnectedRegistryConnectionState + ConnectionStatus: ContainerRegistryPrivateLinkServiceConnectionStatus + ConnectedRegistry.properties.clientTokenIds: -|arm-id + ConnectedRegistryUpdateParameters.properties.clientTokenIds: -|arm-id + DefaultAction: ContainerRegistryNetworkRuleDefaultAction + DockerBuildRequest: ContainerRegistryDockerBuildContent + DockerBuildRequest.timeout: TimeoutInSeconds + DockerBuildStepUpdateParameters: ContainerRegistryDockerBuildStepUpdateContent + EncodedTaskRunRequest: ContainerRegistryEncodedTaskRunContent + EncodedTaskRunRequest.timeout: TimeoutInSeconds + EncodedTaskStepUpdateParameters: ContainerRegistryEncodedTaskStepUpdateContent + EncryptionProperty: ContainerRegistryEncryption Event: ContainerRegistryWebhookEvent - EventInfo: ContainerRegistryWebhookEventInfo - EventRequestMessage: ContainerRegistryWebhookEventRequestMessage EventContent: ContainerRegistryWebhookEventContent + EventContent.id: -|uuid + EventInfo: ContainerRegistryWebhookEventInfo + EventInfo.id: -|uuid EventListResult: ContainerRegistryWebhookEventListResult + EventRequestMessage: ContainerRegistryWebhookEventRequestMessage EventResponseMessage: ContainerRegistryWebhookEventResponseMessage - Target: ContainerRegistryWebhookEventTarget - Source: ContainerRegistryWebhookEventSource - Request: ContainerRegistryWebhookEventRequestContent - ConnectionStatus: ContainerRegistryPrivateLinkServiceConnectionStatus - DefaultAction: ContainerRegistryNetworkRuleDefaultAction - EncodedTaskRunRequest.timeout: TimeoutInSeconds + FileTaskRunRequest: ContainerRegistryFileTaskRunContent FileTaskRunRequest.timeout: TimeoutInSeconds - TaskUpdateParameters.properties.timeout: TimeoutInSeconds - Task.properties.timeout: TimeoutInSeconds - DockerBuildRequest.timeout: TimeoutInSeconds - EncryptionProperty: ContainerRegistryEncryption + FileTaskStepUpdateParameters: ContainerRegistryFileTaskStepUpdateContent + GenerateCredentialsParameters: ContainerRegistryGenerateCredentialsContent + ImageUpdateTrigger.id: -|uuid + ImportSource.registryUri: RegistryAddress + KeyVaultProperties.keyRotationEnabled: IsKeyRotationEnabled + LogLevel: ConnectedRegistryLogLevel + LoggingProperties: ConnectedRegistryLogging + LoginServerProperties: ConnectedRegistryLoginServer + NetworkRuleBypassOptions: ContainerRegistryNetworkRuleBypassOption + OS: ContainerRegistryOS + ParentProperties: ConnectedRegistryParent + ParentProperties.id: -|arm-id + PlatformUpdateParameters: ContainerRegistryPlatformUpdateContent RegenerateCredentialParameters: ContainerRegistryCredentialRegenerateContent + Registry: ContainerRegistry + Registry.properties.adminUserEnabled: IsAdminUserEnabled + Registry.properties.anonymousPullEnabled: IsAnonymousPullEnabled + Registry.properties.dataEndpointEnabled: IsDataEndpointEnabled + Registry.properties.networkRuleBypassAllowedForTasks: IsNetworkRuleBypassAllowedForTasks RegistryListCredentialsResult: ContainerRegistryListCredentialsResult + RegistryListResult: ContainerRegistryListResult RegistryNameCheckRequest: ContainerRegistryNameAvailabilityContent + RegistryNameStatus: ContainerRegistryNameAvailableResult + RegistryNameStatus.nameAvailable: IsNameAvailable RegistryPassword: ContainerRegistryPassword + RegistryUpdateParameters: ContainerRegistryPatch + RegistryUpdateParameters.properties.adminUserEnabled: IsAdminUserEnabled + RegistryUpdateParameters.properties.anonymousPullEnabled: IsAnonymousPullEnabled + RegistryUpdateParameters.properties.dataEndpointEnabled: IsDataEndpointEnabled + RegistryUpdateParameters.properties.networkRuleBypassAllowedForTasks: IsNetworkRuleBypassAllowedForTasks RegistryUsage: ContainerRegistryUsage + RegistryUsageListResult: ContainerRegistryUsageListResult RegistryUsageUnit: ContainerRegistryUsageUnit + Replication.properties.regionEndpointEnabled: IsRegionEndpointEnabled + ReplicationUpdateParameters.properties.regionEndpointEnabled: IsRegionEndpointEnabled + Request: ContainerRegistryWebhookEventRequestContent + Request.id: -|uuid + RoleAssignmentMode: ContainerRegistryRoleAssignmentMode + Run.properties.createTime: CreatedOn + RunRequest: ContainerRegistryRunContent + ScopeMap.properties.type: ScopeMapType SetValue: ContainerRegistryTaskOverridableValue + Source: ContainerRegistryWebhookEventSource + SourceProperties: SourceCodeRepoProperties + SourceTriggerDescriptor.id: -|uuid + SourceTriggerUpdateParameters: ContainerRegistrySourceTriggerUpdateContent SourceUpdateParameters: SourceCodeRepoUpdateContent Status: ContainerRegistryResourceStatus - Variant: ContainerRegistryCpuVariant - Actor: ContainerRegistryWebhookEventActor - NetworkRuleBypassOptions: ContainerRegistryNetworkRuleBypassOption - PlatformUpdateParameters: ContainerRegistryPlatformUpdateContent - RegistryListResult: ContainerRegistryListResult - RegistryUsageListResult: ContainerRegistryUsageListResult - StepType: ContainerRegistryTaskStepType - TaskStepProperties.type: ContainerRegistryTaskStepType - ImageUpdateTrigger.id: -|uuid - SourceTriggerDescriptor.id: -|uuid - EventContent.id: -|uuid - EventInfo.id: -|uuid - Request.id: -|uuid - ActivationProperties: ConnectedRegistryActivation - ActivationStatus: ConnectedRegistryActivationStatus - ConnectionState: ConnectedRegistryConnectionState - ParentProperties: ConnectedRegistryParent - ParentProperties.id: -|arm-id - LoginServerProperties: ConnectedRegistryLoginServer - LoggingProperties: ConnectedRegistryLogging StatusDetailProperties: ConnectedRegistryStatusDetail - StatusDetailProperties.type: StatusDetailType StatusDetailProperties.correlationId: -|uuid - AuditLogStatus: ConnectedRegistryAuditLogStatus - GenerateCredentialsParameters: ContainerRegistryGenerateCredentialsContent - LogLevel: ConnectedRegistryLogLevel - PipelineRunRequest: ConnectedRegistryPipelineRunContent - PipelineRunResponse: PipelineRunResult - ProgressProperties: PipelineProgress + StatusDetailProperties.type: StatusDetailType + StepType: ContainerRegistryTaskStepType SyncProperties: ConnectedRegistrySyncProperties SyncUpdateProperties: ConnectedRegistrySyncUpdateProperties - TokenUpdateParameters: ContainerRegistryTokenPatch - ScopeMap.properties.type: ScopeMapType - ExportPipelineTargetProperties.type: PipelineTargetType + Target: ContainerRegistryWebhookEventTarget + Task.properties.timeout: TimeoutInSeconds + TaskRunRequest: ContainerRegistryTaskRunContent + TaskStepProperties.type: ContainerRegistryTaskStepType + TaskStepUpdateParameters: ContainerRegistryTaskStepUpdateContent + TaskUpdateParameters.properties.timeout: TimeoutInSeconds + TimerTriggerUpdateParameters: ContainerRegistryTimerTriggerUpdateContent TlsCertificateProperties.location: CertificateLocation TokenCredentialsProperties: ContainerRegistryTokenCredentials - ImportSource.registryUri: RegistryAddress - AzureADAuthenticationAsArmPolicyStatus: AadAuthenticationAsArmPolicyStatus - PackageSourceType: ArchivePackageSourceType - RoleAssignmentMode: ContainerRegistryRoleAssignmentMode - ConnectedRegistry.properties.clientTokenIds: -|arm-id - ConnectedRegistryUpdateParameters.properties.clientTokenIds: -|arm-id + TokenType: SourceCodeRepoAuthTokenType + TokenUpdateParameters: ContainerRegistryTokenPatch + TriggerUpdateParameters: ContainerRegistryTriggerUpdateContent + Variant: ContainerRegistryCpuVariant override-operation-name: Schedules_ScheduleRun: ScheduleRun diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs index 3675d11bf38e..cd3fe35901b6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConnectedRegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryCreate.json // this example is just showing the usage of "ConnectedRegistries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_ConnectedRegistryCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConnectedRegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryList.json // this example is just showing the usage of "ConnectedRegistries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task GetAll_ConnectedRegistryList() [Ignore("Only validating compilation of examples")] public async Task Exists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Exists_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs index c1d32285195b..ef0ddca0e9c2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConnectedRegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryDelete.json // this example is just showing the usage of "ConnectedRegistries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Delete_ConnectedRegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConnectedRegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryUpdate.json // this example is just showing the usage of "ConnectedRegistries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Update_ConnectedRegistryUpdate() [Ignore("Only validating compilation of examples")] public async Task Deactivate_ConnectedRegistryDeactivate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDeactivate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryDeactivate.json // this example is just showing the usage of "ConnectedRegistries_Deactivate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs index ad75e750ca85..f89296a6caf3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentPoolsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsCreate.json // this example is just showing the usage of "AgentPools_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_AgentPoolsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AgentPoolsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsList.json // this example is just showing the usage of "AgentPools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task GetAll_AgentPoolsList() [Ignore("Only validating compilation of examples")] public async Task Exists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Exists_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs index 5ffb01eff778..68e1b3e480a7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AgentPoolsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsDelete.json // this example is just showing the usage of "AgentPools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_AgentPoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AgentPoolsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json // this example is just showing the usage of "AgentPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_AgentPoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetQueueStatus_AgentPoolsGetQueueStatus() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json // this example is just showing the usage of "AgentPools_GetQueueStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs index e9e064a461f5..82bdaf72f16f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryCacheRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CacheRuleCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleCreate.json // this example is just showing the usage of "CacheRules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CacheRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CacheRuleList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleList.json // this example is just showing the usage of "CacheRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetAll_CacheRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs index a6831a1cc2bc..1e5d025fa2d8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCacheRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CacheRuleDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleDelete.json // this example is just showing the usage of "CacheRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_CacheRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CacheRuleUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleUpdate.json // this example is just showing the usage of "CacheRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs index ce02908cbf4a..57249fb59679 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreate.json // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,11 +59,53 @@ public async Task CreateOrUpdate_RegistryCreate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegistryCreateAbac() + { + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreateAbac.json + // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerRegistryResource + ContainerRegistryCollection collection = resourceGroupResource.GetContainerRegistries(); + + // invoke the operation + string registryName = "myRegistry"; + ContainerRegistryData data = new ContainerRegistryData(new AzureLocation("westus"), new ContainerRegistrySku(ContainerRegistrySkuName.Standard)) + { + RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, + Tags = +{ +["key"] = "value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryName, data); + ContainerRegistryResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreateZoneRedundant.json // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +147,7 @@ public async Task CreateOrUpdate_RegistryCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +180,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListByResourceGroup() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListByResourceGroup.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListByResourceGroup.json // this example is just showing the usage of "Registries_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +215,7 @@ public async Task GetAll_RegistryListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +244,7 @@ public async Task Exists_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs index 1ae1de6aa41a..768f2b8a0a8b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCredentialSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CredentialSetCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetCreate.json // this example is just showing the usage of "CredentialSets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_CredentialSetCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CredentialSetList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetList.json // this example is just showing the usage of "CredentialSets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task GetAll_CredentialSetList() [Ignore("Only validating compilation of examples")] public async Task Exists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs index 86ab0f3a2022..e1eaa6bbbf22 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCredentialSetResource [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CredentialSetDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetDelete.json // this example is just showing the usage of "CredentialSets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_CredentialSetDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CredentialSetUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetUpdate.json // this example is just showing the usage of "CredentialSets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs index a633bde35f15..acd6af11860f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_PrivateEndpointConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs index de65b4e120d2..fdd6f698e8ab 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs index c906bc8b96d2..f39c8440512a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs index a74a5378fb89..57146e061bc1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListPrivateLinkResources() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListPrivateLinkResources.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListPrivateLinkResources.json // this example is just showing the usage of "Registries_ListPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_RegistryListPrivateLinkResources() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs index 5da404b83029..1f0e86bbfb0b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationCreate.json // this example is just showing the usage of "Replications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_ReplicationCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationCreateZoneRedundant.json // this example is just showing the usage of "Replications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ReplicationList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationList.json // this example is just showing the usage of "Replications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GetAll_ReplicationList() [Ignore("Only validating compilation of examples")] public async Task Exists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task Exists_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs index 9a01b6745dbd..ca6f77306232 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ReplicationDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationDelete.json // this example is just showing the usage of "Replications_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ReplicationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ReplicationUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationUpdate.json // this example is just showing the usage of "Replications_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs index 098d0c266f70..6c80706be67c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryDelete.json // this example is just showing the usage of "Registries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_RegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryUpdate.json // this example is just showing the usage of "Registries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,6 +101,7 @@ public async Task Update_RegistryUpdate() }, Sku = new ContainerRegistrySku(ContainerRegistrySkuName.Standard), IsAdminUserEnabled = true, + RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, }; ArmOperation lro = await containerRegistry.UpdateAsync(WaitUntil.Completed, patch); ContainerRegistryResource result = lro.Value; @@ -114,10 +115,10 @@ public async Task Update_RegistryUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task ImportImage_ImportImageByManifestDigest() + public async Task GenerateCredentials_RegistryGenerateCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByManifestDigest.json - // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGenerateCredentials.json + // this example is just showing the usage of "Registries_GenerateCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -133,25 +134,22 @@ public async Task ImportImage_ImportImageByManifestDigest() ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); // invoke the operation - ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000") - { - ResourceId = new ResourceIdentifier("/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry"), - }) + ContainerRegistryGenerateCredentialsContent content = new ContainerRegistryGenerateCredentialsContent { - TargetTags = { "targetRepository:targetTag" }, - UntaggedTargetRepositories = { "targetRepository1" }, - Mode = ContainerRegistryImportMode.Force, + TokenId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"), + ExpireOn = DateTimeOffset.Parse("2020-12-31T15:59:59.0707808Z"), }; - await containerRegistry.ImportImageAsync(WaitUntil.Completed, content); + ArmOperation lro = await containerRegistry.GenerateCredentialsAsync(WaitUntil.Completed, content); + ContainerRegistryGenerateCredentialsResult result = lro.Value; - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ImportImage_ImportImageByTag() + public async Task ImportImage_ImportImageByManifestDigest() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByTag.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageByManifestDigest.json // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +166,7 @@ public async Task ImportImage_ImportImageByTag() ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); // invoke the operation - ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("sourceRepository:sourceTag") + ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000") { ResourceId = new ResourceIdentifier("/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry"), }) @@ -184,9 +182,9 @@ public async Task ImportImage_ImportImageByTag() [Test] [Ignore("Only validating compilation of examples")] - public async Task ImportImage_ImportImageFromPublicRegistry() + public async Task ImportImage_ImportImageByTag() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageFromPublicRegistry.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageByTag.json // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,9 +201,9 @@ public async Task ImportImage_ImportImageFromPublicRegistry() ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); // invoke the operation - ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("library/hello-world") + ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("sourceRepository:sourceTag") { - RegistryAddress = "registry.hub.docker.com", + ResourceId = new ResourceIdentifier("/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry"), }) { TargetTags = { "targetRepository:targetTag" }, @@ -219,10 +217,10 @@ public async Task ImportImage_ImportImageFromPublicRegistry() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetUsages_RegistryListUsages() + public async Task ImportImage_ImportImageFromPublicRegistry() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListUsages.json - // this example is just showing the usage of "Registries_ListUsages" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageFromPublicRegistry.json + // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -237,11 +235,17 @@ public async Task GetUsages_RegistryListUsages() ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - // invoke the operation and iterate over the result - await foreach (ContainerRegistryUsage item in containerRegistry.GetUsagesAsync()) + // invoke the operation + ContainerRegistryImportImageContent content = new ContainerRegistryImportImageContent(new ContainerRegistryImportSource("library/hello-world") { - Console.WriteLine($"Succeeded: {item}"); - } + RegistryAddress = "registry.hub.docker.com", + }) + { + TargetTags = { "targetRepository:targetTag" }, + UntaggedTargetRepositories = { "targetRepository1" }, + Mode = ContainerRegistryImportMode.Force, + }; + await containerRegistry.ImportImageAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -250,7 +254,7 @@ public async Task GetUsages_RegistryListUsages() [Ignore("Only validating compilation of examples")] public async Task GetCredentials_RegistryListCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListCredentials.json // this example is just showing the usage of "Registries_ListCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -274,10 +278,10 @@ public async Task GetCredentials_RegistryListCredentials() [Test] [Ignore("Only validating compilation of examples")] - public async Task RegenerateCredential_RegistryRegenerateCredential() + public async Task GetUsages_RegistryListUsages() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryRegenerateCredential.json - // this example is just showing the usage of "Registries_RegenerateCredential" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListUsages.json + // this example is just showing the usage of "Registries_ListUsages" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -292,19 +296,21 @@ public async Task RegenerateCredential_RegistryRegenerateCredential() ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - // invoke the operation - ContainerRegistryCredentialRegenerateContent content = new ContainerRegistryCredentialRegenerateContent(ContainerRegistryPasswordName.Password); - ContainerRegistryListCredentialsResult result = await containerRegistry.RegenerateCredentialAsync(content); + // invoke the operation and iterate over the result + await foreach (ContainerRegistryUsage item in containerRegistry.GetUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GenerateCredentials_RegistryGenerateCredentials() + public async Task RegenerateCredential_RegistryRegenerateCredential() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGenerateCredentials.json - // this example is just showing the usage of "Registries_GenerateCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryRegenerateCredential.json + // this example is just showing the usage of "Registries_RegenerateCredential" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -320,13 +326,8 @@ public async Task GenerateCredentials_RegistryGenerateCredentials() ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); // invoke the operation - ContainerRegistryGenerateCredentialsContent content = new ContainerRegistryGenerateCredentialsContent - { - TokenId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"), - ExpireOn = DateTimeOffset.Parse("2020-12-31T15:59:59.0707808Z"), - }; - ArmOperation lro = await containerRegistry.GenerateCredentialsAsync(WaitUntil.Completed, content); - ContainerRegistryGenerateCredentialsResult result = lro.Value; + ContainerRegistryCredentialRegenerateContent content = new ContainerRegistryCredentialRegenerateContent(ContainerRegistryPasswordName.Password); + ContainerRegistryListCredentialsResult result = await containerRegistry.RegenerateCredentialAsync(content); Console.WriteLine($"Succeeded: {result}"); } @@ -335,7 +336,7 @@ public async Task GenerateCredentials_RegistryGenerateCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -385,7 +386,7 @@ public async Task ScheduleRun_RegistriesScheduleRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -428,7 +429,7 @@ public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -472,7 +473,7 @@ public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -526,7 +527,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTask() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -587,7 +588,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -671,7 +672,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -722,7 +723,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() [Ignore("Only validating compilation of examples")] public async Task GetBuildSourceUploadUrl_RegistriesGetBuildSourceUploadUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json // this example is just showing the usage of "Builds_GetBuildSourceUploadUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs index e356684afd7d..418b01e8a9b7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryRunCollection [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsList.json // this example is just showing the usage of "Runs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetAll_RunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs index a17617db5d2b..da18cca6dc2d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryRunResource [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task Update_RunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsUpdate.json // this example is just showing the usage of "Runs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_RunsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetLogSasUrl_RunsGetLogSasUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json // this example is just showing the usage of "Runs_GetLogSasUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task GetLogSasUrl_RunsGetLogSasUrl() [Ignore("Only validating compilation of examples")] public async Task Cancel_RunsCancel() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsCancel.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/RunsCancel.json // this example is just showing the usage of "Runs_Cancel" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs index 66b716680736..92086d827614 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryTaskCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksCreate.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_TasksCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task CreateOrUpdate_TasksCreateQuickTask() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +231,7 @@ public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -317,7 +317,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -392,7 +392,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -426,7 +426,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TasksList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksList.json // this example is just showing the usage of "Tasks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -462,7 +462,7 @@ public async Task GetAll_TasksList() [Ignore("Only validating compilation of examples")] public async Task Exists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -492,7 +492,7 @@ public async Task Exists_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs index f9127b8a0587..2565924d8ad7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskResource [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TasksDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksDelete.json // this example is just showing the usage of "Tasks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TasksDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksUpdate.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Update_TasksUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Update_TasksUpdateQuickTask() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -283,7 +283,7 @@ public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithMSICustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -355,7 +355,7 @@ public async Task Update_TasksUpdateWithMSICustomCredentials() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithOpaqueCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -436,7 +436,7 @@ public async Task Update_TasksUpdateWithOpaqueCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TasksGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TasksGetDetails.json // this example is just showing the usage of "Tasks_GetDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs index 48ec6347c2c4..6030d189e4ac 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TaskRunsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsCreate.json // this example is just showing the usage of "TaskRuns_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TaskRunsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TaskRunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsList.json // this example is just showing the usage of "TaskRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_TaskRunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs index 8e460c768aaa..4a84067fa5ec 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunResource [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TaskRunsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsDelete.json // this example is just showing the usage of "TaskRuns_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TaskRunsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TaskRunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsUpdate.json // this example is just showing the usage of "TaskRuns_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Update_TaskRunsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TaskRunsGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json // this example is just showing the usage of "TaskRuns_GetDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs index cf1eac36fb10..09e29819351b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TokenCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenCreate.json // this example is just showing the usage of "Tokens_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TokenCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TokenList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenList.json // this example is just showing the usage of "Tokens_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_TokenList() [Ignore("Only validating compilation of examples")] public async Task Exists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs index 69720c6629fb..6291a1ead86f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenResource [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TokenDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenDelete.json // this example is just showing the usage of "Tokens_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TokenDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TokenUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenUpdate.json // this example is just showing the usage of "Tokens_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs index accba0ea9b21..8fe067de0d6f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_WebhookCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookCreate.json // this example is just showing the usage of "Webhooks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_WebhookCreate() [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_WebhookList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookList.json // this example is just showing the usage of "Webhooks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task GetAll_WebhookList() [Ignore("Only validating compilation of examples")] public async Task Exists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task Exists_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs index 2ab59c7ff1e4..e6a5cd991653 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookResource [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task Delete_WebhookDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookDelete.json // this example is just showing the usage of "Webhooks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_WebhookDelete() [Ignore("Only validating compilation of examples")] public async Task Update_WebhookUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookUpdate.json // this example is just showing the usage of "Webhooks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,10 +123,10 @@ public async Task Update_WebhookUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Ping_WebhookPing() + public async Task GetCallbackConfig_WebhookGetCallbackConfig() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookPing.json - // this example is just showing the usage of "Webhooks_Ping" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGetCallbackConfig.json + // this example is just showing the usage of "Webhooks_GetCallbackConfig" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -143,7 +143,7 @@ public async Task Ping_WebhookPing() ContainerRegistryWebhookResource containerRegistryWebhook = client.GetContainerRegistryWebhookResource(containerRegistryWebhookResourceId); // invoke the operation - ContainerRegistryWebhookEventInfo result = await containerRegistryWebhook.PingAsync(); + ContainerRegistryWebhookCallbackConfig result = await containerRegistryWebhook.GetCallbackConfigAsync(); Console.WriteLine($"Succeeded: {result}"); } @@ -152,7 +152,7 @@ public async Task Ping_WebhookPing() [Ignore("Only validating compilation of examples")] public async Task GetEvents_WebhookListEvents() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookListEvents.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookListEvents.json // this example is just showing the usage of "Webhooks_ListEvents" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,10 +180,10 @@ public async Task GetEvents_WebhookListEvents() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetCallbackConfig_WebhookGetCallbackConfig() + public async Task Ping_WebhookPing() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGetCallbackConfig.json - // this example is just showing the usage of "Webhooks_GetCallbackConfig" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookPing.json + // this example is just showing the usage of "Webhooks_Ping" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -200,7 +200,7 @@ public async Task GetCallbackConfig_WebhookGetCallbackConfig() ContainerRegistryWebhookResource containerRegistryWebhook = client.GetContainerRegistryWebhookResource(containerRegistryWebhookResourceId); // invoke the operation - ContainerRegistryWebhookCallbackConfig result = await containerRegistryWebhook.GetCallbackConfigAsync(); + ContainerRegistryWebhookEventInfo result = await containerRegistryWebhook.PingAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs index 3d8e42b903aa..604970752193 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeMapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ScopeMapCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapCreate.json // this example is just showing the usage of "ScopeMaps_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ScopeMapCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ScopeMapList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapList.json // this example is just showing the usage of "ScopeMaps_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ScopeMapList() [Ignore("Only validating compilation of examples")] public async Task Exists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs index e39d51f6bd24..0e5cf32811de 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ScopeMapResource [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ScopeMapDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapDelete.json // this example is just showing the usage of "ScopeMaps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ScopeMapDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ScopeMapUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapUpdate.json // this example is just showing the usage of "ScopeMaps_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index b7b460769375..7003ab6f2e12 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCheckNameAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvaila [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameNotAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCheckNameNotAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAva [Ignore("Only validating compilation of examples")] public async Task GetContainerRegistries_RegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryList.json // this example is just showing the usage of "Registries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs index dbd4e93acbf2..da8c5b6b97e4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Scenario/ContainerRegistryTests.cs @@ -126,17 +126,9 @@ public async Task ContainerRegistryCoreScenario() // Regenerate credential ContainerRegistryCredentialRegenerateContent credentialContent = new ContainerRegistryCredentialRegenerateContent(ContainerRegistryPasswordName.Password); credentials = await registryFromUpdate.RegenerateCredentialAsync(credentialContent); - // Validate if generated password is different - var newPassword1 = credentials.Passwords[0].Value; - var newPassword2 = credentials.Passwords[1].Value; - Assert.AreNotEqual(password1, newPassword1); - Assert.AreEqual(password2, newPassword2); credentialContent = new ContainerRegistryCredentialRegenerateContent(ContainerRegistryPasswordName.Password2); credentials = await registryFromUpdate.RegenerateCredentialAsync(credentialContent); - // Validate if generated password is different - Assert.AreEqual(newPassword1, credentials.Passwords[0].Value); - Assert.AreNotEqual(newPassword2, credentials.Passwords[1].Value); // Delete the container registry await registryFromUpdate.DeleteAsync(WaitUntil.Completed); @@ -522,7 +514,7 @@ public async Task ContainerRegistryTaskRun() { UserAssignedIdentities = { - { new ResourceIdentifier("/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/sdk-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/acrsdktestidentity"), new UserAssignedIdentity()} + { new ResourceIdentifier("/subscriptions/ea747fd7-4547-4100-b45a-c0580d18d538/resourceGroups/sdk-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/acrsdktestidentity"), new UserAssignedIdentity()} } }, RunRequest = new ContainerRegistryEncodedTaskRunContent(Convert.ToBase64String(Encoding.UTF8.GetBytes(taskString)), new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) { Architecture = ContainerRegistryOSArchitecture.Amd64 }) @@ -774,7 +766,6 @@ public async Task ContainerRegistryScopeMap() Assert.AreEqual(scopeMapName, scopeMapFromList.Data.Name); } } - Assert.AreEqual(3, systemDefinedScopeMapCount); Assert.AreEqual(1, userDefinedScopeMapCount); // Get the scope map ScopeMapResource scopeMapFromGet = await scopeMapCollection.GetAsync(scopeMapName); diff --git a/sdk/core/Azure.Core/api/Azure.Core.net8.0.cs b/sdk/core/Azure.Core/api/Azure.Core.net8.0.cs index aaca2412666b..3eb502afc9ff 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net8.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net8.0.cs @@ -144,7 +144,9 @@ protected Operation() { } public virtual Azure.Core.RehydrationToken? GetRehydrationToken() { throw null; } public static Azure.Operation Rehydrate(Azure.Core.Pipeline.HttpPipeline pipeline, Azure.Core.RehydrationToken rehydrationToken, Azure.Core.ClientOptions? options = null) { throw null; } public static System.Threading.Tasks.Task RehydrateAsync(Azure.Core.Pipeline.HttpPipeline pipeline, Azure.Core.RehydrationToken rehydrationToken, Azure.Core.ClientOptions? options = null) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("This method uses reflection.")] public static System.Threading.Tasks.Task> RehydrateAsync(Azure.Core.Pipeline.HttpPipeline pipeline, Azure.Core.RehydrationToken rehydrationToken, Azure.Core.ClientOptions? options = null) where T : System.ClientModel.Primitives.IPersistableModel { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("This method uses reflection.")] public static Azure.Operation Rehydrate(Azure.Core.Pipeline.HttpPipeline pipeline, Azure.Core.RehydrationToken rehydrationToken, Azure.Core.ClientOptions? options = null) where T : System.ClientModel.Primitives.IPersistableModel { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override string? ToString() { throw null; } diff --git a/sdk/core/Azure.Core/src/Internal/GenericOperationSource.cs b/sdk/core/Azure.Core/src/Internal/GenericOperationSource.cs index a29647d35341..55b39bcbbd38 100644 --- a/sdk/core/Azure.Core/src/Internal/GenericOperationSource.cs +++ b/sdk/core/Azure.Core/src/Internal/GenericOperationSource.cs @@ -8,6 +8,8 @@ namespace Azure.Core { + [RequiresDynamicCode("This method uses reflection.")] + [RequiresUnreferencedCode("This method uses reflection.")] internal class GenericOperationSource<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> : IOperationSource where T : IPersistableModel { T IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) diff --git a/sdk/core/Azure.Core/src/Operation.cs b/sdk/core/Azure.Core/src/Operation.cs index bb283a7d69ff..7c911049c24f 100644 --- a/sdk/core/Azure.Core/src/Operation.cs +++ b/sdk/core/Azure.Core/src/Operation.cs @@ -26,6 +26,8 @@ public abstract class Operation /// The rehydration token. /// The client options. /// The long-running operation. + [RequiresDynamicCode("This method uses reflection.")] + [RequiresUnreferencedCode("This method uses reflection.")] public static Operation Rehydrate<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions? options = null) where T : IPersistableModel { Argument.AssertNotNull(pipeline, nameof(pipeline)); @@ -62,6 +64,8 @@ public static Operation Rehydrate(HttpPipeline pipeline, RehydrationToken rehydr /// The rehydration token. /// The client options. /// The long-running operation. + [RequiresDynamicCode("This method uses reflection.")] + [RequiresUnreferencedCode("This method uses reflection.")] public static async Task> RehydrateAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions? options = null) where T : IPersistableModel { Argument.AssertNotNull(pipeline, nameof(pipeline)); diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index 600fc2bcf20c..f7241e0a2ad1 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.8.0-beta.1 (Unreleased) +## 1.9.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.8.0 (2025-10-31) + +### Features Added + +- Added `ClientRequestId` property to `PipelineRequest` which exposes the value that is used in logging and distributed tracing. + ## 1.7.0 (2025-09-22) ### Features Added diff --git a/sdk/core/System.ClientModel/api/System.ClientModel.net8.0.cs b/sdk/core/System.ClientModel/api/System.ClientModel.net8.0.cs index 1406efebfaed..82e440d6c39f 100644 --- a/sdk/core/System.ClientModel/api/System.ClientModel.net8.0.cs +++ b/sdk/core/System.ClientModel/api/System.ClientModel.net8.0.cs @@ -496,6 +496,7 @@ public enum PipelinePosition public abstract partial class PipelineRequest : System.IDisposable { protected PipelineRequest() { } + public virtual string ClientRequestId { get { throw null; } } public System.ClientModel.BinaryContent? Content { get { throw null; } set { } } protected abstract System.ClientModel.BinaryContent? ContentCore { get; set; } public System.ClientModel.Primitives.PipelineRequestHeaders Headers { get { throw null; } } diff --git a/sdk/core/System.ClientModel/api/System.ClientModel.net9.0.cs b/sdk/core/System.ClientModel/api/System.ClientModel.net9.0.cs index 1406efebfaed..82e440d6c39f 100644 --- a/sdk/core/System.ClientModel/api/System.ClientModel.net9.0.cs +++ b/sdk/core/System.ClientModel/api/System.ClientModel.net9.0.cs @@ -496,6 +496,7 @@ public enum PipelinePosition public abstract partial class PipelineRequest : System.IDisposable { protected PipelineRequest() { } + public virtual string ClientRequestId { get { throw null; } } public System.ClientModel.BinaryContent? Content { get { throw null; } set { } } protected abstract System.ClientModel.BinaryContent? ContentCore { get; set; } public System.ClientModel.Primitives.PipelineRequestHeaders Headers { get { throw null; } } diff --git a/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs b/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs index 600a6ceb6c8f..a606393f5771 100644 --- a/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs +++ b/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs @@ -489,6 +489,7 @@ public enum PipelinePosition public abstract partial class PipelineRequest : System.IDisposable { protected PipelineRequest() { } + public virtual string ClientRequestId { get { throw null; } } public System.ClientModel.BinaryContent? Content { get { throw null; } set { } } protected abstract System.ClientModel.BinaryContent? ContentCore { get; set; } public System.ClientModel.Primitives.PipelineRequestHeaders Headers { get { throw null; } } diff --git a/sdk/core/System.ClientModel/src/Message/PipelineRequest.cs b/sdk/core/System.ClientModel/src/Message/PipelineRequest.cs index 6901eaf68829..b9bf45b7bf39 100644 --- a/sdk/core/System.ClientModel/src/Message/PipelineRequest.cs +++ b/sdk/core/System.ClientModel/src/Message/PipelineRequest.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.ClientModel.Internal; using System.Diagnostics; namespace System.ClientModel.Primitives; @@ -70,10 +71,18 @@ public BinaryContent? Content /// protected abstract BinaryContent? ContentCore { get; set; } + private string? _clientRequestId; + /// - /// The client request id to include in log entries. + /// Gets the client request id used for logging. + /// Custom policies can optionally send this value to the service. + /// A value is automatically generated on first access using + /// ?.Id if available, otherwise a new . /// - internal string? ClientRequestId { get; set; } + public virtual string ClientRequestId + { + get => _clientRequestId ??= Activity.Current?.Id ?? Guid.NewGuid().ToString(); + } /// public abstract void Dispose(); diff --git a/sdk/core/System.ClientModel/src/Pipeline/ClientPipeline.cs b/sdk/core/System.ClientModel/src/Pipeline/ClientPipeline.cs index 916409b33f33..c9f8eebce9b4 100644 --- a/sdk/core/System.ClientModel/src/Pipeline/ClientPipeline.cs +++ b/sdk/core/System.ClientModel/src/Pipeline/ClientPipeline.cs @@ -234,7 +234,6 @@ public PipelineMessage CreateMessage(Uri uri, string method, PipelineMessageClas public void Send(PipelineMessage message) { Argument.AssertNotNull(message, nameof(message)); - message.Request.ClientRequestId = Activity.Current?.Id ?? Guid.NewGuid().ToString(); IReadOnlyList policies = GetProcessor(message); @@ -257,7 +256,6 @@ public void Send(PipelineMessage message) public async ValueTask SendAsync(PipelineMessage message) { Argument.AssertNotNull(message, nameof(message)); - message.Request.ClientRequestId = Activity.Current?.Id ?? Guid.NewGuid().ToString(); IReadOnlyList policies = GetProcessor(message); diff --git a/sdk/core/System.ClientModel/src/System.ClientModel.csproj b/sdk/core/System.ClientModel/src/System.ClientModel.csproj index 995bd508ca65..27f3d61867b8 100644 --- a/sdk/core/System.ClientModel/src/System.ClientModel.csproj +++ b/sdk/core/System.ClientModel/src/System.ClientModel.csproj @@ -2,9 +2,9 @@ Contains building blocks for clients that call cloud services. - 1.8.0-beta.1 + 1.9.0-beta.1 - 1.7.0 + 1.8.0 enable netstandard2.0;net8.0;net9.0 DotNetPackageIcon.png diff --git a/sdk/core/System.ClientModel/tests/Message/PipelineRequestTests.cs b/sdk/core/System.ClientModel/tests/Message/PipelineRequestTests.cs new file mode 100644 index 000000000000..5b5fed3e3481 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/Message/PipelineRequestTests.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading.Tasks; +using ClientModel.Tests.Mocks; +using NUnit.Framework; + +namespace System.ClientModel.Tests.Message; + +public class PipelineRequestTests +{ + [Test] + public void ClientRequestId_LazyInitializes() + { + // Arrange + ClientPipeline pipeline = ClientPipeline.Create(); + PipelineMessage message = pipeline.CreateMessage(); + + // Act - Access ClientRequestId without setting it + string clientRequestId = message.Request.ClientRequestId; + + // Assert - Should be auto-generated and not null + Assert.IsNotNull(clientRequestId); + Assert.IsNotEmpty(clientRequestId); + } + + [Test] + public void ClientRequestId_ReturnsConsistentValue() + { + // Arrange + ClientPipeline pipeline = ClientPipeline.Create(); + PipelineMessage message = pipeline.CreateMessage(); + + // Act - Access ClientRequestId multiple times + string firstAccess = message.Request.ClientRequestId; + string secondAccess = message.Request.ClientRequestId; + + // Assert - Should return the same value + Assert.AreEqual(firstAccess, secondAccess); + } + + [Test] + public void ClientRequestId_IsReadOnly() + { + // Arrange + ClientPipeline pipeline = ClientPipeline.Create(); + PipelineMessage message = pipeline.CreateMessage(); + + // Act - Access ClientRequestId + string clientRequestId = message.Request.ClientRequestId; + + // Assert - Should be auto-generated and consistent + Assert.IsNotNull(clientRequestId); + Assert.IsNotEmpty(clientRequestId); + Assert.AreEqual(clientRequestId, message.Request.ClientRequestId); + } + + [Test] + public void ClientRequestId_UsesActivityIdWhenAvailable() + { + // Arrange + ClientPipeline pipeline = ClientPipeline.Create(); + PipelineMessage message = pipeline.CreateMessage(); + + using Activity activity = new Activity("test-activity"); + activity.Start(); + + // Act - Access ClientRequestId while Activity is active + string clientRequestId = message.Request.ClientRequestId; + + // Assert - Should use Activity.Current.Id + Assert.AreEqual(Activity.Current?.Id, clientRequestId); + } + + [Test] + public void ClientRequestId_IsAccessibleFromCustomPolicy() + { + // Arrange + string? capturedRequestId = null; + + ClientPipelineOptions options = new(); + options.Transport = new ObservableTransport("Transport"); + options.AddPolicy(new TestClientRequestIdPolicy((id) => capturedRequestId = id), PipelinePosition.PerCall); + + ClientPipeline pipeline = ClientPipeline.Create(options); + PipelineMessage message = pipeline.CreateMessage(); + + // Act - Send message through pipeline + pipeline.Send(message); + + // Assert - Custom policy should be able to access ClientRequestId + Assert.IsNotNull(capturedRequestId); + Assert.IsNotEmpty(capturedRequestId); + Assert.AreEqual(message.Request.ClientRequestId, capturedRequestId); + } + + #region Helper Classes + + private class TestClientRequestIdPolicy : PipelinePolicy + { + private readonly Action _onClientRequestId; + + public TestClientRequestIdPolicy(Action onClientRequestId) + { + _onClientRequestId = onClientRequestId; + } + + public override void Process(PipelineMessage message, IReadOnlyList pipeline, int currentIndex) + { + _onClientRequestId(message.Request.ClientRequestId); + ProcessNext(message, pipeline, currentIndex); + } + + public override async ValueTask ProcessAsync(PipelineMessage message, IReadOnlyList pipeline, int currentIndex) + { + _onClientRequestId(message.Request.ClientRequestId); + await ProcessNextAsync(message, pipeline, currentIndex).ConfigureAwait(false); + } + } + + #endregion +} diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/ArmDellStorageModelFactory.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/ArmDellStorageModelFactory.cs index ebd12f7d375e..615f7e082278 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/ArmDellStorageModelFactory.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/ArmDellStorageModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Dell.Storage; using Azure.ResourceManager.Models; diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs index 25fba307d8be..a39d1f5aa000 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// FileSystems_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Operation Id. - /// CreateOrUpdate. + /// FileSystems_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string file /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string filesystemName, Can /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string filesystemName, CancellationToken ca /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIfExistsA /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs index ed975ee12ef1..ef25fe9e0414 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Operation Id. - /// Get. + /// FileSystems_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cancellati } } - /// Update a FileSystemResource. + /// + /// Update a FileSystemResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}. + /// + /// + /// Operation Id. + /// FileSystems_Update. + /// + /// + /// Default Api Version. + /// 2025-03-21-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsync(DellFile } } - /// Update a FileSystemResource. + /// + /// Update a FileSystemResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}. + /// + /// + /// Operation Id. + /// FileSystems_Update. + /// + /// + /// Default Api Version. + /// 2025-03-21-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(DellFileSystemPatch patch /// /// /// Operation Id. - /// Delete. + /// FileSystems_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// FileSystems_Delete. /// /// /// Default Api Version. diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs index 3628bd012a50..e45677800e73 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual DellFileSystemCollection GetDellFileSystems() return GetCachedClient(client => new DellFileSystemCollection(client, Id)); } - /// Get a FileSystemResource. + /// + /// Get a FileSystemResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}. + /// + /// + /// Operation Id. + /// FileSystems_Get. + /// + /// + /// Default Api Version. + /// 2025-03-21-preview. + /// + /// + /// /// Name of the filesystem resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetDellFileSystemAsy return await GetDellFileSystems().GetAsync(filesystemName, cancellationToken).ConfigureAwait(false); } - /// Get a FileSystemResource. + /// + /// Get a FileSystemResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}. + /// + /// + /// Operation Id. + /// FileSystems_Get. + /// + /// + /// Default Api Version. + /// 2025-03-21-preview. + /// + /// + /// /// Name of the filesystem resource. /// The cancellation token to use. /// is null. diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/AzureResourceManagerDellStorageContext.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/AzureResourceManagerDellStorageContext.cs index 541ba898743b..4135c850a251 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/AzureResourceManagerDellStorageContext.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/AzureResourceManagerDellStorageContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Dell.Storage.Models; using Azure.ResourceManager.Models; @@ -29,6 +30,7 @@ namespace Azure.ResourceManager.Dell.Storage [ModelReaderWriterBuildable(typeof(DellFileSystemUserDetails))] [ModelReaderWriterBuildable(typeof(FileSystemResourceListResult))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerDellStorageContext : ModelReaderWriterContext diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs index 8c1eabca306c..b6244984f6f8 100644 --- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs +++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs @@ -198,15 +198,15 @@ protected virtual DellFileSystemPatch PersistableModelCreateCore(BinaryData data /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DellFileSystemPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DellFileSystemPatch dellFileSystemPatch) { - if (patch == null) + if (dellFileSystemPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(dellFileSystemPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs index 88b20e4040bb..29c2c66dd46a 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.net8.0.cs @@ -27,7 +27,10 @@ public partial class DependencyMapData : Azure.ResourceManager.Models.TrackedRes { public DependencyMapData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? DependencyMapProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.DependencyMapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.DependencyMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -55,7 +58,10 @@ public partial class DependencyMapDiscoverySourceData : Azure.ResourceManager.Mo { public DependencyMapDiscoverySourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -119,6 +125,8 @@ protected DependencyMapResource() { } public virtual Azure.Response GetDependencyMapDiscoverySource(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDependencyMapDiscoverySourceAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceCollection GetDependencyMapDiscoverySources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForAllMachines(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDependencyViewForAllMachinesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetDependencyViewForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -162,11 +170,16 @@ public static partial class ArmDependencyMapModelFactory { public static Azure.ResourceManager.DependencyMap.DependencyMapData DependencyMapData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? dependencyMapProvisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?)) { throw null; } public static Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData DependencyMapDiscoverySourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch DependencyMapDiscoverySourcePatch(System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties DependencyMapDiscoverySourceProperties(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?), string sourceType = null, Azure.Core.ResourceIdentifier sourceId = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch DependencyMapPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter DependencyMapProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator @operator = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator), System.Collections.Generic.IEnumerable processNames = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent ExportDependenciesContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null, System.Collections.Generic.IEnumerable applianceNameList = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult ExportDependenciesOperationResult(string id = null, string name = null, string status = null, Azure.ResponseError error = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties properties = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties ExportDependenciesResultProperties(string exportedDataSasUri = null, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? statusCode = default(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode?), int? additionalInfoAvailableDaysCount = default(int?)) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, string processIdOnFocusedMachine = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.Core.ResourceIdentifier connectedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult GetDependencyViewForAllMachinesOperationResult(string id = null, string name = null, string status = null, Azure.ResponseError error = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string getDependencyViewForAllMachinesResultLayoutFileSasUri = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties OffAzureDiscoverySourceProperties(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?), Azure.Core.ResourceIdentifier sourceId = null) { throw null; } } @@ -175,7 +188,10 @@ public partial class DependencyMapDateTimeFilter : System.ClientModel.Primitives public DependencyMapDateTimeFilter() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -186,7 +202,10 @@ public partial class DependencyMapDiscoverySourcePatch : System.ClientModel.Prim { public DependencyMapDiscoverySourcePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -195,10 +214,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public abstract partial class DependencyMapDiscoverySourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected DependencyMapDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) { } + internal DependencyMapDiscoverySourceProperties() { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -209,7 +231,10 @@ public partial class DependencyMapPatch : System.ClientModel.Primitives.IJsonMod { public DependencyMapPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -221,7 +246,10 @@ public partial class DependencyMapProcessNameFilter : System.ClientModel.Primiti public DependencyMapProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator @operator, System.Collections.Generic.IEnumerable processNames) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator Operator { get { throw null; } } public System.Collections.Generic.IList ProcessNames { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -243,6 +271,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator right) { throw null; } public override string ToString() { throw null; } } @@ -266,6 +295,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState right) { throw null; } public override string ToString() { throw null; } } @@ -274,7 +304,10 @@ public partial class DependencyMapVisualizationFilter : System.ClientModel.Primi public DependencyMapVisualizationFilter() { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter DateTime { get { throw null; } set { } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -287,7 +320,10 @@ public ExportDependenciesContent() { } public System.Collections.Generic.IList ApplianceNameList { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -304,7 +340,10 @@ internal ExportDependenciesOperationResult() { } public Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties Properties { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -317,7 +356,10 @@ internal ExportDependenciesResultProperties() { } public int? AdditionalInfoAvailableDaysCount { get { throw null; } } public string ExportedDataSasUri { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? StatusCode { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -340,6 +382,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode left, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode left, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode right) { throw null; } public override string ToString() { throw null; } } @@ -349,7 +392,10 @@ public GetConnectionsForProcessOnFocusedMachineContent(Azure.Core.ResourceIdenti public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } public string ProcessIdOnFocusedMachine { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -362,19 +408,59 @@ public GetConnectionsWithConnectedMachineForFocusedMachineContent(Azure.Core.Res public Azure.Core.ResourceIdentifier ConnectedMachineId { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class GetDependencyViewForAllMachinesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetDependencyViewForAllMachinesContent() { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GetDependencyViewForAllMachinesOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GetDependencyViewForAllMachinesOperationResult() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public string GetDependencyViewForAllMachinesResultLayoutFileSasUri { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string Status { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class GetDependencyViewForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GetDependencyViewForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,8 +469,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class OffAzureDiscoverySourceProperties : Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public OffAzureDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) : base (default(Azure.Core.ResourceIdentifier)) { } + public OffAzureDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) { } + protected override Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs index 88b20e4040bb..29c2c66dd46a 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/api/Azure.ResourceManager.DependencyMap.netstandard2.0.cs @@ -27,7 +27,10 @@ public partial class DependencyMapData : Azure.ResourceManager.Models.TrackedRes { public DependencyMapData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? DependencyMapProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.DependencyMapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.DependencyMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -55,7 +58,10 @@ public partial class DependencyMapDiscoverySourceData : Azure.ResourceManager.Mo { public DependencyMapDiscoverySourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -119,6 +125,8 @@ protected DependencyMapResource() { } public virtual Azure.Response GetDependencyMapDiscoverySource(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDependencyMapDiscoverySourceAsync(string sourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceCollection GetDependencyMapDiscoverySources() { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForAllMachines(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDependencyViewForAllMachinesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation GetDependencyViewForFocusedMachine(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetDependencyViewForFocusedMachineAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -162,11 +170,16 @@ public static partial class ArmDependencyMapModelFactory { public static Azure.ResourceManager.DependencyMap.DependencyMapData DependencyMapData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? dependencyMapProvisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?)) { throw null; } public static Azure.ResourceManager.DependencyMap.DependencyMapDiscoverySourceData DependencyMapDiscoverySourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch DependencyMapDiscoverySourcePatch(System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties DependencyMapDiscoverySourceProperties(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?), string sourceType = null, Azure.Core.ResourceIdentifier sourceId = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch DependencyMapPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter DependencyMapProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator @operator = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator), System.Collections.Generic.IEnumerable processNames = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent ExportDependenciesContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null, System.Collections.Generic.IEnumerable applianceNameList = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult ExportDependenciesOperationResult(string id = null, string name = null, string status = null, Azure.ResponseError error = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties properties = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties ExportDependenciesResultProperties(string exportedDataSasUri = null, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? statusCode = default(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode?), int? additionalInfoAvailableDaysCount = default(int?)) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, string processIdOnFocusedMachine = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.Core.ResourceIdentifier connectedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } + public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult GetDependencyViewForAllMachinesOperationResult(string id = null, string name = null, string status = null, Azure.ResponseError error = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string getDependencyViewForAllMachinesResultLayoutFileSasUri = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId = null, Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter filters = null) { throw null; } public static Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties OffAzureDiscoverySourceProperties(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? provisioningState = default(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState?), Azure.Core.ResourceIdentifier sourceId = null) { throw null; } } @@ -175,7 +188,10 @@ public partial class DependencyMapDateTimeFilter : System.ClientModel.Primitives public DependencyMapDateTimeFilter() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -186,7 +202,10 @@ public partial class DependencyMapDiscoverySourcePatch : System.ClientModel.Prim { public DependencyMapDiscoverySourcePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -195,10 +214,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public abstract partial class DependencyMapDiscoverySourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected DependencyMapDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) { } + internal DependencyMapDiscoverySourceProperties() { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -209,7 +231,10 @@ public partial class DependencyMapPatch : System.ClientModel.Primitives.IJsonMod { public DependencyMapPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -221,7 +246,10 @@ public partial class DependencyMapProcessNameFilter : System.ClientModel.Primiti public DependencyMapProcessNameFilter(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator @operator, System.Collections.Generic.IEnumerable processNames) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator Operator { get { throw null; } } public System.Collections.Generic.IList ProcessNames { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -243,6 +271,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilterOperator right) { throw null; } public override string ToString() { throw null; } } @@ -266,6 +295,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState left, Azure.ResourceManager.DependencyMap.Models.DependencyMapProvisioningState right) { throw null; } public override string ToString() { throw null; } } @@ -274,7 +304,10 @@ public partial class DependencyMapVisualizationFilter : System.ClientModel.Primi public DependencyMapVisualizationFilter() { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapDateTimeFilter DateTime { get { throw null; } set { } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -287,7 +320,10 @@ public ExportDependenciesContent() { } public System.Collections.Generic.IList ApplianceNameList { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -304,7 +340,10 @@ internal ExportDependenciesOperationResult() { } public Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties Properties { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -317,7 +356,10 @@ internal ExportDependenciesResultProperties() { } public int? AdditionalInfoAvailableDaysCount { get { throw null; } } public string ExportedDataSasUri { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? StatusCode { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.ExportDependenciesResultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -340,6 +382,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode left, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode right) { throw null; } public static implicit operator Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode left, Azure.ResourceManager.DependencyMap.Models.ExportDependenciesStatusCode right) { throw null; } public override string ToString() { throw null; } } @@ -349,7 +392,10 @@ public GetConnectionsForProcessOnFocusedMachineContent(Azure.Core.ResourceIdenti public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } public string ProcessIdOnFocusedMachine { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetConnectionsForProcessOnFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -362,19 +408,59 @@ public GetConnectionsWithConnectedMachineForFocusedMachineContent(Azure.Core.Res public Azure.Core.ResourceIdentifier ConnectedMachineId { get { throw null; } } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetConnectionsWithConnectedMachineForFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class GetDependencyViewForAllMachinesContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetDependencyViewForAllMachinesContent() { } + public Azure.ResourceManager.DependencyMap.Models.DependencyMapProcessNameFilter ProcessNameFilter { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GetDependencyViewForAllMachinesOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GetDependencyViewForAllMachinesOperationResult() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public string GetDependencyViewForAllMachinesResultLayoutFileSasUri { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string Status { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForAllMachinesOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class GetDependencyViewForFocusedMachineContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public GetDependencyViewForFocusedMachineContent(Azure.Core.ResourceIdentifier focusedMachineId) { } public Azure.ResourceManager.DependencyMap.Models.DependencyMapVisualizationFilter Filters { get { throw null; } set { } } public Azure.Core.ResourceIdentifier FocusedMachineId { get { throw null; } } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.GetDependencyViewForFocusedMachineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,8 +469,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class OffAzureDiscoverySourceProperties : Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public OffAzureDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) : base (default(Azure.Core.ResourceIdentifier)) { } + public OffAzureDiscoverySourceProperties(Azure.Core.ResourceIdentifier sourceId) { } + protected override Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.ResourceManager.DependencyMap.Models.DependencyMapDiscoverySourceProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DependencyMap.Models.OffAzureDiscoverySourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs index 3b0164a10d7b..6607951dfe42 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ArmDependencyMapModelFactory.cs @@ -8,68 +8,103 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; +using Azure.ResourceManager.DependencyMap; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.DependencyMap.Models { - /// Model factory for models. + /// A factory class for creating instances of the models for mocking. public static partial class ArmDependencyMapModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource-specific properties for this resource. + + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Resource tags. + /// The geo-location where the resource lives. + /// Provisioning state of Maps resource. /// A new instance for mocking. - public static DependencyMapData DependencyMapData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DependencyMapProvisioningState? dependencyMapProvisioningState = null) + public static DependencyMapData DependencyMapData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, DependencyMapProvisioningState? dependencyMapProvisioningState = default) { - tags ??= new Dictionary(); + tags ??= new ChangeTrackingDictionary(); return new DependencyMapData( id, name, resourceType, systemData, + additionalBinaryDataProperties: null, tags, location, - dependencyMapProvisioningState != null ? new DependencyMapProperties(dependencyMapProvisioningState, serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); + dependencyMapProvisioningState is null ? default : new DependencyMapProperties(dependencyMapProvisioningState, new Dictionary())); + } + + /// The type used for updating tags in MapsResource resources. + /// Resource tags. + /// A new instance for mocking. + public static DependencyMapPatch DependencyMapPatch(IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new DependencyMapPatch(tags, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// GetDependencyViewForFocusedMachine request model. /// Machine arm id. /// Filters for GetSingleMachineDependencyView. /// A new instance for mocking. - public static GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(ResourceIdentifier focusedMachineId = null, DependencyMapVisualizationFilter filters = null) + public static GetDependencyViewForFocusedMachineContent GetDependencyViewForFocusedMachineContent(ResourceIdentifier focusedMachineId = default, DependencyMapVisualizationFilter filters = default) { - return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, serializedAdditionalRawData: null); + return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, additionalBinaryDataProperties: null); + } + + /// Process name filter for dependency map visualization apis. + /// Operator for process name filter. + /// List of process names on which the operator should be applied. + /// A new instance for mocking. + public static DependencyMapProcessNameFilter DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator @operator = default, IEnumerable processNames = default) + { + processNames ??= new ChangeTrackingList(); + + return new DependencyMapProcessNameFilter(@operator, processNames.ToList(), additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// GetConnectionsWithConnectedMachineForFocusedMachine request model. /// Source machine arm id. /// Destination machine arm id. /// Filters for GetNetworkConnectionsBetweenMachines. /// A new instance for mocking. - public static GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(ResourceIdentifier focusedMachineId = null, ResourceIdentifier connectedMachineId = null, DependencyMapVisualizationFilter filters = null) + public static GetConnectionsWithConnectedMachineForFocusedMachineContent GetConnectionsWithConnectedMachineForFocusedMachineContent(ResourceIdentifier focusedMachineId = default, ResourceIdentifier connectedMachineId = default, DependencyMapVisualizationFilter filters = default) { - return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, serializedAdditionalRawData: null); + return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// GetConnectionsForProcessOnFocusedMachine request model. /// Machine arm id. /// Process id. /// Filters for GetProcessNetworkConnections. /// A new instance for mocking. - public static GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(ResourceIdentifier focusedMachineId = null, string processIdOnFocusedMachine = null, DependencyMapVisualizationFilter filters = null) + public static GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForProcessOnFocusedMachineContent(ResourceIdentifier focusedMachineId = default, string processIdOnFocusedMachine = default, DependencyMapVisualizationFilter filters = default) { - return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, serializedAdditionalRawData: null); + return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// ExportDependencies request model. + /// Machine arm id. + /// Filters for ExportDependencies. + /// List of Appliance Names. + /// A new instance for mocking. + public static ExportDependenciesContent ExportDependenciesContent(ResourceIdentifier focusedMachineId = default, DependencyMapVisualizationFilter filters = default, IEnumerable applianceNameList = default) + { + applianceNameList ??= new ChangeTrackingList(); + + return new ExportDependenciesContent(focusedMachineId, filters, applianceNameList.ToList(), additionalBinaryDataProperties: null); + } + + /// Model representing the result of the export dependencies asynchronous operation. /// The status URL of export dependencies operation. /// The resource name of the operation status. It must match the last segment of 'id' field. /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. @@ -78,7 +113,7 @@ public static GetConnectionsForProcessOnFocusedMachineContent GetConnectionsForP /// The end time of the operation. /// Properties for export dependencies. These should only be set if the status is Succeeded. /// A new instance for mocking. - public static ExportDependenciesOperationResult ExportDependenciesOperationResult(string id = null, string name = null, string status = null, ResponseError error = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ExportDependenciesResultProperties properties = null) + public static ExportDependenciesOperationResult ExportDependenciesOperationResult(string id = default, string name = default, string status = default, ResponseError error = default, DateTimeOffset? startOn = default, DateTimeOffset? endOn = default, ExportDependenciesResultProperties properties = default) { return new ExportDependenciesOperationResult( id, @@ -88,64 +123,93 @@ public static ExportDependenciesOperationResult ExportDependenciesOperationResul startOn, endOn, properties, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null); } - /// Initializes a new instance of . /// The SAS URI of the blob containing the exported dependencies data. /// A status code returned by the service with additional context about the export dependencies operation. - /// Additional information about the exported data. + /// Number of days for which data was available in the exported results. /// A new instance for mocking. - public static ExportDependenciesResultProperties ExportDependenciesResultProperties(string exportedDataSasUri = null, ExportDependenciesStatusCode? statusCode = null, int? additionalInfoAvailableDaysCount = null) + public static ExportDependenciesResultProperties ExportDependenciesResultProperties(string exportedDataSasUri = default, ExportDependenciesStatusCode? statusCode = default, int? additionalInfoAvailableDaysCount = default) { - return new ExportDependenciesResultProperties(exportedDataSasUri, statusCode, additionalInfoAvailableDaysCount != null ? new ExportDependenciesAdditionalInfo(additionalInfoAvailableDaysCount, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + return new ExportDependenciesResultProperties(exportedDataSasUri, statusCode, additionalInfoAvailableDaysCount is null ? default : new ExportDependenciesAdditionalInfo(additionalInfoAvailableDaysCount, new Dictionary()), additionalBinaryDataProperties: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The resource-specific properties for this resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// + /// The status URL of the asynchronous operation. + /// The resource name of the operation status. It must match the last segment of 'id' field. + /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. + /// Contains error details if status is Failed/Canceled. + /// The start time of the operation. + /// The end time of the operation. + /// The SAS URI of the blob containing the layout file for the multi-server view. + /// A new instance for mocking. + public static GetDependencyViewForAllMachinesOperationResult GetDependencyViewForAllMachinesOperationResult(string id = default, string name = default, string status = default, ResponseError error = default, DateTimeOffset? startOn = default, DateTimeOffset? endOn = default, string getDependencyViewForAllMachinesResultLayoutFileSasUri = default) + { + return new GetDependencyViewForAllMachinesOperationResult( + id, + name, + status, + error, + startOn, + endOn, + getDependencyViewForAllMachinesResultLayoutFileSasUri is null ? default : new GetDependencyViewForAllMachinesResultProperties(getDependencyViewForAllMachinesResultLayoutFileSasUri, new Dictionary()), + additionalBinaryDataProperties: null); + } + + /// A Discovery Source resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Resource tags. + /// The geo-location where the resource lives. + /// The resource-specific properties for this resource. /// A new instance for mocking. - public static DependencyMapDiscoverySourceData DependencyMapDiscoverySourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DependencyMapDiscoverySourceProperties properties = null) + public static DependencyMapDiscoverySourceData DependencyMapDiscoverySourceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, DependencyMapDiscoverySourceProperties properties = default) { - tags ??= new Dictionary(); + tags ??= new ChangeTrackingDictionary(); return new DependencyMapDiscoverySourceData( id, name, resourceType, systemData, + additionalBinaryDataProperties: null, tags, location, - properties, - serializedAdditionalRawData: null); + properties); } - /// Initializes a new instance of . + /// + /// The properties of Discovery Source resource + /// Please note this is the abstract base class. The derived classes available for instantiation are: . + /// /// Provisioning state of Discovery Source resource. /// Source type of Discovery Source resource. /// Source ArmId of Discovery Source resource. /// A new instance for mocking. - public static DependencyMapDiscoverySourceProperties DependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState = null, string sourceType = null, ResourceIdentifier sourceId = null) + public static DependencyMapDiscoverySourceProperties DependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState = default, string sourceType = default, ResourceIdentifier sourceId = default) { - return new UnknownDependencyMapDiscoverySourceProperties(provisioningState, sourceType == null ? default : new SourceType(sourceType), sourceId, serializedAdditionalRawData: null); + return new UnknownDependencyMapDiscoverySourceProperties(provisioningState, new SourceType(sourceType), sourceId, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// OffAzure discovery source resource properties. /// Provisioning state of Discovery Source resource. /// Source ArmId of Discovery Source resource. /// A new instance for mocking. - public static OffAzureDiscoverySourceProperties OffAzureDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState = null, ResourceIdentifier sourceId = null) + public static OffAzureDiscoverySourceProperties OffAzureDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState = default, ResourceIdentifier sourceId = default) { - return new OffAzureDiscoverySourceProperties(provisioningState, SourceType.OffAzure, sourceId, serializedAdditionalRawData: null); + return new OffAzureDiscoverySourceProperties(provisioningState, SourceType.OffAzure, sourceId, additionalBinaryDataProperties: null); + } + + /// The type used for updating tags in DiscoverySourceResource resources. + /// Resource tags. + /// A new instance for mocking. + public static DependencyMapDiscoverySourcePatch DependencyMapDiscoverySourcePatch(IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new DependencyMapDiscoverySourcePatch(tags, additionalBinaryDataProperties: null); } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapCollection.cs index 7a210eec2456..461bf8fd007e 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapCollection.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapCollection.cs @@ -8,68 +8,67 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DependencyMap { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDependencyMaps method from an instance of . + /// Each in the collection will belong to the same instance of a parent resource (TODO: add parent resource information). + /// To get a instance call the GetDependencyMaps method from an instance of the parent resource. /// public partial class DependencyMapCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _dependencyMapMapsClientDiagnostics; - private readonly MapsRestOperations _dependencyMapMapsRestClient; + private readonly ClientDiagnostics _mapsClientDiagnostics; + private readonly Maps _mapsRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of DependencyMapCollection for mocking. protected DependencyMapCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. + /// The identifier of the resource that is the target of operations. internal DependencyMapCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dependencyMapMapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DependencyMapResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DependencyMapResource.ResourceType, out string dependencyMapMapsApiVersion); - _dependencyMapMapsRestClient = new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dependencyMapMapsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(DependencyMapResource.ResourceType, out string dependencyMapApiVersion); + _mapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DependencyMapResource.ResourceType.Namespace, Diagnostics); + _mapsRestClient = new Maps(_mapsClientDiagnostics, Pipeline, Endpoint, dependencyMapApiVersion ?? "2025-07-01-preview"); + ValidateResourceId(id); } + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), id); + } } /// /// Create a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_CreateOrUpdate + /// Operation Id. + /// Maps_CreateOrUpdate. /// /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -77,21 +76,34 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Maps resource name. /// Resource create parameters. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string mapName, DependencyMapData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.CreateOrUpdate"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, data, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(new DependencyMapOperationSource(Client), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, DependencyMapData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapOperationSource(Client), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -105,20 +117,16 @@ public virtual async Task> CreateOrUpdateAsy /// Create a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_CreateOrUpdate + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_CreateOrUpdate. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -126,21 +134,34 @@ public virtual async Task> CreateOrUpdateAsy /// Maps resource name. /// Resource create parameters. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string mapName, DependencyMapData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.CreateOrUpdate"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.CreateOrUpdate"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, mapName, data, cancellationToken); - var operation = new DependencyMapArmOperation(new DependencyMapOperationSource(Client), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, DependencyMapData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapOperationSource(Client), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -154,38 +175,42 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> GetAsync(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.Get"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.Get"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -199,38 +224,42 @@ public virtual async Task> GetAsync(string mapNa /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual Response Get(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.Get"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.Get"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -240,100 +269,78 @@ public virtual Response Get(string mapName, CancellationT } } - /// - /// List MapsResource resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List MapsResource resources by resource group. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dependencyMapMapsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dependencyMapMapsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DependencyMapResource(Client, DependencyMapData.DeserializeDependencyMapData(e)), _dependencyMapMapsClientDiagnostics, Pipeline, "DependencyMapCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new MapsGetByResourceGroupAsyncCollectionResultOfT(_mapsRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new DependencyMapResource(Client, data)); } - /// - /// List MapsResource resources by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List MapsResource resources by resource group. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dependencyMapMapsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dependencyMapMapsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DependencyMapResource(Client, DependencyMapData.DeserializeDependencyMapData(e)), _dependencyMapMapsClientDiagnostics, Pipeline, "DependencyMapCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new MapsGetByResourceGroupCollectionResultOfT(_mapsRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new DependencyMapResource(Client, data)); } /// - /// Checks to see if the resource exists in azure. + /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Get + /// Operation Id. + /// Maps_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> ExistsAsync(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.Exists"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.Exists"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -344,39 +351,53 @@ public virtual async Task> ExistsAsync(string mapName, Cancellati } /// - /// Checks to see if the resource exists in azure. + /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual Response Exists(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.Exists"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.Exists"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -387,41 +408,57 @@ public virtual Response Exists(string mapName, CancellationToken cancellat } /// - /// Tries to get details for this resource from the service. + /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> GetIfExistsAsync(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.GetIfExists"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.GetIfExists"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -432,41 +469,57 @@ public virtual async Task> GetIfExistsAs } /// - /// Tries to get details for this resource from the service. + /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// Maps resource name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual NullableResponse GetIfExists(string mapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapCollection.GetIfExists"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapCollection.GetIfExists"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, mapName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, mapName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -486,6 +539,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } + /// The cancellation token to use. IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.Serialization.cs index 9a407ddac4a9..c0c94d3979bf 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.Serialization.cs @@ -10,16 +10,23 @@ using System.Collections.Generic; using System.Text; using System.Text.Json; +using Azure; using Azure.Core; using Azure.ResourceManager.DependencyMap.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.DependencyMap { - public partial class DependencyMapData : IUtf8JsonSerializable, IJsonModel + /// A Maps resource. + public partial class DependencyMapData : TrackedResourceData, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal DependencyMapData() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,12 +38,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { @@ -45,110 +51,131 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DependencyMapData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapData)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapData(document.RootElement, options); } - internal static DependencyMapData DeserializeDependencyMapData(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapData DeserializeDependencyMapData(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - DependencyMapProperties properties = default; - IDictionary tags = default; - AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + ResourceType resourceType = default; SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary tags = default; + AzureLocation location = default; + DependencyMapProperties properties = default; + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = DependencyMapProperties.DeserializeDependencyMapProperties(property.Value, options); + id = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + name = prop.Value.GetString(); continue; } - if (property.NameEquals("location"u8)) + if (prop.NameEquals("type"u8)) { - location = new AzureLocation(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("systemData"u8)) { - id = new ResourceIdentifier(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("tags"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("location"u8)) { - type = new ResourceType(property.Value.GetString()); + location = new AzureLocation(prop.Value.GetString()); continue; } - if (property.NameEquals("systemData"u8)) + if (prop.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); + properties = DependencyMapProperties.DeserializeDependencyMapProperties(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new DependencyMapData( id, name, - type, + resourceType, systemData, + additionalBinaryDataProperties, tags ?? new ChangeTrackingDictionary(), location, - properties, - serializedAdditionalRawData); + properties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,15 +185,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - DependencyMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DependencyMapData)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapData(document.RootElement, options); } default: @@ -174,6 +206,27 @@ DependencyMapData IPersistableModel.Create(BinaryData data, M } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DependencyMapData dependencyMapData) + { + if (dependencyMapData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dependencyMapData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static DependencyMapData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDependencyMapData(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.cs index 0244b57213e8..1026086af048 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapData.cs @@ -13,76 +13,43 @@ namespace Azure.ResourceManager.DependencyMap { - /// - /// A class representing the DependencyMap data model. - /// A Maps resource - /// + /// A Maps resource. public partial class DependencyMapData : TrackedResourceData { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The location. + /// The geo-location where the resource lives. public DependencyMapData(AzureLocation location) : base(location) { } /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource tags. + /// The geo-location where the resource lives. /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal DependencyMapData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DependencyMapProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DependencyMapData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, DependencyMapProperties properties) : base(id, name, resourceType, systemData, tags, location) { + _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DependencyMapData() - { } /// The resource-specific properties for this resource. internal DependencyMapProperties Properties { get; set; } + /// Provisioning state of Maps resource. public DependencyMapProvisioningState? DependencyMapProvisioningState { - get => Properties is null ? default : Properties.ProvisioningState; + get + { + return Properties is null ? default : Properties.ProvisioningState; + } } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceCollection.cs index fe66f4fc9323..718183562496 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceCollection.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceCollection.cs @@ -8,67 +8,66 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.DependencyMap { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDependencyMapDiscoverySources method from an instance of . + /// Each in the collection will belong to the same instance of a parent resource (TODO: add parent resource information). + /// To get a instance call the GetDependencyMapDiscoverySources method from an instance of the parent resource. /// public partial class DependencyMapDiscoverySourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics; - private readonly DiscoverySourcesRestOperations _dependencyMapDiscoverySourceDiscoverySourcesRestClient; + private readonly ClientDiagnostics _discoverySourcesClientDiagnostics; + private readonly DiscoverySources _discoverySourcesRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of DependencyMapDiscoverySourceCollection for mocking. protected DependencyMapDiscoverySourceCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. + /// The identifier of the resource that is the target of operations. internal DependencyMapDiscoverySourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DependencyMapDiscoverySourceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DependencyMapDiscoverySourceResource.ResourceType, out string dependencyMapDiscoverySourceDiscoverySourcesApiVersion); - _dependencyMapDiscoverySourceDiscoverySourcesRestClient = new DiscoverySourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dependencyMapDiscoverySourceDiscoverySourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(DependencyMapDiscoverySourceResource.ResourceType, out string dependencyMapDiscoverySourceApiVersion); + _discoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DependencyMapDiscoverySourceResource.ResourceType.Namespace, Diagnostics); + _discoverySourcesRestClient = new DiscoverySources(_discoverySourcesClientDiagnostics, Pipeline, Endpoint, dependencyMapDiscoverySourceApiVersion ?? "2025-07-01-preview"); + ValidateResourceId(id); } + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != DependencyMapResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DependencyMapResource.ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, DependencyMapResource.ResourceType), id); + } } /// /// Create a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_CreateOrUpdate + /// Operation Id. + /// DiscoverySources_CreateOrUpdate. /// /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -76,21 +75,34 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// discovery source resource. /// Resource create parameters. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sourceName, DependencyMapDiscoverySourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.CreateOrUpdate"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(new DependencyMapDiscoverySourceOperationSource(Client), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, DependencyMapDiscoverySourceData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapDiscoverySourceOperationSource(Client), + _discoverySourcesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -104,20 +116,16 @@ public virtual async Task> Cr /// Create a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_CreateOrUpdate + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_CreateOrUpdate. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -125,21 +133,34 @@ public virtual async Task> Cr /// discovery source resource. /// Resource create parameters. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sourceName, DependencyMapDiscoverySourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.CreateOrUpdate"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data, cancellationToken); - var operation = new DependencyMapArmOperation(new DependencyMapDiscoverySourceOperationSource(Client), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, DependencyMapDiscoverySourceData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapDiscoverySourceOperationSource(Client), + _discoverySourcesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -153,38 +174,42 @@ public virtual ArmOperation CreateOrUpdate /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> GetAsync(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Get"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Get"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -198,38 +223,42 @@ public virtual async Task> GetAsy /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual Response Get(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Get"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Get"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -239,100 +268,78 @@ public virtual Response Get(string sourceN } } - /// - /// List DiscoverySourceResource resources by MapsResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources - /// - /// - /// Operation Id - /// DiscoverySourceResource_ListByMapsResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List DiscoverySourceResource resources by MapsResource. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateListByMapsResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateListByMapsResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DependencyMapDiscoverySourceResource(Client, DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(e)), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, "DependencyMapDiscoverySourceCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT(_discoverySourcesRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new DependencyMapDiscoverySourceResource(Client, data)); } - /// - /// List DiscoverySourceResource resources by MapsResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources - /// - /// - /// Operation Id - /// DiscoverySourceResource_ListByMapsResource - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List DiscoverySourceResource resources by MapsResource. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateListByMapsResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateListByMapsResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DependencyMapDiscoverySourceResource(Client, DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(e)), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, "DependencyMapDiscoverySourceCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new DiscoverySourcesGetByMapsResourceCollectionResultOfT(_discoverySourcesRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new DependencyMapDiscoverySourceResource(Client, data)); } /// - /// Checks to see if the resource exists in azure. + /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> ExistsAsync(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Exists"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Exists"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapDiscoverySourceData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -343,39 +350,53 @@ public virtual async Task> ExistsAsync(string sourceName, Cancell } /// - /// Checks to see if the resource exists in azure. + /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual Response Exists(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Exists"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.Exists"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapDiscoverySourceData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -386,41 +407,57 @@ public virtual Response Exists(string sourceName, CancellationToken cancel } /// - /// Tries to get details for this resource from the service. + /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> GetIfExistsAsync(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetIfExists"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetIfExists"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapDiscoverySourceData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -431,41 +468,57 @@ public virtual async Task } /// - /// Tries to get details for this resource from the service. + /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// /// discovery source resource. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. + /// is an empty string, and was expected to be non-empty. public virtual NullableResponse GetIfExists(string sourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetIfExists"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetIfExists"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DependencyMapDiscoverySourceData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -485,6 +538,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } + /// The cancellation token to use. IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.Serialization.cs index 19cc30063c9b..68b84538a1e0 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.Serialization.cs @@ -10,16 +10,23 @@ using System.Collections.Generic; using System.Text; using System.Text.Json; +using Azure; using Azure.Core; using Azure.ResourceManager.DependencyMap.Models; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.DependencyMap { - public partial class DependencyMapDiscoverySourceData : IUtf8JsonSerializable, IJsonModel + /// A Discovery Source resource. + public partial class DependencyMapDiscoverySourceData : TrackedResourceData, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal DependencyMapDiscoverySourceData() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,12 +38,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, M /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { @@ -45,110 +51,131 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DependencyMapDiscoverySourceData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceData)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapDiscoverySourceData(document.RootElement, options); } - internal static DependencyMapDiscoverySourceData DeserializeDependencyMapDiscoverySourceData(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapDiscoverySourceData DeserializeDependencyMapDiscoverySourceData(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - DependencyMapDiscoverySourceProperties properties = default; - IDictionary tags = default; - AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + ResourceType resourceType = default; SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary tags = default; + AzureLocation location = default; + DependencyMapDiscoverySourceProperties properties = default; + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = DependencyMapDiscoverySourceProperties.DeserializeDependencyMapDiscoverySourceProperties(property.Value, options); + id = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + name = prop.Value.GetString(); continue; } - if (property.NameEquals("location"u8)) + if (prop.NameEquals("type"u8)) { - location = new AzureLocation(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("systemData"u8)) { - id = new ResourceIdentifier(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("tags"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("location"u8)) { - type = new ResourceType(property.Value.GetString()); + location = new AzureLocation(prop.Value.GetString()); continue; } - if (property.NameEquals("systemData"u8)) + if (prop.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); + properties = DependencyMapDiscoverySourceProperties.DeserializeDependencyMapDiscoverySourceProperties(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new DependencyMapDiscoverySourceData( id, name, - type, + resourceType, systemData, + additionalBinaryDataProperties, tags ?? new ChangeTrackingDictionary(), location, - properties, - serializedAdditionalRawData); + properties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -158,15 +185,20 @@ BinaryData IPersistableModel.Write(ModelReader } } - DependencyMapDiscoverySourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DependencyMapDiscoverySourceData)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapDiscoverySourceData(document.RootElement, options); } default: @@ -174,6 +206,27 @@ DependencyMapDiscoverySourceData IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DependencyMapDiscoverySourceData dependencyMapDiscoverySourceData) + { + if (dependencyMapDiscoverySourceData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dependencyMapDiscoverySourceData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static DependencyMapDiscoverySourceData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDependencyMapDiscoverySourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.cs index 610fdccec3e7..f712bdc3cf7d 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceData.cs @@ -13,79 +13,34 @@ namespace Azure.ResourceManager.DependencyMap { - /// - /// A class representing the DependencyMapDiscoverySource data model. - /// A Discovery Source resource - /// + /// A Discovery Source resource. public partial class DependencyMapDiscoverySourceData : TrackedResourceData { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The location. + /// The geo-location where the resource lives. public DependencyMapDiscoverySourceData(AzureLocation location) : base(location) { } /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// - /// The resource-specific properties for this resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// Keeps track of any properties unknown to the library. - internal DependencyMapDiscoverySourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DependencyMapDiscoverySourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource tags. + /// The geo-location where the resource lives. + /// The resource-specific properties for this resource. + internal DependencyMapDiscoverySourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, DependencyMapDiscoverySourceProperties properties) : base(id, name, resourceType, systemData, tags, location) { + _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DependencyMapDiscoverySourceData() - { - } - - /// - /// The resource-specific properties for this resource. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// + /// The resource-specific properties for this resource. public DependencyMapDiscoverySourceProperties Properties { get; set; } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs index afe016a2567e..d6ce7fe9712b 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs @@ -11,19 +11,29 @@ namespace Azure.ResourceManager.DependencyMap { + /// public partial class DependencyMapDiscoverySourceResource : IJsonModel { - private static DependencyMapDiscoverySourceData s_dataDeserializationInstance; - private static DependencyMapDiscoverySourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static IJsonModel s_dataDeserializationInstance; + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DependencyMapDiscoverySourceData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + /// The reader for deserializing the model. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + /// The client options for reading and writing models. BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDependencyMapContext.Default); + /// The binary data to be processed. + /// The client options for reading and writing models. DependencyMapDiscoverySourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDependencyMapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.cs index c43a7092ffa8..38fddb956dd6 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.cs @@ -7,47 +7,37 @@ using System; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.DependencyMap.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DependencyMap { /// - /// A Class representing a DependencyMapDiscoverySource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDependencyMapDiscoverySourceResource method. - /// Otherwise you can get one from its parent resource using the GetDependencyMapDiscoverySource method. + /// A class representing a DependencyMapDiscoverySource along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetDependencyMapDiscoverySources method. /// public partial class DependencyMapDiscoverySourceResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The mapName. - /// The sourceName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName, string sourceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics; - private readonly DiscoverySourcesRestOperations _dependencyMapDiscoverySourceDiscoverySourcesRestClient; + private readonly ClientDiagnostics _discoverySourcesClientDiagnostics; + private readonly DiscoverySources _discoverySourcesRestClient; private readonly DependencyMapDiscoverySourceData _data; - /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.DependencyMap/maps/discoverySources"; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of DependencyMapDiscoverySourceResource for mocking. protected DependencyMapDiscoverySourceResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The resource that is the target of operations. internal DependencyMapDiscoverySourceResource(ArmClient client, DependencyMapDiscoverySourceData data) : this(client, data.Id) @@ -56,71 +46,93 @@ internal DependencyMapDiscoverySourceResource(ArmClient client, DependencyMapDis _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal DependencyMapDiscoverySourceResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dependencyMapDiscoverySourceDiscoverySourcesApiVersion); - _dependencyMapDiscoverySourceDiscoverySourcesRestClient = new DiscoverySourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dependencyMapDiscoverySourceDiscoverySourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(ResourceType, out string dependencyMapDiscoverySourceApiVersion); + _discoverySourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); + _discoverySourcesRestClient = new DiscoverySources(_discoverySourcesClientDiagnostics, Pipeline, Endpoint, dependencyMapDiscoverySourceApiVersion ?? "2025-07-01-preview"); + ValidateResourceId(id); } /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. public virtual DependencyMapDiscoverySourceData Data { get { if (!HasData) + { throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } return _data; } } + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The mapName. + /// The sourceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } } /// /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Get"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Get"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -134,33 +146,41 @@ public virtual async Task> GetAsy /// Get a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Get + /// Operation Id. + /// DiscoverySources_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Get"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Get"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -171,38 +191,55 @@ public virtual Response Get(CancellationTo } /// - /// Delete a DiscoverySourceResource + /// Update a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Delete + /// Operation Id. + /// DiscoverySources_Update. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) { - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Update"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(_dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, DependencyMapDiscoverySourcePatch.ToRequestContent(patch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapDiscoverySourceOperationSource(Client), + _discoverySourcesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -213,38 +250,55 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a DiscoverySourceResource + /// Update a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Delete + /// Operation Id. + /// DiscoverySources_Update. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) { - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Update"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DependencyMapArmOperation(_dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, DependencyMapDiscoverySourcePatch.ToRequestContent(patch), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapDiscoverySourceOperationSource(Client), + _discoverySourcesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + { + operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -255,42 +309,45 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update a DiscoverySourceResource + /// Delete a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Update + /// Operation Id. + /// DiscoverySources_Delete. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Update"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Delete"); scope.Start(); try { - var response = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(new DependencyMapDiscoverySourceOperationSource(Client), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_discoverySourcesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -301,42 +358,45 @@ public virtual async Task> Up } /// - /// Update a DiscoverySourceResource + /// Delete a DiscoverySourceResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName}. /// /// - /// Operation Id - /// DiscoverySourceResource_Update + /// Operation Id. + /// DiscoverySources_Delete. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Update"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.Delete"); scope.Start(); try { - var response = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new DependencyMapArmOperation(new DependencyMapDiscoverySourceOperationSource(Client), _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics, Pipeline, _dependencyMapDiscoverySourceDiscoverySourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_discoverySourcesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + { + operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -346,27 +406,7 @@ public virtual ArmOperation Update(WaitUnt } } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -376,28 +416,34 @@ public virtual async Task> AddTag Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.AddTag"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.AddTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); - foreach (var tag in current.Tags) + DependencyMapDiscoverySourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -408,27 +454,7 @@ public virtual async Task> AddTag } } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -438,28 +464,34 @@ public virtual Response AddTag(string key, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.AddTag"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.AddTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); - foreach (var tag in current.Tags) + DependencyMapDiscoverySourceData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -470,53 +502,39 @@ public virtual Response AddTag(string key, } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.SetTags"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.SetTags"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); + DependencyMapDiscoverySourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -527,53 +545,39 @@ public virtual async Task> SetTag } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.SetTags"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.SetTags"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); + GetTagResource().Delete(WaitUntil.Completed, cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); + DependencyMapDiscoverySourceData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -584,27 +588,7 @@ public virtual Response SetTags(IDictionar } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -612,28 +596,34 @@ public virtual async Task> Remove { Argument.AssertNotNull(key, nameof(key)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.RemoveTag"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.RemoveTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapDiscoverySourceDiscoverySourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); - foreach (var tag in current.Tags) + DependencyMapDiscoverySourceData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -644,27 +634,7 @@ public virtual async Task> Remove } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -672,28 +642,34 @@ public virtual Response RemoveTag(string k { Argument.AssertNotNull(key, nameof(key)); - using var scope = _dependencyMapDiscoverySourceDiscoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.RemoveTag"); + using DiagnosticScope scope = _discoverySourcesClientDiagnostics.CreateScope("DependencyMapDiscoverySourceResource.RemoveTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapDiscoverySourceDiscoverySourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _discoverySourcesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapDiscoverySourceData.FromResponse(result), result); + return Response.FromValue(new DependencyMapDiscoverySourceResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapDiscoverySourcePatch(); - foreach (var tag in current.Tags) + DependencyMapDiscoverySourceData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs index a099cf09ae8e..a843472123e8 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs @@ -11,19 +11,29 @@ namespace Azure.ResourceManager.DependencyMap { + /// public partial class DependencyMapResource : IJsonModel { - private static DependencyMapData s_dataDeserializationInstance; - private static DependencyMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static IJsonModel s_dataDeserializationInstance; + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DependencyMapData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + /// The reader for deserializing the model. + /// The client options for reading and writing models. + DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + /// The client options for reading and writing models. BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDependencyMapContext.Default); + /// The binary data to be processed. + /// The client options for reading and writing models. DependencyMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDependencyMapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.cs index 6d9d18ed34e2..1bfc51a53e13 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.cs @@ -7,47 +7,37 @@ using System; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.DependencyMap.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DependencyMap { /// - /// A Class representing a DependencyMap along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDependencyMapResource method. - /// Otherwise you can get one from its parent resource using the GetDependencyMap method. + /// A class representing a DependencyMap along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetDependencyMaps method. /// public partial class DependencyMapResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The mapName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dependencyMapMapsClientDiagnostics; - private readonly MapsRestOperations _dependencyMapMapsRestClient; + private readonly ClientDiagnostics _mapsClientDiagnostics; + private readonly Maps _mapsRestClient; private readonly DependencyMapData _data; - /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.DependencyMap/maps"; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of DependencyMapResource for mocking. protected DependencyMapResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The resource that is the target of operations. internal DependencyMapResource(ArmClient client, DependencyMapData data) : this(client, data.Id) @@ -56,140 +46,92 @@ internal DependencyMapResource(ArmClient client, DependencyMapData data) : this( _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal DependencyMapResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _dependencyMapMapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dependencyMapMapsApiVersion); - _dependencyMapMapsRestClient = new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dependencyMapMapsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(ResourceType, out string dependencyMapApiVersion); + _mapsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DependencyMap", ResourceType.Namespace, Diagnostics); + _mapsRestClient = new Maps(_mapsClientDiagnostics, Pipeline, Endpoint, dependencyMapApiVersion ?? "2025-07-01-preview"); + ValidateResourceId(id); } /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. public virtual DependencyMapData Data { get { if (!HasData) + { throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } return _data; } } - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of DependencyMapDiscoverySourceResources in the DependencyMap. - /// An object representing collection of DependencyMapDiscoverySourceResources and their operations over a DependencyMapDiscoverySourceResource. - public virtual DependencyMapDiscoverySourceCollection GetDependencyMapDiscoverySources() - { - return GetCachedClient(client => new DependencyMapDiscoverySourceCollection(client, Id)); - } - - /// - /// Get a DiscoverySourceResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// discovery source resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetDependencyMapDiscoverySourceAsync(string sourceName, CancellationToken cancellationToken = default) + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The mapName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string mapName) { - return await GetDependencyMapDiscoverySources().GetAsync(sourceName, cancellationToken).ConfigureAwait(false); + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}"; + return new ResourceIdentifier(resourceId); } - /// - /// Get a DiscoverySourceResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/discoverySources/{sourceName} - /// - /// - /// Operation Id - /// DiscoverySourceResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// discovery source resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetDependencyMapDiscoverySource(string sourceName, CancellationToken cancellationToken = default) + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) { - return GetDependencyMapDiscoverySources().Get(sourceName, cancellationToken); + if (id.ResourceType != ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } } /// /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Get + /// Operation Id. + /// Maps_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Get"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Get"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -203,33 +145,41 @@ public virtual async Task> GetAsync(Cancellation /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Get + /// Operation Id. + /// Maps_Get. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Get"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Get"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -240,38 +190,55 @@ public virtual Response Get(CancellationToken cancellatio } /// - /// Delete a MapsResource + /// Update a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Delete + /// Operation Id. + /// Maps_Update. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DependencyMapPatch patch, CancellationToken cancellationToken = default) { - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Update"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, DependencyMapPatch.ToRequestContent(patch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapOperationSource(Client), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -282,38 +249,55 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete a MapsResource + /// Update a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Delete + /// Operation Id. + /// Maps_Update. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DependencyMapPatch patch, CancellationToken cancellationToken = default) { - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Delete"); + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Update"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, DependencyMapPatch.ToRequestContent(patch), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new DependencyMapOperationSource(Client), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + { + operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -324,42 +308,45 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update a MapsResource + /// Delete a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Update + /// Operation Id. + /// Maps_Delete. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DependencyMapPatch patch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Update"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Delete"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(new DependencyMapOperationSource(Client), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -370,42 +357,45 @@ public virtual async Task> UpdateAsync(WaitU } /// - /// Update a MapsResource + /// Delete a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Operation Id - /// MapsResource_Update + /// Operation Id. + /// Maps_Delete. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DependencyMapPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.Update"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.Delete"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DependencyMapArmOperation(new DependencyMapOperationSource(Client), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + { + operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -419,20 +409,20 @@ public virtual ArmOperation Update(WaitUntil waitUntil, D /// Get dependency map of single machine /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine. /// /// - /// Operation Id - /// Maps_GetDependencyViewForFocusedMachine + /// Operation Id. + /// Maps_GetDependencyViewForFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -444,14 +434,21 @@ public virtual async Task GetDependencyViewForFocusedMachineAsync( { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForFocusedMachine"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetDependencyViewForFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetDependencyViewForFocusedMachineContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -465,20 +462,20 @@ public virtual async Task GetDependencyViewForFocusedMachineAsync( /// Get dependency map of single machine /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForFocusedMachine. /// /// - /// Operation Id - /// Maps_GetDependencyViewForFocusedMachine + /// Operation Id. + /// Maps_GetDependencyViewForFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -490,14 +487,21 @@ public virtual ArmOperation GetDependencyViewForFocusedMachine(WaitUntil waitUnt { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForFocusedMachine"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.GetDependencyViewForFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetDependencyViewForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetDependencyViewForFocusedMachineContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -511,20 +515,20 @@ public virtual ArmOperation GetDependencyViewForFocusedMachine(WaitUntil waitUnt /// Get network connections between machines /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine. /// /// - /// Operation Id - /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine + /// Operation Id. + /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -536,14 +540,21 @@ public virtual async Task GetConnectionsWithConnectedMachineForFoc { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsWithConnectedMachineForFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsWithConnectedMachineForFocusedMachine"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetConnectionsWithConnectedMachineForFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetConnectionsWithConnectedMachineForFocusedMachineContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -557,20 +568,20 @@ public virtual async Task GetConnectionsWithConnectedMachineForFoc /// Get network connections between machines /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsWithConnectedMachineForFocusedMachine. /// /// - /// Operation Id - /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine + /// Operation Id. + /// Maps_GetConnectionsWithConnectedMachineForFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -582,14 +593,21 @@ public virtual ArmOperation GetConnectionsWithConnectedMachineForFocusedMachine( { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsWithConnectedMachineForFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsWithConnectedMachineForFocusedMachine"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.GetConnectionsWithConnectedMachineForFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetConnectionsWithConnectedMachineForFocusedMachineContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -603,20 +621,20 @@ public virtual ArmOperation GetConnectionsWithConnectedMachineForFocusedMachine( /// Get network connections of a process /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine. /// /// - /// Operation Id - /// Maps_GetConnectionsForProcessOnFocusedMachine + /// Operation Id. + /// Maps_GetConnectionsForProcessOnFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -628,14 +646,21 @@ public virtual async Task GetConnectionsForProcessOnFocusedMachine { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsForProcessOnFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsForProcessOnFocusedMachine"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.GetConnectionsForProcessOnFocusedMachineAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetConnectionsForProcessOnFocusedMachineContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -649,20 +674,20 @@ public virtual async Task GetConnectionsForProcessOnFocusedMachine /// Get network connections of a process /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getConnectionsForProcessOnFocusedMachine. /// /// - /// Operation Id - /// Maps_GetConnectionsForProcessOnFocusedMachine + /// Operation Id. + /// Maps_GetConnectionsForProcessOnFocusedMachine. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -674,14 +699,21 @@ public virtual ArmOperation GetConnectionsForProcessOnFocusedMachine(WaitUntil w { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsForProcessOnFocusedMachine"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetConnectionsForProcessOnFocusedMachine"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.GetConnectionsForProcessOnFocusedMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DependencyMapArmOperation(_dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetConnectionsForProcessOnFocusedMachineRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetConnectionsForProcessOnFocusedMachineContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation(_mapsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -695,20 +727,20 @@ public virtual ArmOperation GetConnectionsForProcessOnFocusedMachine(WaitUntil w /// Export dependencies /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies. /// /// - /// Operation Id - /// Maps_ExportDependencies + /// Operation Id. + /// Maps_ExportDependencies. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -720,14 +752,27 @@ public virtual async Task> Expor { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.ExportDependencies"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.ExportDependencies"); scope.Start(); try { - var response = await _dependencyMapMapsRestClient.ExportDependenciesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new DependencyMapArmOperation(new ExportDependenciesOperationResultOperationSource(), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ExportDependenciesContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new ExportDependenciesOperationResultOperationSource(), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -741,20 +786,20 @@ public virtual async Task> Expor /// Export dependencies /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/exportDependencies. /// /// - /// Operation Id - /// Maps_ExportDependencies + /// Operation Id. + /// Maps_ExportDependencies. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -766,14 +811,27 @@ public virtual ArmOperation ExportDependencie { Argument.AssertNotNull(content, nameof(content)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.ExportDependencies"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.ExportDependencies"); scope.Start(); try { - var response = _dependencyMapMapsRestClient.ExportDependencies(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new DependencyMapArmOperation(new ExportDependenciesOperationResultOperationSource(), _dependencyMapMapsClientDiagnostics, Pipeline, _dependencyMapMapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateExportDependenciesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ExportDependenciesContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new ExportDependenciesOperationResultOperationSource(), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -784,26 +842,124 @@ public virtual ArmOperation ExportDependencie } /// - /// Add a tag to the current resource. + /// Get dependencies for all machines /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForAllMachines. /// /// - /// Operation Id - /// MapsResource_Get + /// Operation Id. + /// Maps_GetDependencyViewForAllMachines. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Default Api Version. + /// 2025-07-01-preview. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetDependencyViewForAllMachinesAsync(WaitUntil waitUntil, GetDependencyViewForAllMachinesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForAllMachines"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetDependencyViewForAllMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetDependencyViewForAllMachinesContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new GetDependencyViewForAllMachinesOperationResultOperationSource(), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get dependencies for all machines + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}/getDependencyViewForAllMachines. + /// + /// + /// Operation Id. + /// Maps_GetDependencyViewForAllMachines. + /// + /// + /// Default Api Version. + /// 2025-07-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation GetDependencyViewForAllMachines(WaitUntil waitUntil, GetDependencyViewForAllMachinesContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.GetDependencyViewForAllMachines"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetDependencyViewForAllMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, GetDependencyViewForAllMachinesContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + DependencyMapArmOperation operation = new DependencyMapArmOperation( + new GetDependencyViewForAllMachinesOperationResultOperationSource(), + _mapsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -813,28 +969,34 @@ public virtual async Task> AddTagAsync(string ke Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.AddTag"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.AddTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapPatch(); - foreach (var tag in current.Tags) + DependencyMapData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -845,27 +1007,7 @@ public virtual async Task> AddTagAsync(string ke } } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -875,28 +1017,34 @@ public virtual Response AddTag(string key, string value, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.AddTag"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.AddTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapPatch(); - foreach (var tag in current.Tags) + DependencyMapData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -907,53 +1055,39 @@ public virtual Response AddTag(string key, string value, } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.SetTags"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.SetTags"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapPatch(); + DependencyMapData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -964,53 +1098,39 @@ public virtual async Task> SetTagsAsync(IDiction } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.SetTags"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.SetTags"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); + GetTagResource().Delete(WaitUntil.Completed, cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapPatch(); + DependencyMapData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -1021,27 +1141,7 @@ public virtual Response SetTags(IDictionary - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -1049,28 +1149,34 @@ public virtual async Task> RemoveTagAsync(string { Argument.AssertNotNull(key, nameof(key)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.RemoveTag"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.RemoveTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _dependencyMapMapsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DependencyMapPatch(); - foreach (var tag in current.Tags) + DependencyMapData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -1081,27 +1187,7 @@ public virtual async Task> RemoveTagAsync(string } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -1109,28 +1195,34 @@ public virtual Response RemoveTag(string key, Cancellatio { Argument.AssertNotNull(key, nameof(key)); - using var scope = _dependencyMapMapsClientDiagnostics.CreateScope("DependencyMapResource.RemoveTag"); + using DiagnosticScope scope = _mapsClientDiagnostics.CreateScope("DependencyMapResource.RemoveTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _dependencyMapMapsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new DependencyMapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _mapsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DependencyMapData.FromResponse(result), result); + return Response.FromValue(new DependencyMapResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DependencyMapPatch(); - foreach (var tag in current.Tags) + DependencyMapData current = Get(cancellationToken: cancellationToken).Value.Data; + DependencyMapPatch patch = new DependencyMapPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -1140,5 +1232,38 @@ public virtual Response RemoveTag(string key, Cancellatio throw; } } + + /// Gets a collection of DependencyMapDiscoverySources in the . + /// An object representing collection of DependencyMapDiscoverySources and their operations over a DependencyMapDiscoverySourceResource. + public virtual DependencyMapDiscoverySourceCollection GetDependencyMapDiscoverySources() + { + return GetCachedClient(client => new DependencyMapDiscoverySourceCollection(client, Id)); + } + + /// Get a DiscoverySourceResource. + /// discovery source resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDependencyMapDiscoverySourceAsync(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + return await GetDependencyMapDiscoverySources().GetAsync(sourceName, cancellationToken).ConfigureAwait(false); + } + + /// Get a DiscoverySourceResource. + /// discovery source resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDependencyMapDiscoverySource(string sourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + + return GetDependencyMapDiscoverySources().Get(sourceName, cancellationToken); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..5359050b167a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT : AsyncPageable + { + private readonly DiscoverySources _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _mapName; + private readonly RequestContext _context; + + /// Initializes a new instance of DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The DiscoverySources client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT(DiscoverySources client, string subscriptionId, string resourceGroupName, string mapName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _mapName = mapName; + _context = context; + } + + /// Gets the pages of DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of DiscoverySourcesGetByMapsResourceAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + DiscoverySourceResourceListResult result = DiscoverySourceResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByMapsResourceRequest(nextLink, _subscriptionId, _resourceGroupName, _mapName, _context) : _client.CreateGetByMapsResourceRequest(_subscriptionId, _resourceGroupName, _mapName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceCollectionResultOfT.cs new file mode 100644 index 000000000000..dc3907287498 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DiscoverySourcesGetByMapsResourceCollectionResultOfT.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class DiscoverySourcesGetByMapsResourceCollectionResultOfT : Pageable + { + private readonly DiscoverySources _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _mapName; + private readonly RequestContext _context; + + /// Initializes a new instance of DiscoverySourcesGetByMapsResourceCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The DiscoverySources client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Maps resource name. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public DiscoverySourcesGetByMapsResourceCollectionResultOfT(DiscoverySources client, string subscriptionId, string resourceGroupName, string mapName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _mapName = mapName; + _context = context; + } + + /// Gets the pages of DiscoverySourcesGetByMapsResourceCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of DiscoverySourcesGetByMapsResourceCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + DiscoverySourceResourceListResult result = DiscoverySourceResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByMapsResourceRequest(nextLink, _subscriptionId, _resourceGroupName, _mapName, _context) : _client.CreateGetByMapsResourceRequest(_subscriptionId, _resourceGroupName, _mapName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DependencyMapDiscoverySourceCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs index bd95ef694506..ef319197e03f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/DependencyMapExtensions.cs @@ -8,7 +8,9 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; using Azure.ResourceManager.DependencyMap.Mocking; using Azure.ResourceManager.Resources; @@ -17,30 +19,26 @@ namespace Azure.ResourceManager.DependencyMap /// A class to add extension methods to Azure.ResourceManager.DependencyMap. public static partial class DependencyMapExtensions { + /// private static MockableDependencyMapArmClient GetMockableDependencyMapArmClient(ArmClient client) { - return client.GetCachedClient(client0 => new MockableDependencyMapArmClient(client0)); + return client.GetCachedClient(client0 => new MockableDependencyMapArmClient(client0, ResourceIdentifier.Root)); } - private static MockableDependencyMapResourceGroupResource GetMockableDependencyMapResourceGroupResource(ArmResource resource) + /// + private static MockableDependencyMapResourceGroupResource GetMockableDependencyMapResourceGroupResource(ResourceGroupResource resourceGroupResource) { - return resource.GetCachedClient(client => new MockableDependencyMapResourceGroupResource(client, resource.Id)); + return resourceGroupResource.GetCachedClient(client => new MockableDependencyMapResourceGroupResource(client, resourceGroupResource.Id)); } - private static MockableDependencyMapSubscriptionResource GetMockableDependencyMapSubscriptionResource(ArmResource resource) + /// + private static MockableDependencyMapSubscriptionResource GetMockableDependencyMapSubscriptionResource(SubscriptionResource subscriptionResource) { - return resource.GetCachedClient(client => new MockableDependencyMapSubscriptionResource(client, resource.Id)); + return subscriptionResource.GetCachedClient(client => new MockableDependencyMapSubscriptionResource(client, subscriptionResource.Id)); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. /// Returns a object. @@ -51,15 +49,8 @@ public static DependencyMapResource GetDependencyMapResource(this ArmClient clie return GetMockableDependencyMapArmClient(client).GetDependencyMapResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. /// Returns a object. @@ -70,16 +61,10 @@ public static DependencyMapDiscoverySourceResource GetDependencyMapDiscoverySour return GetMockableDependencyMapArmClient(client).GetDependencyMapDiscoverySourceResource(id); } - /// - /// Gets a collection of DependencyMapResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets a collection of DependencyMaps in the . + /// The the method will execute against. /// is null. - /// An object representing collection of DependencyMapResources and their operations over a DependencyMapResource. + /// An object representing collection of DependencyMaps and their operations over a DependencyMapResource. public static DependencyMapCollection GetDependencyMaps(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); @@ -87,36 +72,11 @@ public static DependencyMapCollection GetDependencyMaps(this ResourceGroupResour return GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetDependencyMaps(); } - /// - /// Get a MapsResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Get a MapsResource. + /// The the method will execute against. /// Maps resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] public static async Task> GetDependencyMapAsync(this ResourceGroupResource resourceGroupResource, string mapName, CancellationToken cancellationToken = default) { @@ -125,36 +85,11 @@ public static async Task> GetDependencyMapAsync( return await GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetDependencyMapAsync(mapName, cancellationToken).ConfigureAwait(false); } - /// - /// Get a MapsResource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Get a MapsResource. + /// The the method will execute against. /// Maps resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] public static Response GetDependencyMap(this ResourceGroupResource resourceGroupResource, string mapName, CancellationToken cancellationToken = default) { @@ -163,35 +98,11 @@ public static Response GetDependencyMap(this ResourceGrou return GetMockableDependencyMapResourceGroupResource(resourceGroupResource).GetDependencyMap(mapName, cancellationToken); } - /// - /// List MapsResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// List MapsResource resources by subscription ID. + /// The the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public static AsyncPageable GetDependencyMapsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -199,32 +110,8 @@ public static AsyncPageable GetDependencyMapsAsync(this S return GetMockableDependencyMapSubscriptionResource(subscriptionResource).GetDependencyMapsAsync(cancellationToken); } - /// - /// List MapsResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// List MapsResource resources by subscription ID. + /// The the method will execute against. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs index cf5790cc1e1c..ea8ded8957ba 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapArmClient.cs @@ -6,38 +6,27 @@ #nullable disable using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Mocking { - /// A class to add extension methods to ArmClient. + /// A class to add extension methods to . public partial class MockableDependencyMapArmClient : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDependencyMapArmClient for mocking. protected MockableDependencyMapArmClient() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDependencyMapArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) { } - internal MockableDependencyMapArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. /// Returns a object. public virtual DependencyMapResource GetDependencyMapResource(ResourceIdentifier id) @@ -46,10 +35,7 @@ public virtual DependencyMapResource GetDependencyMapResource(ResourceIdentifier return new DependencyMapResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. /// Returns a object. public virtual DependencyMapDiscoverySourceResource GetDependencyMapDiscoverySourceResource(ResourceIdentifier id) diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs index 914f00938d75..9a931acbb3de 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapResourceGroupResource.cs @@ -8,33 +8,31 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.DependencyMap; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DependencyMap.Mocking { - /// A class to add extension methods to ResourceGroupResource. + /// A class to add extension methods to . public partial class MockableDependencyMapResourceGroupResource : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDependencyMapResourceGroupResource for mocking. protected MockableDependencyMapResourceGroupResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDependencyMapResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of DependencyMapResources in the ResourceGroupResource. - /// An object representing collection of DependencyMapResources and their operations over a DependencyMapResource. + /// Gets a collection of DependencyMaps in the . + /// An object representing collection of DependencyMaps and their operations over a DependencyMapResource. public virtual DependencyMapCollection GetDependencyMaps() { return GetCachedClient(client => new DependencyMapCollection(client, Id)); @@ -44,20 +42,16 @@ public virtual DependencyMapCollection GetDependencyMaps() /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -68,6 +62,8 @@ public virtual DependencyMapCollection GetDependencyMaps() [ForwardsClientCalls] public virtual async Task> GetDependencyMapAsync(string mapName, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + return await GetDependencyMaps().GetAsync(mapName, cancellationToken).ConfigureAwait(false); } @@ -75,20 +71,16 @@ public virtual async Task> GetDependencyMapAsync /// Get a MapsResource /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName} - /// - /// - /// Operation Id - /// MapsResource_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DependencyMap/maps/{mapName}. /// /// - /// Default Api Version - /// 2025-05-01-preview + /// Operation Id. + /// Maps_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-07-01-preview. /// /// /// @@ -99,6 +91,8 @@ public virtual async Task> GetDependencyMapAsync [ForwardsClientCalls] public virtual Response GetDependencyMap(string mapName, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + return GetDependencyMaps().Get(mapName, cancellationToken); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs index fd53e2dd254e..73ac60b3fc09 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Extensions/MockableDependencyMapSubscriptionResource.cs @@ -6,97 +6,59 @@ #nullable disable using System.Threading; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.DependencyMap; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DependencyMap.Mocking { - /// A class to add extension methods to SubscriptionResource. + /// A class to add extension methods to . public partial class MockableDependencyMapSubscriptionResource : ArmResource { - private ClientDiagnostics _dependencyMapMapsClientDiagnostics; - private MapsRestOperations _dependencyMapMapsRestClient; + private ClientDiagnostics _mapsClientDiagnostics; + private Maps _mapsRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDependencyMapSubscriptionResource for mocking. protected MockableDependencyMapSubscriptionResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDependencyMapSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private ClientDiagnostics DependencyMapMapsClientDiagnostics => _dependencyMapMapsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DependencyMap", DependencyMapResource.ResourceType.Namespace, Diagnostics); - private MapsRestOperations DependencyMapMapsRestClient => _dependencyMapMapsRestClient ??= new MapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DependencyMapResource.ResourceType)); + private ClientDiagnostics MapsClientDiagnostics => _mapsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DependencyMap.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } + private Maps MapsRestClient => _mapsRestClient ??= new Maps(MapsClientDiagnostics, Pipeline, Endpoint, "2025-07-01-preview"); - /// - /// List MapsResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List MapsResource resources by subscription ID. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetDependencyMapsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DependencyMapMapsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DependencyMapMapsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DependencyMapResource(Client, DependencyMapData.DeserializeDependencyMapData(e)), DependencyMapMapsClientDiagnostics, Pipeline, "MockableDependencyMapSubscriptionResource.GetDependencyMaps", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new MapsGetBySubscriptionAsyncCollectionResultOfT(MapsRestClient, Id.SubscriptionId, context), data => new DependencyMapResource(Client, data)); } - /// - /// List MapsResource resources by subscription ID - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DependencyMap/maps - /// - /// - /// Operation Id - /// MapsResource_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-05-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// List MapsResource resources by subscription ID. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetDependencyMaps(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DependencyMapMapsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DependencyMapMapsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DependencyMapResource(Client, DependencyMapData.DeserializeDependencyMapData(e)), DependencyMapMapsClientDiagnostics, Pipeline, "MockableDependencyMapSubscriptionResource.GetDependencyMaps", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new MapsGetBySubscriptionCollectionResultOfT(MapsRestClient, Id.SubscriptionId, context), data => new DependencyMapResource(Client, data)); } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs index a9994a6d0534..a97467bb3c96 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Argument.cs @@ -11,8 +11,10 @@ namespace Azure.ResourceManager.DependencyMap { - internal static class Argument + internal static partial class Argument { + /// The value. + /// The name. public static void AssertNotNull(T value, string name) { if (value is null) @@ -21,8 +23,10 @@ public static void AssertNotNull(T value, string name) } } + /// The value. + /// The name. public static void AssertNotNull(T? value, string name) - where T : struct + where T : struct { if (!value.HasValue) { @@ -30,6 +34,8 @@ public static void AssertNotNull(T? value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(IEnumerable value, string name) { if (value is null) @@ -51,6 +57,8 @@ public static void AssertNotNullOrEmpty(IEnumerable value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(string value, string name) { if (value is null) @@ -62,68 +70,5 @@ public static void AssertNotNullOrEmpty(string value, string name) throw new ArgumentException("Value cannot be an empty string.", name); } } - - public static void AssertNotNullOrWhiteSpace(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); - } - } - - public static void AssertNotDefault(ref T value, string name) - where T : struct, IEquatable - { - if (value.Equals(default)) - { - throw new ArgumentException("Value cannot be empty.", name); - } - } - - public static void AssertInRange(T value, T minimum, T maximum, string name) - where T : notnull, IComparable - { - if (minimum.CompareTo(value) > 0) - { - throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); - } - if (maximum.CompareTo(value) < 0) - { - throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); - } - } - - public static void AssertEnumDefined(Type enumType, object value, string name) - { - if (!Enum.IsDefined(enumType, value)) - { - throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); - } - } - - public static T CheckNotNull(T value, string name) - where T : class - { - AssertNotNull(value, name); - return value; - } - - public static string CheckNotNullOrEmpty(string value, string name) - { - AssertNotNullOrEmpty(value, name); - return value; - } - - public static void AssertNull(T value, string name, string message = null) - { - if (value != null) - { - throw new ArgumentException(message ?? "Value must be null.", name); - } - } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/AsyncPageableWrapper.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/AsyncPageableWrapper.cs new file mode 100644 index 000000000000..2e44ae0002c8 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/AsyncPageableWrapper.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class AsyncPageableWrapper : AsyncPageable + { + /// The source async pageable value of type AsyncPageable<T>. + private AsyncPageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the AsyncPageableWrapper class. + /// The source async pageable value of type AsyncPageable<T>. + /// The converter function from T to U. + public AsyncPageableWrapper(AsyncPageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from AsyncPageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + await foreach (Page page in _source.AsPages(continuationToken, pageSizeHint).ConfigureAwait(false)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs index 9c7da1d4c95d..73698505861c 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -11,7 +11,8 @@ namespace Azure.ResourceManager.DependencyMap { - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary + where TKey : notnull { private IDictionary _innerDictionary; @@ -19,6 +20,7 @@ public ChangeTrackingDictionary() { } + /// The inner dictionary. public ChangeTrackingDictionary(IDictionary dictionary) { if (dictionary == null) @@ -28,6 +30,7 @@ public ChangeTrackingDictionary(IDictionary dictionary) _innerDictionary = new Dictionary(dictionary); } + /// The inner dictionary. public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) { if (dictionary == null) @@ -41,16 +44,22 @@ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerDictionary == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + /// Gets the Keys. public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + /// Gets the Values. public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + /// Gets or sets the value associated with the specified key. public TValue this[TKey key] { get @@ -67,8 +76,10 @@ public TValue this[TKey key] } } + /// Gets the Keys. IEnumerable IReadOnlyDictionary.Keys => Keys; + /// Gets the Values. IEnumerable IReadOnlyDictionary.Values => Values; public IEnumerator> GetEnumerator() @@ -89,6 +100,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(KeyValuePair item) { EnsureDictionary().Add(item); @@ -99,6 +111,7 @@ public void Clear() EnsureDictionary().Clear(); } + /// The item to search for. public bool Contains(KeyValuePair item) { if (IsUndefined) @@ -108,6 +121,8 @@ public bool Contains(KeyValuePair item) return EnsureDictionary().Contains(item); } + /// The array to copy. + /// The index. public void CopyTo(KeyValuePair[] array, int index) { if (IsUndefined) @@ -117,6 +132,7 @@ public void CopyTo(KeyValuePair[] array, int index) EnsureDictionary().CopyTo(array, index); } + /// The item to remove. public bool Remove(KeyValuePair item) { if (IsUndefined) @@ -126,11 +142,14 @@ public bool Remove(KeyValuePair item) return EnsureDictionary().Remove(item); } + /// The key. + /// The value to add. public void Add(TKey key, TValue value) { EnsureDictionary().Add(key, value); } + /// The key to search for. public bool ContainsKey(TKey key) { if (IsUndefined) @@ -140,6 +159,7 @@ public bool ContainsKey(TKey key) return EnsureDictionary().ContainsKey(key); } + /// The key. public bool Remove(TKey key) { if (IsUndefined) @@ -149,6 +169,8 @@ public bool Remove(TKey key) return EnsureDictionary().Remove(key); } + /// The key to search for. + /// The value. public bool TryGetValue(TKey key, out TValue value) { if (IsUndefined) diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs index 288d4d1bae98..f90895493e13 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ChangeTrackingList.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.DependencyMap { - internal class ChangeTrackingList : IList, IReadOnlyList + internal partial class ChangeTrackingList : IList, IReadOnlyList { private IList _innerList; @@ -20,6 +20,7 @@ public ChangeTrackingList() { } + /// The inner list. public ChangeTrackingList(IList innerList) { if (innerList != null) @@ -28,6 +29,7 @@ public ChangeTrackingList(IList innerList) } } + /// The inner list. public ChangeTrackingList(IReadOnlyList innerList) { if (innerList != null) @@ -36,12 +38,16 @@ public ChangeTrackingList(IReadOnlyList innerList) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerList == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureList().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + /// Gets or sets the value associated with the specified key. public T this[int index] { get @@ -85,6 +91,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(T item) { EnsureList().Add(item); @@ -95,6 +102,7 @@ public void Clear() EnsureList().Clear(); } + /// The item. public bool Contains(T item) { if (IsUndefined) @@ -104,6 +112,8 @@ public bool Contains(T item) return EnsureList().Contains(item); } + /// The array to copy to. + /// The array index. public void CopyTo(T[] array, int arrayIndex) { if (IsUndefined) @@ -113,6 +123,7 @@ public void CopyTo(T[] array, int arrayIndex) EnsureList().CopyTo(array, arrayIndex); } + /// The item. public bool Remove(T item) { if (IsUndefined) @@ -122,6 +133,7 @@ public bool Remove(T item) return EnsureList().Remove(item); } + /// The item. public int IndexOf(T item) { if (IsUndefined) @@ -131,11 +143,14 @@ public int IndexOf(T item) return EnsureList().IndexOf(item); } + /// The inner list. + /// The item. public void Insert(int index, T item) { EnsureList().Insert(index, item); } + /// The inner list. public void RemoveAt(int index) { if (IsUndefined) diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ClientPipelineExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ClientPipelineExtensions.cs new file mode 100644 index 000000000000..ade7c9995ff1 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ClientPipelineExtensions.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static partial class ClientPipelineExtensions + { + public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + await pipeline.SendAsync(message, userCancellationToken).ConfigureAwait(false); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + pipeline.Send(message, userCancellationToken); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = await pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + + public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = pipeline.ProcessMessage(message, context); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenMemberAttribute.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenMemberAttribute.cs new file mode 100644 index 000000000000..c44b75278318 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenMemberAttribute.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DependencyMap +{ + [AttributeUsage((AttributeTargets.Property | AttributeTargets.Field))] + internal partial class CodeGenMemberAttribute : CodeGenTypeAttribute + { + /// The original name of the member. + public CodeGenMemberAttribute(string originalName) : base(originalName) + { + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSerializationAttribute.cs new file mode 100644 index 000000000000..34e6df3951c1 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DependencyMap +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), AllowMultiple = true, Inherited = true)] + internal partial class CodeGenSerializationAttribute : Attribute + { + /// The property name which these hooks apply to. + public CodeGenSerializationAttribute(string propertyName) + { + PropertyName = propertyName; + } + + /// The property name which these hooks apply to. + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + { + PropertyName = propertyName; + PropertySerializationName = propertySerializationName; + } + + /// Gets or sets the property name which these hooks should apply to. + public string PropertyName { get; } + + /// Gets or sets the serialization name of the property. + public string PropertySerializationName { get; set; } + + /// + /// Gets or sets the method name to use when serializing the property value (property name excluded). + /// The signature of the serialization hook method must be or compatible with when invoking: private void SerializeHook(Utf8JsonWriter writer); + /// + public string SerializationValueHook { get; set; } + + /// + /// Gets or sets the method name to use when deserializing the property value from the JSON. + /// private static void DeserializationHook(JsonProperty property, ref TypeOfTheProperty propertyValue); // if the property is required + /// private static void DeserializationHook(JsonProperty property, ref Optional<TypeOfTheProperty> propertyValue); // if the property is optional + /// + public string DeserializationValueHook { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSuppressAttribute.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSuppressAttribute.cs new file mode 100644 index 000000000000..cebe2bf19a50 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenSuppressAttribute.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DependencyMap +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct), AllowMultiple = true)] + internal partial class CodeGenSuppressAttribute : Attribute + { + /// The member to suppress. + /// The types of the parameters of the member. + public CodeGenSuppressAttribute(string member, params Type[] parameters) + { + Member = member; + Parameters = parameters; + } + + /// Gets the Member. + public string Member { get; } + + /// Gets the Parameters. + public Type[] Parameters { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenTypeAttribute.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenTypeAttribute.cs new file mode 100644 index 000000000000..4b606e44b74d --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/CodeGenTypeAttribute.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DependencyMap +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))] + internal partial class CodeGenTypeAttribute : Attribute + { + /// The original name of the type. + public CodeGenTypeAttribute(string originalName) + { + OriginalName = originalName; + } + + /// Gets the OriginalName. + public string OriginalName { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ErrorResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ErrorResult.cs new file mode 100644 index 000000000000..6c9c30d6ea62 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ErrorResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class ErrorResult : Response + { + private readonly Response _response; + private readonly RequestFailedException _exception; + + public ErrorResult(Response response, RequestFailedException exception) + { + _response = response; + _exception = exception; + } + + /// Gets the Value. + public override T Value => throw _exception; + + /// + public override Response GetRawResponse() + { + return _response; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs index b6f9381e713e..99b15f4b7017 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/ModelSerializationExtensions.cs @@ -11,18 +11,16 @@ using System.Diagnostics; using System.Globalization; using System.Text.Json; -using System.Xml; -using Azure.Core; namespace Azure.ResourceManager.DependencyMap { - internal static class ModelSerializationExtensions + internal static partial class ModelSerializationExtensions { - internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); - internal static readonly ModelReaderWriterOptions WireV3Options = new ModelReaderWriterOptions("W|v3"); - internal static readonly ModelReaderWriterOptions JsonV3Options = new ModelReaderWriterOptions("J|v3"); - internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions + { + MaxDepth = 256 + }; public static object GetObject(this JsonElement element) { @@ -48,14 +46,14 @@ public static object GetObject(this JsonElement element) case JsonValueKind.Null: return null; case JsonValueKind.Object: - var dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var jsonProperty in element.EnumerateObject()) { dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); } return dictionary; case JsonValueKind.Array: - var list = new List(); + List list = new List(); foreach (var item in element.EnumerateArray()) { list.Add(item.GetObject()); @@ -93,7 +91,7 @@ public static char GetChar(this JsonElement element) { if (element.ValueKind == JsonValueKind.String) { - var text = element.GetString(); + string text = element.GetString(); if (text == null || text.Length != 1) { throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); @@ -107,14 +105,14 @@ public static char GetChar(this JsonElement element) } [Conditional("DEBUG")] - public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + public static void ThrowNonNullablePropertyIsNull(this JsonProperty @property) { - throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + throw new JsonException($"A property '{@property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); } public static string GetRequiredString(this JsonElement element) { - var value = element.GetString(); + string value = element.GetString(); if (value == null) { throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); @@ -181,9 +179,6 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, T value, Mode case IJsonModel jsonModel: jsonModel.Write(writer, options ?? WireOptions); break; - case IUtf8JsonSerializable serializable: - serializable.Write(writer); - break; case byte[] bytes: writer.WriteBase64StringValue(bytes); break; @@ -259,151 +254,5 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, Mo { writer.WriteObjectValue(value, options); } - - internal static bool IsSentinelValue(BinaryData value) - { - ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; - ReadOnlySpan valueSpan = value.ToMemory().Span; - return sentinelSpan.SequenceEqual(valueSpan); - } - - internal static class TypeFormatters - { - private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - public const string DefaultNumberFormat = "G"; - - public static string ToString(bool value) => value ? "true" : "false"; - - public static string ToString(DateTime value, string format) => value.Kind switch - { - DateTimeKind.Utc => ToString((DateTimeOffset)value, format), - _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") - }; - - public static string ToString(DateTimeOffset value, string format) => format switch - { - "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), - "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), - "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "R" => value.ToString("r", CultureInfo.InvariantCulture), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(TimeSpan value, string format) => format switch - { - "P" => XmlConvert.ToString(value), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(byte[] value, string format) => format switch - { - "U" => ToBase64UrlString(value), - "D" => Convert.ToBase64String(value), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - - public static string ToBase64UrlString(byte[] value) - { - int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; - int size = checked(numWholeOrPartialInputBlocks * 4); - char[] output = new char[size]; - - int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); - - int i = 0; - for (; i < numBase64Chars; i++) - { - char ch = output[i]; - if (ch == '+') - { - output[i] = '-'; - } - else - { - if (ch == '/') - { - output[i] = '_'; - } - else - { - if (ch == '=') - { - break; - } - } - } - } - - return new string(output, 0, i); - } - - public static byte[] FromBase64UrlString(string value) - { - int paddingCharsToAdd = (value.Length % 4) switch - { - 0 => 0, - 2 => 2, - 3 => 1, - _ => throw new InvalidOperationException("Malformed input") - }; - char[] output = new char[(value.Length + paddingCharsToAdd)]; - int i = 0; - for (; i < value.Length; i++) - { - char ch = value[i]; - if (ch == '-') - { - output[i] = '+'; - } - else - { - if (ch == '_') - { - output[i] = '/'; - } - else - { - output[i] = ch; - } - } - } - - for (; i < output.Length; i++) - { - output[i] = '='; - } - - return Convert.FromBase64CharArray(output, 0, output.Length); - } - - public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch - { - "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), - _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) - }; - - public static TimeSpan ParseTimeSpan(string value, string format) => format switch - { - "P" => XmlConvert.ToTimeSpan(value), - _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) - }; - - public static string ConvertToString(object value, string format = null) => value switch - { - null => "null", - string s => s, - bool b => ToString(b), - int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), - byte[] b0 when format != null => ToString(b0, format), - IEnumerable s0 => string.Join(",", s0), - DateTimeOffset dateTime when format != null => ToString(dateTime, format), - TimeSpan timeSpan when format != null => ToString(timeSpan, format), - TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), - Guid guid => guid.ToString(), - BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), - _ => value.ToString() - }; - } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs index d1f550245273..e50033be2cd4 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Optional.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DependencyMap { - internal static class Optional + internal static partial class Optional { public static bool IsCollectionDefined(IEnumerable collection) { @@ -28,7 +28,7 @@ public static bool IsCollectionDefined(IReadOnlyDictionary(T? value) - where T : struct + where T : struct { return value.HasValue; } @@ -38,14 +38,14 @@ public static bool IsDefined(object value) return value != null; } - public static bool IsDefined(JsonElement value) + public static bool IsDefined(string value) { - return value.ValueKind != JsonValueKind.Undefined; + return value != null; } - public static bool IsDefined(string value) + public static bool IsDefined(JsonElement value) { - return value != null; + return value.ValueKind != JsonValueKind.Undefined; } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/PageableWrapper.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/PageableWrapper.cs new file mode 100644 index 000000000000..7f7ee1d38759 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/PageableWrapper.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class PageableWrapper : Pageable + { + /// The source pageable value of type Pageable<T>. + private Pageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the PageableWrapper class. + /// The source pageable value of type Pageable<T>. + /// The converter function from T to U. + public PageableWrapper(Pageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from Pageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + foreach (Page page in _source.AsPages(continuationToken, pageSizeHint)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RawRequestUriBuilderExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RawRequestUriBuilderExtensions.cs new file mode 100644 index 000000000000..f4dd4f0fdb54 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RawRequestUriBuilderExtensions.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static partial class RawRequestUriBuilderExtensions + { + public static void AppendQueryDelimited(this RawRequestUriBuilder builder, string name, IEnumerable value, string delimiter, SerializationFormat format = SerializationFormat.Default, bool escape = true) + { + delimiter ??= ","; + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + builder.AppendQuery(name, string.Join(delimiter, stringValues), escape); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RequestContextExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RequestContextExtensions.cs new file mode 100644 index 000000000000..d77857888ba2 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/RequestContextExtensions.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using Azure; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static partial class RequestContextExtensions + { + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + public static ValueTuple Parse(this RequestContext context) + { + if (context == null) + { + return (CancellationToken.None, ErrorOptions.Default); + } + return (context.CancellationToken, context.ErrorOptions); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/SerializationFormat.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/SerializationFormat.cs new file mode 100644 index 000000000000..70db946b6b79 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/SerializationFormat.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DependencyMap +{ + internal enum SerializationFormat + { + /// The default serialization format. + Default = 0, + /// The RFC1123 date time format. + DateTime_RFC1123 = 1, + /// The RFC3339 date time format. + DateTime_RFC3339 = 2, + /// The RFC7231 date time format. + DateTime_RFC7231 = 3, + /// The ISO8601 date time format. + DateTime_ISO8601 = 4, + /// The Unix date time format. + DateTime_Unix = 5, + /// The ISO8601 date format. + Date_ISO8601 = 6, + /// The ISO8601 duration format. + Duration_ISO8601 = 7, + /// The constant duration format. + Duration_Constant = 8, + /// The seconds duration format. + Duration_Seconds = 9, + /// The seconds duration format with float precision. + Duration_Seconds_Float = 10, + /// The seconds duration format with double precision. + Duration_Seconds_Double = 11, + /// The milliseconds duration format. + Duration_Milliseconds = 12, + /// The milliseconds duration format with float precision. + Duration_Milliseconds_Float = 13, + /// The milliseconds duration format with double precision. + Duration_Milliseconds_Double = 14, + /// The ISO8601 time format. + Time_ISO8601 = 15, + /// The Base64Url bytes format. + Bytes_Base64Url = 16, + /// The Base64 bytes format. + Bytes_Base64 = 17 + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/TypeFormatters.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/TypeFormatters.cs new file mode 100644 index 000000000000..729e4bd7d988 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/TypeFormatters.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Xml; + +namespace Azure.ResourceManager.DependencyMap +{ + internal static partial class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Generated clients require it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked (value.Length + 2) / 3; + int size = checked (numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ToFormatSpecifier(SerializationFormat format) => format switch + { + SerializationFormat.DateTime_RFC1123 => "R", + SerializationFormat.DateTime_RFC3339 => "O", + SerializationFormat.DateTime_RFC7231 => "R", + SerializationFormat.DateTime_ISO8601 => "O", + SerializationFormat.Date_ISO8601 => "D", + SerializationFormat.DateTime_Unix => "U", + SerializationFormat.Bytes_Base64Url => "U", + SerializationFormat.Bytes_Base64 => "D", + SerializationFormat.Duration_ISO8601 => "P", + SerializationFormat.Duration_Constant => "c", + SerializationFormat.Duration_Seconds => "%s", + SerializationFormat.Duration_Seconds_Float => "s\\.FFF", + SerializationFormat.Duration_Seconds_Double => "s\\.FFFFFF", + SerializationFormat.Time_ISO8601 => "T", + _ => null + }; + + public static string ConvertToString(object value, SerializationFormat format = SerializationFormat.Default) + { + string formatSpecifier = ToFormatSpecifier(format); + + return value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when formatSpecifier != null => ToString(b0, formatSpecifier), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when formatSpecifier != null => ToString(dateTime, formatSpecifier), + TimeSpan timeSpan when format == SerializationFormat.Duration_Seconds => Convert.ToInt32(timeSpan.TotalSeconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan0 when format == SerializationFormat.Duration_Seconds_Float || format == SerializationFormat.Duration_Seconds_Double => timeSpan0.TotalSeconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan1 when format == SerializationFormat.Duration_Milliseconds => Convert.ToInt32(timeSpan1.TotalMilliseconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan2 when format == SerializationFormat.Duration_Milliseconds_Float || format == SerializationFormat.Duration_Milliseconds_Double => timeSpan2.TotalMilliseconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan3 when formatSpecifier != null => ToString(timeSpan3, formatSpecifier), + TimeSpan timeSpan4 => XmlConvert.ToString(timeSpan4), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs index ba336e222cdc..696756e60655 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.DependencyMap { - internal class Utf8JsonRequestContent : RequestContent + internal partial class Utf8JsonRequestContent : RequestContent { private readonly MemoryStream _stream; private readonly RequestContent _content; @@ -25,20 +25,26 @@ public Utf8JsonRequestContent() JsonWriter = new Utf8JsonWriter(_stream); } + /// Gets the JsonWriter. public Utf8JsonWriter JsonWriter { get; } + /// The stream containing the data to be written. + /// The cancellation token to use. public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) { await JsonWriter.FlushAsync().ConfigureAwait(false); await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); } + /// The stream containing the data to be written. + /// The cancellation token to use. public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) { JsonWriter.Flush(); _content.WriteTo(stream, cancellationToken); } + /// public override bool TryComputeLength(out long length) { length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs index 9e92b9fa59a7..cf70c8048254 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperation.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.DependencyMap { -#pragma warning disable SA1649 // File name should match first type name - internal class DependencyMapArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class DependencyMapArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected DependencyMapArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal DependencyMapArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response); @@ -36,12 +37,20 @@ internal DependencyMapArmOperation(Response response, RehydrationToken? rehydrat _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal DependencyMapArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,48 +58,49 @@ internal DependencyMapArmOperation(ClientDiagnostics clientDiagnostics, HttpPipe _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DependencyMapArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + nextLinkOperation, + clientDiagnostics, + response, + "DependencyMapArmOperation", + null, + new SequentialDelayStrategy()); } + /// Gets the Id. + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// Gets the HasCompleted. + public override bool HasCompleted => _operation.HasCompleted; + + /// The token to rehydrate a long-running operation. private string GetOperationId(RehydrationToken? rehydrationToken) { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); + return rehydrationToken?.Id; } - /// - public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// + /// public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs index 8ce851016e86..855d1caf3fc2 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapArmOperationOfT.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.DependencyMap { -#pragma warning disable SA1649 // File name should match first type name - internal class DependencyMapArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class DependencyMapArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected DependencyMapArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal DependencyMapArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); @@ -36,12 +37,21 @@ internal DependencyMapArmOperation(Response response, RehydrationToken? rehyd _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal DependencyMapArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,54 +59,55 @@ internal DependencyMapArmOperation(IOperationSource source, ClientDiagnostics _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DependencyMapArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + NextLinkOperationImplementation.Create(source, nextLinkOperation), + clientDiagnostics, + response, + "DependencyMapArmOperation", + null, + new SequentialDelayStrategy()); } - private string GetOperationId(RehydrationToken? rehydrationToken) - { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); - } - /// + /// Gets the Id. public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// - public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - - /// + /// Gets the Value. public override T Value => _operation.Value; - /// + /// Gets the HasValue. public override bool HasValue => _operation.HasValue; - /// + /// Gets the HasCompleted. public override bool HasCompleted => _operation.HasCompleted; - /// + /// The token to rehydrate a long-running operation. + private string GetOperationId(RehydrationToken? rehydrationToken) + { + return rehydrationToken?.Id; + } + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); - /// + /// public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapDiscoverySourceOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapDiscoverySourceOperationSource.cs index b85b7d78d434..b91a3e3891db 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapDiscoverySourceOperationSource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapDiscoverySourceOperationSource.cs @@ -5,32 +5,45 @@ #nullable disable -using System.ClientModel.Primitives; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; namespace Azure.ResourceManager.DependencyMap { - internal class DependencyMapDiscoverySourceOperationSource : IOperationSource + /// + internal partial class DependencyMapDiscoverySourceOperationSource : IOperationSource { private readonly ArmClient _client; + /// + /// internal DependencyMapDiscoverySourceOperationSource(ArmClient client) { _client = client; } + /// The response from the service. + /// The cancellation token to use. + /// DependencyMapDiscoverySourceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + DependencyMapDiscoverySourceData data = DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(document.RootElement, ModelSerializationExtensions.WireOptions); return new DependencyMapDiscoverySourceResource(_client, data); } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); - return await Task.FromResult(new DependencyMapDiscoverySourceResource(_client, data)).ConfigureAwait(false); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + DependencyMapDiscoverySourceData data = DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DependencyMapDiscoverySourceResource(_client, data); } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapOperationSource.cs index b7acf3111a78..28d1c76f812f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapOperationSource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/DependencyMapOperationSource.cs @@ -5,32 +5,45 @@ #nullable disable -using System.ClientModel.Primitives; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; namespace Azure.ResourceManager.DependencyMap { - internal class DependencyMapOperationSource : IOperationSource + /// + internal partial class DependencyMapOperationSource : IOperationSource { private readonly ArmClient _client; + /// + /// internal DependencyMapOperationSource(ArmClient client) { _client = client; } + /// The response from the service. + /// The cancellation token to use. + /// DependencyMapResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + DependencyMapData data = DependencyMapData.DeserializeDependencyMapData(document.RootElement, ModelSerializationExtensions.WireOptions); return new DependencyMapResource(_client, data); } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDependencyMapContext.Default); - return await Task.FromResult(new DependencyMapResource(_client, data)).ConfigureAwait(false); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + DependencyMapData data = DependencyMapData.DeserializeDependencyMapData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DependencyMapResource(_client, data); } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/ExportDependenciesOperationResultOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/ExportDependenciesOperationResultOperationSource.cs index dc8af57ba61d..d185d7a63ae9 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/ExportDependenciesOperationResultOperationSource.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/ExportDependenciesOperationResultOperationSource.cs @@ -8,23 +8,38 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.ResourceManager.DependencyMap.Models; namespace Azure.ResourceManager.DependencyMap { - internal class ExportDependenciesOperationResultOperationSource : IOperationSource + /// + internal partial class ExportDependenciesOperationResultOperationSource : IOperationSource { + /// + internal ExportDependenciesOperationResultOperationSource() + { + } + + /// The response from the service. + /// The cancellation token to use. + /// ExportDependenciesOperationResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - return ExportDependenciesOperationResult.DeserializeExportDependenciesOperationResult(document.RootElement); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + ExportDependenciesOperationResult result = ExportDependenciesOperationResult.DeserializeExportDependenciesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - return ExportDependenciesOperationResult.DeserializeExportDependenciesOperationResult(document.RootElement); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + ExportDependenciesOperationResult result = ExportDependenciesOperationResult.DeserializeExportDependenciesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/GetDependencyViewForAllMachinesOperationResultOperationSource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/GetDependencyViewForAllMachinesOperationResultOperationSource.cs new file mode 100644 index 000000000000..ec4734e49c54 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/LongRunningOperation/GetDependencyViewForAllMachinesOperationResultOperationSource.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + /// + internal partial class GetDependencyViewForAllMachinesOperationResultOperationSource : IOperationSource + { + /// + internal GetDependencyViewForAllMachinesOperationResultOperationSource() + { + } + + /// The response from the service. + /// The cancellation token to use. + /// + GetDependencyViewForAllMachinesOperationResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + GetDependencyViewForAllMachinesOperationResult result = GetDependencyViewForAllMachinesOperationResult.DeserializeGetDependencyViewForAllMachinesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + GetDependencyViewForAllMachinesOperationResult result = GetDependencyViewForAllMachinesOperationResult.DeserializeGetDependencyViewForAllMachinesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..acf86cc1f104 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class MapsGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly Maps _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of MapsGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Maps client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public MapsGetByResourceGroupAsyncCollectionResultOfT(Maps client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of MapsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of MapsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + MapsResourceListResult result = MapsResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DependencyMapCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..6937506fbdf0 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetByResourceGroupCollectionResultOfT.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class MapsGetByResourceGroupCollectionResultOfT : Pageable + { + private readonly Maps _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of MapsGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Maps client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public MapsGetByResourceGroupCollectionResultOfT(Maps client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of MapsGetByResourceGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of MapsGetByResourceGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + MapsResourceListResult result = MapsResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DependencyMapCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionAsyncCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..a136b99e4ef3 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionAsyncCollectionResultOfT.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class MapsGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable + { + private readonly Maps _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of MapsGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Maps client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + public MapsGetBySubscriptionAsyncCollectionResultOfT(Maps client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of MapsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of MapsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + MapsResourceListResult result = MapsResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableDependencyMapSubscriptionResource.GetDependencyMaps"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionCollectionResultOfT.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionCollectionResultOfT.cs new file mode 100644 index 000000000000..c65dcecbfae2 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/MapsGetBySubscriptionCollectionResultOfT.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DependencyMap.Models; + +namespace Azure.ResourceManager.DependencyMap +{ + internal partial class MapsGetBySubscriptionCollectionResultOfT : Pageable + { + private readonly Maps _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of MapsGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Maps client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + public MapsGetBySubscriptionCollectionResultOfT(Maps client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of MapsGetBySubscriptionCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of MapsGetBySubscriptionCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + MapsResourceListResult result = MapsResourceListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableDependencyMapSubscriptionResource.GetDependencyMaps"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/AzureResourceManagerDependencyMapContext.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/AzureResourceManagerDependencyMapContext.cs index a5f85d245e44..ecc2c95c5a31 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/AzureResourceManagerDependencyMapContext.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/AzureResourceManagerDependencyMapContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.DependencyMap.Models; using Azure.ResourceManager.Models; @@ -13,7 +14,7 @@ namespace Azure.ResourceManager.DependencyMap { /// /// Context class which will be filled in by the System.ClientModel.SourceGeneration. - /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' + /// For more information /// [ModelReaderWriterBuildable(typeof(DependencyMapData))] [ModelReaderWriterBuildable(typeof(DependencyMapDateTimeFilter))] @@ -26,6 +27,7 @@ namespace Azure.ResourceManager.DependencyMap [ModelReaderWriterBuildable(typeof(DependencyMapProperties))] [ModelReaderWriterBuildable(typeof(DependencyMapResource))] [ModelReaderWriterBuildable(typeof(DependencyMapVisualizationFilter))] + [ModelReaderWriterBuildable(typeof(DependencyProcessFilter))] [ModelReaderWriterBuildable(typeof(DiscoverySourceResourceListResult))] [ModelReaderWriterBuildable(typeof(ExportDependenciesAdditionalInfo))] [ModelReaderWriterBuildable(typeof(ExportDependenciesContent))] @@ -33,6 +35,9 @@ namespace Azure.ResourceManager.DependencyMap [ModelReaderWriterBuildable(typeof(ExportDependenciesResultProperties))] [ModelReaderWriterBuildable(typeof(GetConnectionsForProcessOnFocusedMachineContent))] [ModelReaderWriterBuildable(typeof(GetConnectionsWithConnectedMachineForFocusedMachineContent))] + [ModelReaderWriterBuildable(typeof(GetDependencyViewForAllMachinesContent))] + [ModelReaderWriterBuildable(typeof(GetDependencyViewForAllMachinesOperationResult))] + [ModelReaderWriterBuildable(typeof(GetDependencyViewForAllMachinesResultProperties))] [ModelReaderWriterBuildable(typeof(GetDependencyViewForFocusedMachineContent))] [ModelReaderWriterBuildable(typeof(MapsResourceListResult))] [ModelReaderWriterBuildable(typeof(OffAzureDiscoverySourceProperties))] diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.Serialization.cs index d7eb9f04ca70..52d15e0e5087 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class DependencyMapDateTimeFilter : IUtf8JsonSerializable, IJsonModel + /// UTC DateTime filter for dependency map visualization apis. + public partial class DependencyMapDateTimeFilter : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDateTimeFilter)} does not support writing '{format}' format."); } - if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startDateTimeUtc"u8); @@ -44,15 +44,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("endDateTimeUtc"u8); writer.WriteStringValue(EndOn.Value, "O"); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -61,63 +61,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapDateTimeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapDateTimeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapDateTimeFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDateTimeFilter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapDateTimeFilter(document.RootElement, options); } - internal static DependencyMapDateTimeFilter DeserializeDependencyMapDateTimeFilter(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapDateTimeFilter DeserializeDependencyMapDateTimeFilter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - DateTimeOffset? startDateTimeUtc = default; - DateTimeOffset? endDateTimeUtc = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + DateTimeOffset? startOn = default; + DateTimeOffset? endOn = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("startDateTimeUtc"u8)) + if (prop.NameEquals("startDateTimeUtc"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - startDateTimeUtc = property.Value.GetDateTimeOffset("O"); + startOn = prop.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("endDateTimeUtc"u8)) + if (prop.NameEquals("endDateTimeUtc"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - endDateTimeUtc = property.Value.GetDateTimeOffset("O"); + endOn = prop.Value.GetDateTimeOffset("O"); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapDateTimeFilter(startDateTimeUtc, endDateTimeUtc, serializedAdditionalRawData); + return new DependencyMapDateTimeFilter(startOn, endOn, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +133,20 @@ BinaryData IPersistableModel.Write(ModelReaderWrite } } - DependencyMapDateTimeFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapDateTimeFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapDateTimeFilter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapDateTimeFilter(document.RootElement, options); } default: @@ -143,6 +154,7 @@ DependencyMapDateTimeFilter IPersistableModel.Creat } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.cs index 25756f8884af..da9795020e88 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDateTimeFilter.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.DependencyMap.Models /// UTC DateTime filter for dependency map visualization apis. public partial class DependencyMapDateTimeFilter { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public DependencyMapDateTimeFilter() @@ -53,16 +24,17 @@ public DependencyMapDateTimeFilter() /// Initializes a new instance of . /// Start date time for dependency map visualization query. /// End date time for dependency map visualization query. - /// Keeps track of any properties unknown to the library. - internal DependencyMapDateTimeFilter(DateTimeOffset? startOn, DateTimeOffset? endOn, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapDateTimeFilter(DateTimeOffset? startOn, DateTimeOffset? endOn, IDictionary additionalBinaryDataProperties) { StartOn = startOn; EndOn = endOn; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Start date time for dependency map visualization query. public DateTimeOffset? StartOn { get; set; } + /// End date time for dependency map visualization query. public DateTimeOffset? EndOn { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.Serialization.cs index 3ab884b1f1d1..4768de34592e 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class DependencyMapDiscoverySourcePatch : IUtf8JsonSerializable, IJsonModel + /// The type used for updating tags in DiscoverySourceResource resources. + public partial class DependencyMapDiscoverySourcePatch : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourcePatch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -41,19 +42,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit foreach (var item in Tags) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -62,58 +68,71 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapDiscoverySourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapDiscoverySourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapDiscoverySourcePatch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourcePatch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapDiscoverySourcePatch(document.RootElement, options); } - internal static DependencyMapDiscoverySourcePatch DeserializeDependencyMapDiscoverySourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapDiscoverySourcePatch DeserializeDependencyMapDiscoverySourcePatch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } tags = dictionary; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapDiscoverySourcePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new DependencyMapDiscoverySourcePatch(tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReade } } - DependencyMapDiscoverySourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapDiscoverySourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapDiscoverySourcePatch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapDiscoverySourcePatch(document.RootElement, options); } default: @@ -139,6 +163,19 @@ DependencyMapDiscoverySourcePatch IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DependencyMapDiscoverySourcePatch dependencyMapDiscoverySourcePatch) + { + if (dependencyMapDiscoverySourcePatch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dependencyMapDiscoverySourcePatch, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.cs index 38c3db5ef1d6..661b6d173673 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourcePatch.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// The type used for updating tags in DiscoverySourceResource resources. public partial class DependencyMapDiscoverySourcePatch { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public DependencyMapDiscoverySourcePatch() @@ -53,11 +25,11 @@ public DependencyMapDiscoverySourcePatch() /// Initializes a new instance of . /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal DependencyMapDiscoverySourcePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapDiscoverySourcePatch(IDictionary tags, IDictionary additionalBinaryDataProperties) { Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Resource tags. diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.Serialization.cs index 6d0f32535036..1aa9ff1dbaef 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.Serialization.cs @@ -8,15 +8,24 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { + /// + /// The properties of Discovery Source resource + /// Please note this is the abstract base class. The derived classes available for instantiation are: . + /// [PersistableModelProxy(typeof(UnknownDependencyMapDiscoverySourceProperties))] - public partial class DependencyMapDiscoverySourceProperties : IUtf8JsonSerializable, IJsonModel + public abstract partial class DependencyMapDiscoverySourceProperties : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal DependencyMapDiscoverySourceProperties() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +37,11 @@ void IJsonModel.Write(Utf8JsonWriter wri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceProperties)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -43,15 +51,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(SourceType.ToString()); writer.WritePropertyName("sourceId"u8); writer.WriteStringValue(SourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -60,40 +68,49 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceProperties)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapDiscoverySourceProperties(document.RootElement, options); } - internal static DependencyMapDiscoverySourceProperties DeserializeDependencyMapDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapDiscoverySourceProperties DeserializeDependencyMapDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - if (element.TryGetProperty("sourceType", out JsonElement discriminator)) + if (element.TryGetProperty("sourceType"u8, out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "OffAzure": return OffAzureDiscoverySourceProperties.DeserializeOffAzureDiscoverySourceProperties(element, options); + case "OffAzure": + return OffAzureDiscoverySourceProperties.DeserializeOffAzureDiscoverySourceProperties(element, options); } } return UnknownDependencyMapDiscoverySourceProperties.DeserializeUnknownDependencyMapDiscoverySourceProperties(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -103,15 +120,20 @@ BinaryData IPersistableModel.Write(Model } } - DependencyMapDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapDiscoverySourceProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapDiscoverySourceProperties(document.RootElement, options); } default: @@ -119,6 +141,7 @@ DependencyMapDiscoverySourceProperties IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.cs index 8a52e0e0653f..a6b5a5f91ccb 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapDiscoverySourceProperties.cs @@ -13,50 +13,19 @@ namespace Azure.ResourceManager.DependencyMap.Models { /// /// The properties of Discovery Source resource - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note this is the abstract base class. The derived classes available for instantiation are: . /// public abstract partial class DependencyMapDiscoverySourceProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private protected IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . + /// Source type of Discovery Source resource. /// Source ArmId of Discovery Source resource. - /// is null. - protected DependencyMapDiscoverySourceProperties(ResourceIdentifier sourceId) + private protected DependencyMapDiscoverySourceProperties(SourceType sourceType, ResourceIdentifier sourceId) { - Argument.AssertNotNull(sourceId, nameof(sourceId)); - + SourceType = sourceType; SourceId = sourceId; } @@ -64,24 +33,21 @@ protected DependencyMapDiscoverySourceProperties(ResourceIdentifier sourceId) /// Provisioning state of Discovery Source resource. /// Source type of Discovery Source resource. /// Source ArmId of Discovery Source resource. - /// Keeps track of any properties unknown to the library. - internal DependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary additionalBinaryDataProperties) { ProvisioningState = provisioningState; SourceType = sourceType; SourceId = sourceId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DependencyMapDiscoverySourceProperties() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Provisioning state of Discovery Source resource. public DependencyMapProvisioningState? ProvisioningState { get; } + /// Source type of Discovery Source resource. internal SourceType SourceType { get; set; } + /// Source ArmId of Discovery Source resource. public ResourceIdentifier SourceId { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.Serialization.cs index 4e00c33db12b..f5fc13a2ce1f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class DependencyMapPatch : IUtf8JsonSerializable, IJsonModel + /// The type used for updating tags in MapsResource resources. + public partial class DependencyMapPatch : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapPatch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -41,19 +42,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit foreach (var item in Tags) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -62,58 +68,71 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapPatch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapPatch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapPatch(document.RootElement, options); } - internal static DependencyMapPatch DeserializeDependencyMapPatch(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapPatch DeserializeDependencyMapPatch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } tags = dictionary; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new DependencyMapPatch(tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - DependencyMapPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapPatch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapPatch(document.RootElement, options); } default: @@ -139,6 +163,19 @@ DependencyMapPatch IPersistableModel.Create(BinaryData data, } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DependencyMapPatch dependencyMapPatch) + { + if (dependencyMapPatch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dependencyMapPatch, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.cs index 16e83927dbce..f143c73b0c3c 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapPatch.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// The type used for updating tags in MapsResource resources. public partial class DependencyMapPatch { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public DependencyMapPatch() @@ -53,11 +25,11 @@ public DependencyMapPatch() /// Initializes a new instance of . /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal DependencyMapPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapPatch(IDictionary tags, IDictionary additionalBinaryDataProperties) { Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Resource tags. diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.Serialization.cs index 5f09c79bcf9e..416bf331c5da 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.Serialization.cs @@ -9,14 +9,20 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class DependencyMapProcessNameFilter : IUtf8JsonSerializable, IJsonModel + /// Process name filter for dependency map visualization apis. + public partial class DependencyMapProcessNameFilter : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal DependencyMapProcessNameFilter() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,30 +34,34 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapProcessNameFilter)} does not support writing '{format}' format."); } - writer.WritePropertyName("operator"u8); writer.WriteStringValue(Operator.ToString()); writer.WritePropertyName("processNames"u8); writer.WriteStartArray(); - foreach (var item in ProcessNames) + foreach (string item in ProcessNames) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -60,60 +70,73 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapProcessNameFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapProcessNameFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapProcessNameFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapProcessNameFilter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapProcessNameFilter(document.RootElement, options); } - internal static DependencyMapProcessNameFilter DeserializeDependencyMapProcessNameFilter(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapProcessNameFilter DeserializeDependencyMapProcessNameFilter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } DependencyMapProcessNameFilterOperator @operator = default; IList processNames = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("operator"u8)) + if (prop.NameEquals("operator"u8)) { - @operator = new DependencyMapProcessNameFilterOperator(property.Value.GetString()); + @operator = new DependencyMapProcessNameFilterOperator(prop.Value.GetString()); continue; } - if (property.NameEquals("processNames"u8)) + if (prop.NameEquals("processNames"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } processNames = array; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapProcessNameFilter(@operator, processNames, serializedAdditionalRawData); + return new DependencyMapProcessNameFilter(@operator, processNames, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +146,20 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - DependencyMapProcessNameFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapProcessNameFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapProcessNameFilter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapProcessNameFilter(document.RootElement, options); } default: @@ -139,6 +167,7 @@ DependencyMapProcessNameFilter IPersistableModel } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.cs index 3dafc7efc4ae..b05d8df1ea39 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilter.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// Process name filter for dependency map visualization apis. public partial class DependencyMapProcessNameFilter { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Operator for process name filter. @@ -61,21 +33,17 @@ public DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator @op /// Initializes a new instance of . /// Operator for process name filter. /// List of process names on which the operator should be applied. - /// Keeps track of any properties unknown to the library. - internal DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator @operator, IList processNames, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator @operator, IList processNames, IDictionary additionalBinaryDataProperties) { Operator = @operator; ProcessNames = processNames; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DependencyMapProcessNameFilter() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Operator for process name filter. public DependencyMapProcessNameFilterOperator Operator { get; } + /// List of process names on which the operator should be applied. public IList ProcessNames { get; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilterOperator.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilterOperator.cs index 56f9a57463e9..c551b2e5b7dd 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilterOperator.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProcessNameFilterOperator.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { @@ -14,38 +15,57 @@ namespace Azure.ResourceManager.DependencyMap.Models public readonly partial struct DependencyMapProcessNameFilterOperator : IEquatable { private readonly string _value; + /// Operator to include items in the result. + private const string ContainsValue = "contains"; + /// Operator to exclude items in the result. + private const string NotContainsValue = "notContains"; /// Initializes a new instance of . + /// The value. /// is null. public DependencyMapProcessNameFilterOperator(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ContainsValue = "contains"; - private const string NotContainsValue = "notContains"; + _value = value; + } /// Operator to include items in the result. public static DependencyMapProcessNameFilterOperator Contains { get; } = new DependencyMapProcessNameFilterOperator(ContainsValue); + /// Operator to exclude items in the result. public static DependencyMapProcessNameFilterOperator NotContains { get; } = new DependencyMapProcessNameFilterOperator(NotContainsValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(DependencyMapProcessNameFilterOperator left, DependencyMapProcessNameFilterOperator right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(DependencyMapProcessNameFilterOperator left, DependencyMapProcessNameFilterOperator right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator DependencyMapProcessNameFilterOperator(string value) => new DependencyMapProcessNameFilterOperator(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator DependencyMapProcessNameFilterOperator?(string value) => value == null ? null : new DependencyMapProcessNameFilterOperator(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is DependencyMapProcessNameFilterOperator other && Equals(other); - /// + + /// public bool Equals(DependencyMapProcessNameFilterOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.Serialization.cs index e4d5d0410f30..820897f4760d 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - internal partial class DependencyMapProperties : IUtf8JsonSerializable, IJsonModel + /// The properties of Maps resource. + internal partial class DependencyMapProperties : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,26 +29,25 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapProperties)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -56,53 +56,59 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapProperties)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapProperties(document.RootElement, options); } - internal static DependencyMapProperties DeserializeDependencyMapProperties(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapProperties DeserializeDependencyMapProperties(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } DependencyMapProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("provisioningState"u8)) + if (prop.NameEquals("provisioningState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new DependencyMapProvisioningState(property.Value.GetString()); + provisioningState = new DependencyMapProvisioningState(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapProperties(provisioningState, serializedAdditionalRawData); + return new DependencyMapProperties(provisioningState, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +118,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - DependencyMapProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapProperties(document.RootElement, options); } default: @@ -128,6 +139,7 @@ DependencyMapProperties IPersistableModel.Create(Binary } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.cs index 730c5a2b7f63..f61d13b80e0c 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProperties.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.DependencyMap.Models /// The properties of Maps resource. internal partial class DependencyMapProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public DependencyMapProperties() @@ -52,11 +23,11 @@ public DependencyMapProperties() /// Initializes a new instance of . /// Provisioning state of Maps resource. - /// Keeps track of any properties unknown to the library. - internal DependencyMapProperties(DependencyMapProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapProperties(DependencyMapProvisioningState? provisioningState, IDictionary additionalBinaryDataProperties) { ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Provisioning state of Maps resource. diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProvisioningState.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProvisioningState.cs index eb0fed29c44d..7566b44ce88b 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProvisioningState.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapProvisioningState.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { @@ -14,53 +15,82 @@ namespace Azure.ResourceManager.DependencyMap.Models public readonly partial struct DependencyMapProvisioningState : IEquatable { private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DependencyMapProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - + /// Resource has been created. private const string SucceededValue = "Succeeded"; + /// Resource creation failed. private const string FailedValue = "Failed"; + /// Resource creation was canceled. private const string CanceledValue = "Canceled"; + /// This state indicates that the resource is being provisioned. private const string ProvisioningValue = "Provisioning"; + /// This state indicates that the resource is being updated. private const string UpdatingValue = "Updating"; + /// This state indicates that the resource is being deleted. private const string DeletingValue = "Deleting"; + /// This state indicates that the operation on the resource has been accepted. private const string AcceptedValue = "Accepted"; + /// Initializes a new instance of . + /// The value. + /// is null. + public DependencyMapProvisioningState(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + /// Resource has been created. public static DependencyMapProvisioningState Succeeded { get; } = new DependencyMapProvisioningState(SucceededValue); + /// Resource creation failed. public static DependencyMapProvisioningState Failed { get; } = new DependencyMapProvisioningState(FailedValue); + /// Resource creation was canceled. public static DependencyMapProvisioningState Canceled { get; } = new DependencyMapProvisioningState(CanceledValue); + /// This state indicates that the resource is being provisioned. public static DependencyMapProvisioningState Provisioning { get; } = new DependencyMapProvisioningState(ProvisioningValue); + /// This state indicates that the resource is being updated. public static DependencyMapProvisioningState Updating { get; } = new DependencyMapProvisioningState(UpdatingValue); + /// This state indicates that the resource is being deleted. public static DependencyMapProvisioningState Deleting { get; } = new DependencyMapProvisioningState(DeletingValue); + /// This state indicates that the operation on the resource has been accepted. public static DependencyMapProvisioningState Accepted { get; } = new DependencyMapProvisioningState(AcceptedValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(DependencyMapProvisioningState left, DependencyMapProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(DependencyMapProvisioningState left, DependencyMapProvisioningState right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator DependencyMapProvisioningState(string value) => new DependencyMapProvisioningState(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator DependencyMapProvisioningState?(string value) => value == null ? null : new DependencyMapProvisioningState(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is DependencyMapProvisioningState other && Equals(other); - /// + + /// public bool Equals(DependencyMapProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs index 128e1dd1eb61..7b39af245f68 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class DependencyMapVisualizationFilter : IUtf8JsonSerializable, IJsonModel + /// Filters for dependency map visualization apis. + public partial class DependencyMapVisualizationFilter : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, M /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DateTime)) { writer.WritePropertyName("dateTime"u8); @@ -44,15 +44,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("processNameFilter"u8); writer.WriteObjectValue(ProcessNameFilter, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -61,63 +61,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DependencyMapVisualizationFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapVisualizationFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyMapVisualizationFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapVisualizationFilter)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapVisualizationFilter(document.RootElement, options); } - internal static DependencyMapVisualizationFilter DeserializeDependencyMapVisualizationFilter(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyMapVisualizationFilter DeserializeDependencyMapVisualizationFilter(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } DependencyMapDateTimeFilter dateTime = default; DependencyMapProcessNameFilter processNameFilter = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("dateTime"u8)) + if (prop.NameEquals("dateTime"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dateTime = DependencyMapDateTimeFilter.DeserializeDependencyMapDateTimeFilter(property.Value, options); + dateTime = DependencyMapDateTimeFilter.DeserializeDependencyMapDateTimeFilter(prop.Value, options); continue; } - if (property.NameEquals("processNameFilter"u8)) + if (prop.NameEquals("processNameFilter"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - processNameFilter = DependencyMapProcessNameFilter.DeserializeDependencyMapProcessNameFilter(property.Value, options); + processNameFilter = DependencyMapProcessNameFilter.DeserializeDependencyMapProcessNameFilter(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DependencyMapVisualizationFilter(dateTime, processNameFilter, serializedAdditionalRawData); + return new DependencyMapVisualizationFilter(dateTime, processNameFilter, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -127,15 +133,20 @@ BinaryData IPersistableModel.Write(ModelReader } } - DependencyMapVisualizationFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapVisualizationFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyMapVisualizationFilter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapVisualizationFilter(document.RootElement, options); } default: @@ -143,6 +154,7 @@ DependencyMapVisualizationFilter IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs index e5f628f5e581..1e63a2cca667 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyMapVisualizationFilter.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.DependencyMap.Models /// Filters for dependency map visualization apis. public partial class DependencyMapVisualizationFilter { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public DependencyMapVisualizationFilter() @@ -53,16 +24,17 @@ public DependencyMapVisualizationFilter() /// Initializes a new instance of . /// DateTime filter. /// Process name filter. - /// Keeps track of any properties unknown to the library. - internal DependencyMapVisualizationFilter(DependencyMapDateTimeFilter dateTime, DependencyMapProcessNameFilter processNameFilter, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DependencyMapVisualizationFilter(DependencyMapDateTimeFilter dateTime, DependencyMapProcessNameFilter processNameFilter, IDictionary additionalBinaryDataProperties) { DateTime = dateTime; ProcessNameFilter = processNameFilter; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// DateTime filter. public DependencyMapDateTimeFilter DateTime { get; set; } + /// Process name filter. public DependencyMapProcessNameFilter ProcessNameFilter { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.Serialization.cs new file mode 100644 index 000000000000..c00bb8eb8a2a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DependencyMap; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// DependencyProcessFilter model. + internal partial class DependencyProcessFilter : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DependencyProcessFilter)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(ProcessNameFilter)) + { + writer.WritePropertyName("processNameFilter"u8); + writer.WriteObjectValue(ProcessNameFilter, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DependencyProcessFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DependencyProcessFilter JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DependencyProcessFilter)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDependencyProcessFilter(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DependencyProcessFilter DeserializeDependencyProcessFilter(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DependencyMapProcessNameFilter processNameFilter = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("processNameFilter"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + processNameFilter = DependencyMapProcessNameFilter.DeserializeDependencyMapProcessNameFilter(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DependencyProcessFilter(processNameFilter, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDependencyMapContext.Default); + default: + throw new FormatException($"The model {nameof(DependencyProcessFilter)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DependencyProcessFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DependencyProcessFilter PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDependencyProcessFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DependencyProcessFilter)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.cs new file mode 100644 index 000000000000..cf6c830f8720 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DependencyProcessFilter.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// DependencyProcessFilter model. + internal partial class DependencyProcessFilter + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DependencyProcessFilter() + { + } + + /// Initializes a new instance of . + /// Process name filter. + /// Keeps track of any properties unknown to the library. + internal DependencyProcessFilter(DependencyMapProcessNameFilter processNameFilter, IDictionary additionalBinaryDataProperties) + { + ProcessNameFilter = processNameFilter; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Process name filter. + public DependencyMapProcessNameFilter ProcessNameFilter { get; set; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs index adce4050b2cd..f6450ce46443 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.Serialization.cs @@ -9,14 +9,21 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - internal partial class DiscoverySourceResourceListResult : IUtf8JsonSerializable, IJsonModel + /// The response of a DiscoverySourceResource list operation. + internal partial class DiscoverySourceResourceListResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal DiscoverySourceResourceListResult() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,15 +35,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Value) + foreach (DependencyMapDiscoverySourceData item in Value) { writer.WriteObjectValue(item, options); } @@ -46,15 +52,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -63,64 +69,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DiscoverySourceResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DiscoverySourceResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DiscoverySourceResourceListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DiscoverySourceResourceListResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDiscoverySourceResourceListResult(document.RootElement, options); } - internal static DiscoverySourceResourceListResult DeserializeDiscoverySourceResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DiscoverySourceResourceListResult DeserializeDiscoverySourceResourceListResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IList value = default; Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) + if (prop.NameEquals("nextLink"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - nextLink = new Uri(property.Value.GetString()); + nextLink = new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new DiscoverySourceResourceListResult(value, nextLink, serializedAdditionalRawData); + return new DiscoverySourceResourceListResult(value, nextLink, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReade } } - DiscoverySourceResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DiscoverySourceResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DiscoverySourceResourceListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDiscoverySourceResourceListResult(document.RootElement, options); } default: @@ -146,6 +163,15 @@ DiscoverySourceResourceListResult IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static DiscoverySourceResourceListResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDiscoverySourceResourceListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs index 2a18905d8b4c..814844c12a00 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/DiscoverySourceResourceListResult.cs @@ -8,72 +8,37 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// The response of a DiscoverySourceResource list operation. internal partial class DiscoverySourceResourceListResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// The DiscoverySourceResource items on this page. - /// is null. internal DiscoverySourceResourceListResult(IEnumerable value) { - Argument.AssertNotNull(value, nameof(value)); - Value = value.ToList(); } /// Initializes a new instance of . /// The DiscoverySourceResource items on this page. /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal DiscoverySourceResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal DiscoverySourceResourceListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) { Value = value; NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DiscoverySourceResourceListResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The DiscoverySourceResource items on this page. - public IReadOnlyList Value { get; } + public IList Value { get; } + /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.Serialization.cs index 9893ced8bca1..07b325d4492d 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - internal partial class ExportDependenciesAdditionalInfo : IUtf8JsonSerializable, IJsonModel + /// Additional information about the exported dependencies data. + internal partial class ExportDependenciesAdditionalInfo : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,26 +29,25 @@ void IJsonModel.Write(Utf8JsonWriter writer, M /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesAdditionalInfo)} does not support writing '{format}' format."); } - if (Optional.IsDefined(AvailableDaysCount)) { writer.WritePropertyName("availableDaysCount"u8); writer.WriteNumberValue(AvailableDaysCount.Value); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -56,53 +56,59 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportDependenciesAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + ExportDependenciesAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ExportDependenciesAdditionalInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesAdditionalInfo)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeExportDependenciesAdditionalInfo(document.RootElement, options); } - internal static ExportDependenciesAdditionalInfo DeserializeExportDependenciesAdditionalInfo(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ExportDependenciesAdditionalInfo DeserializeExportDependenciesAdditionalInfo(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } int? availableDaysCount = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("availableDaysCount"u8)) + if (prop.NameEquals("availableDaysCount"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - availableDaysCount = property.Value.GetInt32(); + availableDaysCount = prop.Value.GetInt32(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ExportDependenciesAdditionalInfo(availableDaysCount, serializedAdditionalRawData); + return new ExportDependenciesAdditionalInfo(availableDaysCount, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +118,20 @@ BinaryData IPersistableModel.Write(ModelReader } } - ExportDependenciesAdditionalInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + ExportDependenciesAdditionalInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ExportDependenciesAdditionalInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeExportDependenciesAdditionalInfo(document.RootElement, options); } default: @@ -128,6 +139,7 @@ ExportDependenciesAdditionalInfo IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.cs index 0082282215ec..01eb4cfa7651 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesAdditionalInfo.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.DependencyMap.Models /// Additional information about the exported dependencies data. internal partial class ExportDependenciesAdditionalInfo { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . internal ExportDependenciesAdditionalInfo() @@ -52,11 +23,11 @@ internal ExportDependenciesAdditionalInfo() /// Initializes a new instance of . /// Number of days for which data was available in the exported results. - /// Keeps track of any properties unknown to the library. - internal ExportDependenciesAdditionalInfo(int? availableDaysCount, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal ExportDependenciesAdditionalInfo(int? availableDaysCount, IDictionary additionalBinaryDataProperties) { AvailableDaysCount = availableDaysCount; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Number of days for which data was available in the exported results. diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs index 5302075bd231..4f0fcfff22aa 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class ExportDependenciesContent : IUtf8JsonSerializable, IJsonModel + /// ExportDependencies request model. + public partial class ExportDependenciesContent : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support writing '{format}' format."); } - if (Optional.IsDefined(FocusedMachineId)) { writer.WritePropertyName("focusedMachineId"u8); @@ -48,21 +49,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("applianceNameList"u8); writer.WriteStartArray(); - foreach (var item in ApplianceNameList) + foreach (string item in ApplianceNameList) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -71,22 +77,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportDependenciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + ExportDependenciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ExportDependenciesContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeExportDependenciesContent(document.RootElement, options); } - internal static ExportDependenciesContent DeserializeExportDependenciesContent(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ExportDependenciesContent DeserializeExportDependenciesContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -94,55 +105,63 @@ internal static ExportDependenciesContent DeserializeExportDependenciesContent(J ResourceIdentifier focusedMachineId = default; DependencyMapVisualizationFilter filters = default; IList applianceNameList = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("focusedMachineId"u8)) + if (prop.NameEquals("focusedMachineId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - focusedMachineId = new ResourceIdentifier(property.Value.GetString()); + focusedMachineId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("filters"u8)) + if (prop.NameEquals("filters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(prop.Value, options); continue; } - if (property.NameEquals("applianceNameList"u8)) + if (prop.NameEquals("applianceNameList"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } } applianceNameList = array; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ExportDependenciesContent(focusedMachineId, filters, applianceNameList ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ExportDependenciesContent(focusedMachineId, filters, applianceNameList ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -152,15 +171,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - ExportDependenciesContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + ExportDependenciesContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ExportDependenciesContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeExportDependenciesContent(document.RootElement, options); } default: @@ -168,6 +192,19 @@ ExportDependenciesContent IPersistableModel.Create(Bi } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(ExportDependenciesContent exportDependenciesContent) + { + if (exportDependenciesContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(exportDependenciesContent, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs index 252d1f9fc340..9d46ee184e8f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesContent.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// ExportDependencies request model. public partial class ExportDependenciesContent { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public ExportDependenciesContent() @@ -56,19 +28,21 @@ public ExportDependenciesContent() /// Machine arm id. /// Filters for ExportDependencies. /// List of Appliance Names. - /// Keeps track of any properties unknown to the library. - internal ExportDependenciesContent(ResourceIdentifier focusedMachineId, DependencyMapVisualizationFilter filters, IList applianceNameList, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal ExportDependenciesContent(ResourceIdentifier focusedMachineId, DependencyMapVisualizationFilter filters, IList applianceNameList, IDictionary additionalBinaryDataProperties) { FocusedMachineId = focusedMachineId; Filters = filters; ApplianceNameList = applianceNameList; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Machine arm id. public ResourceIdentifier FocusedMachineId { get; set; } + /// Filters for ExportDependencies. public DependencyMapVisualizationFilter Filters { get; set; } + /// List of Appliance Names. public IList ApplianceNameList { get; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.Serialization.cs index 430418530d9d..c72a72c3913f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.Serialization.cs @@ -10,14 +10,21 @@ using System.Collections.Generic; using System.Text; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class ExportDependenciesOperationResult : IUtf8JsonSerializable, IJsonModel + /// Model representing the result of the export dependencies asynchronous operation. + public partial class ExportDependenciesOperationResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal ExportDependenciesOperationResult() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -29,12 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesOperationResult)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -67,15 +73,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -84,22 +90,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportDependenciesOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + ExportDependenciesOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ExportDependenciesOperationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesOperationResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeExportDependenciesOperationResult(document.RootElement, options); } - internal static ExportDependenciesOperationResult DeserializeExportDependenciesOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ExportDependenciesOperationResult DeserializeExportDependenciesOperationResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -108,85 +119,86 @@ internal static ExportDependenciesOperationResult DeserializeExportDependenciesO string name = default; string status = default; ResponseError error = default; - DateTimeOffset? startTime = default; - DateTimeOffset? endTime = default; + DateTimeOffset? startOn = default; + DateTimeOffset? endOn = default; ExportDependenciesResultProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = property.Value.GetString(); + id = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (prop.NameEquals("status"u8)) { - status = property.Value.GetString(); + status = prop.Value.GetString(); continue; } - if (property.NameEquals("error"u8)) + if (prop.NameEquals("error"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerDependencyMapContext.Default); + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); continue; } - if (property.NameEquals("startTime"u8)) + if (prop.NameEquals("startTime"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - startTime = property.Value.GetDateTimeOffset("O"); + startOn = prop.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("endTime"u8)) + if (prop.NameEquals("endTime"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - endTime = property.Value.GetDateTimeOffset("O"); + endOn = prop.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = ExportDependenciesResultProperties.DeserializeExportDependenciesResultProperties(property.Value, options); + properties = ExportDependenciesResultProperties.DeserializeExportDependenciesResultProperties(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new ExportDependenciesOperationResult( id, name, status, error, - startTime, - endTime, + startOn, + endOn, properties, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -196,15 +208,20 @@ BinaryData IPersistableModel.Write(ModelReade } } - ExportDependenciesOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + ExportDependenciesOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ExportDependenciesOperationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeExportDependenciesOperationResult(document.RootElement, options); } default: @@ -212,6 +229,15 @@ ExportDependenciesOperationResult IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static ExportDependenciesOperationResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeExportDependenciesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.cs index 12f96a2aa9b6..68c6176f70c3 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesOperationResult.cs @@ -7,51 +7,20 @@ using System; using System.Collections.Generic; +using Azure; namespace Azure.ResourceManager.DependencyMap.Models { /// Model representing the result of the export dependencies asynchronous operation. public partial class ExportDependenciesOperationResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. - /// is null. internal ExportDependenciesOperationResult(string status) { - Argument.AssertNotNull(status, nameof(status)); - Status = status; } @@ -63,8 +32,8 @@ internal ExportDependenciesOperationResult(string status) /// The start time of the operation. /// The end time of the operation. /// Properties for export dependencies. These should only be set if the status is Succeeded. - /// Keeps track of any properties unknown to the library. - internal ExportDependenciesOperationResult(string id, string name, string status, ResponseError error, DateTimeOffset? startOn, DateTimeOffset? endOn, ExportDependenciesResultProperties properties, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal ExportDependenciesOperationResult(string id, string name, string status, ResponseError error, DateTimeOffset? startOn, DateTimeOffset? endOn, ExportDependenciesResultProperties properties, IDictionary additionalBinaryDataProperties) { Id = id; Name = name; @@ -73,26 +42,27 @@ internal ExportDependenciesOperationResult(string id, string name, string status StartOn = startOn; EndOn = endOn; Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ExportDependenciesOperationResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The status URL of export dependencies operation. public string Id { get; } + /// The resource name of the operation status. It must match the last segment of 'id' field. public string Name { get; } + /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. public string Status { get; } + /// Contains error details if status is Failed/Canceled. public ResponseError Error { get; } + /// The start time of the operation. public DateTimeOffset? StartOn { get; } + /// The end time of the operation. public DateTimeOffset? EndOn { get; } + /// Properties for export dependencies. These should only be set if the status is Succeeded. public ExportDependenciesResultProperties Properties { get; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.Serialization.cs index 665866591466..bc1711026011 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class ExportDependenciesResultProperties : IUtf8JsonSerializable, IJsonModel + /// Model representing properties returned upon successful completion of the export dependencies asynchronous operation. + public partial class ExportDependenciesResultProperties : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesResultProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExportedDataSasUri)) { writer.WritePropertyName("exportedDataSasUri"u8); @@ -49,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("additionalInfo"u8); writer.WriteObjectValue(AdditionalInfo, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,22 +66,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportDependenciesResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + ExportDependenciesResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ExportDependenciesResultProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(ExportDependenciesResultProperties)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeExportDependenciesResultProperties(document.RootElement, options); } - internal static ExportDependenciesResultProperties DeserializeExportDependenciesResultProperties(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ExportDependenciesResultProperties DeserializeExportDependenciesResultProperties(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -89,46 +94,47 @@ internal static ExportDependenciesResultProperties DeserializeExportDependencies string exportedDataSasUri = default; ExportDependenciesStatusCode? statusCode = default; ExportDependenciesAdditionalInfo additionalInfo = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("exportedDataSasUri"u8)) + if (prop.NameEquals("exportedDataSasUri"u8)) { - exportedDataSasUri = property.Value.GetString(); + exportedDataSasUri = prop.Value.GetString(); continue; } - if (property.NameEquals("statusCode"u8)) + if (prop.NameEquals("statusCode"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - statusCode = new ExportDependenciesStatusCode(property.Value.GetString()); + statusCode = new ExportDependenciesStatusCode(prop.Value.GetString()); continue; } - if (property.NameEquals("additionalInfo"u8)) + if (prop.NameEquals("additionalInfo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - additionalInfo = ExportDependenciesAdditionalInfo.DeserializeExportDependenciesAdditionalInfo(property.Value, options); + additionalInfo = ExportDependenciesAdditionalInfo.DeserializeExportDependenciesAdditionalInfo(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new ExportDependenciesResultProperties(exportedDataSasUri, statusCode, additionalInfo, serializedAdditionalRawData); + return new ExportDependenciesResultProperties(exportedDataSasUri, statusCode, additionalInfo, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -138,15 +144,20 @@ BinaryData IPersistableModel.Write(ModelRead } } - ExportDependenciesResultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + ExportDependenciesResultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ExportDependenciesResultProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeExportDependenciesResultProperties(document.RootElement, options); } default: @@ -154,6 +165,7 @@ ExportDependenciesResultProperties IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.cs index 1979c6956404..a231460f2649 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesResultProperties.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.DependencyMap.Models /// Model representing properties returned upon successful completion of the export dependencies asynchronous operation. public partial class ExportDependenciesResultProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . internal ExportDependenciesResultProperties() @@ -54,25 +25,31 @@ internal ExportDependenciesResultProperties() /// The SAS URI of the blob containing the exported dependencies data. /// A status code returned by the service with additional context about the export dependencies operation. /// Additional information about the exported data. - /// Keeps track of any properties unknown to the library. - internal ExportDependenciesResultProperties(string exportedDataSasUri, ExportDependenciesStatusCode? statusCode, ExportDependenciesAdditionalInfo additionalInfo, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal ExportDependenciesResultProperties(string exportedDataSasUri, ExportDependenciesStatusCode? statusCode, ExportDependenciesAdditionalInfo additionalInfo, IDictionary additionalBinaryDataProperties) { ExportedDataSasUri = exportedDataSasUri; StatusCode = statusCode; AdditionalInfo = additionalInfo; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The SAS URI of the blob containing the exported dependencies data. public string ExportedDataSasUri { get; } + /// A status code returned by the service with additional context about the export dependencies operation. public ExportDependenciesStatusCode? StatusCode { get; } + /// Additional information about the exported data. internal ExportDependenciesAdditionalInfo AdditionalInfo { get; } + /// Number of days for which data was available in the exported results. public int? AdditionalInfoAvailableDaysCount { - get => AdditionalInfo?.AvailableDaysCount; + get + { + return AdditionalInfo.AvailableDaysCount; + } } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesStatusCode.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesStatusCode.cs index 6e0fb4d8a84b..b80fcfc8bf4f 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesStatusCode.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/ExportDependenciesStatusCode.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { @@ -14,41 +15,62 @@ namespace Azure.ResourceManager.DependencyMap.Models public readonly partial struct ExportDependenciesStatusCode : IEquatable { private readonly string _value; + /// Operation completed but no data was found for the requested time range. + private const string NoMatchValue = "NoMatch"; + /// Operation completed with data found for the entire requested time range. + private const string CompleteMatchValue = "CompleteMatch"; + /// Operation completed with data found for a portion of the requested time range. + private const string PartialMatchValue = "PartialMatch"; /// Initializes a new instance of . + /// The value. /// is null. public ExportDependenciesStatusCode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string NoMatchValue = "NoMatch"; - private const string CompleteMatchValue = "CompleteMatch"; - private const string PartialMatchValue = "PartialMatch"; + _value = value; + } /// Operation completed but no data was found for the requested time range. public static ExportDependenciesStatusCode NoMatch { get; } = new ExportDependenciesStatusCode(NoMatchValue); + /// Operation completed with data found for the entire requested time range. public static ExportDependenciesStatusCode CompleteMatch { get; } = new ExportDependenciesStatusCode(CompleteMatchValue); + /// Operation completed with data found for a portion of the requested time range. public static ExportDependenciesStatusCode PartialMatch { get; } = new ExportDependenciesStatusCode(PartialMatchValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(ExportDependenciesStatusCode left, ExportDependenciesStatusCode right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(ExportDependenciesStatusCode left, ExportDependenciesStatusCode right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator ExportDependenciesStatusCode(string value) => new ExportDependenciesStatusCode(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator ExportDependenciesStatusCode?(string value) => value == null ? null : new ExportDependenciesStatusCode(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ExportDependenciesStatusCode other && Equals(other); - /// + + /// public bool Equals(ExportDependenciesStatusCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs index 8f85fbd325ae..a337c2db47ab 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.Serialization.cs @@ -10,13 +10,20 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class GetConnectionsForProcessOnFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + /// GetConnectionsForProcessOnFocusedMachine request model. + public partial class GetConnectionsForProcessOnFocusedMachineContent : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal GetConnectionsForProcessOnFocusedMachineContent() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +35,11 @@ void IJsonModel.Write(Utf8JsonW /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("focusedMachineId"u8); writer.WriteStringValue(FocusedMachineId); writer.WritePropertyName("processIdOnFocusedMachine"u8); @@ -43,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("filters"u8); writer.WriteObjectValue(Filters, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -60,22 +66,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - GetConnectionsForProcessOnFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + GetConnectionsForProcessOnFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetConnectionsForProcessOnFocusedMachineContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetConnectionsForProcessOnFocusedMachineContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeGetConnectionsForProcessOnFocusedMachineContent(document.RootElement, options); } - internal static GetConnectionsForProcessOnFocusedMachineContent DeserializeGetConnectionsForProcessOnFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetConnectionsForProcessOnFocusedMachineContent DeserializeGetConnectionsForProcessOnFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -83,42 +94,43 @@ internal static GetConnectionsForProcessOnFocusedMachineContent DeserializeGetCo ResourceIdentifier focusedMachineId = default; string processIdOnFocusedMachine = default; DependencyMapVisualizationFilter filters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("focusedMachineId"u8)) + if (prop.NameEquals("focusedMachineId"u8)) { - focusedMachineId = new ResourceIdentifier(property.Value.GetString()); + focusedMachineId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("processIdOnFocusedMachine"u8)) + if (prop.NameEquals("processIdOnFocusedMachine"u8)) { - processIdOnFocusedMachine = property.Value.GetString(); + processIdOnFocusedMachine = prop.Value.GetString(); continue; } - if (property.NameEquals("filters"u8)) + if (prop.NameEquals("filters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, serializedAdditionalRawData); + return new GetConnectionsForProcessOnFocusedMachineContent(focusedMachineId, processIdOnFocusedMachine, filters, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -128,15 +140,20 @@ BinaryData IPersistableModel.Wr } } - GetConnectionsForProcessOnFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + GetConnectionsForProcessOnFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetConnectionsForProcessOnFocusedMachineContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeGetConnectionsForProcessOnFocusedMachineContent(document.RootElement, options); } default: @@ -144,6 +161,19 @@ GetConnectionsForProcessOnFocusedMachineContent IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(GetConnectionsForProcessOnFocusedMachineContent getConnectionsForProcessOnFocusedMachineContent) + { + if (getConnectionsForProcessOnFocusedMachineContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(getConnectionsForProcessOnFocusedMachineContent, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs index 5cb48b81fc4b..007cb6895b59 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsForProcessOnFocusedMachineContent.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// GetConnectionsForProcessOnFocusedMachine request model. public partial class GetConnectionsForProcessOnFocusedMachineContent { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Machine arm id. @@ -63,24 +35,21 @@ public GetConnectionsForProcessOnFocusedMachineContent(ResourceIdentifier focuse /// Machine arm id. /// Process id. /// Filters for GetProcessNetworkConnections. - /// Keeps track of any properties unknown to the library. - internal GetConnectionsForProcessOnFocusedMachineContent(ResourceIdentifier focusedMachineId, string processIdOnFocusedMachine, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal GetConnectionsForProcessOnFocusedMachineContent(ResourceIdentifier focusedMachineId, string processIdOnFocusedMachine, DependencyMapVisualizationFilter filters, IDictionary additionalBinaryDataProperties) { FocusedMachineId = focusedMachineId; ProcessIdOnFocusedMachine = processIdOnFocusedMachine; Filters = filters; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetConnectionsForProcessOnFocusedMachineContent() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Machine arm id. public ResourceIdentifier FocusedMachineId { get; } + /// Process id. public string ProcessIdOnFocusedMachine { get; } + /// Filters for GetProcessNetworkConnections. public DependencyMapVisualizationFilter Filters { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs index bc70be278af1..411806c286ee 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.Serialization.cs @@ -10,13 +10,20 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class GetConnectionsWithConnectedMachineForFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + /// GetConnectionsWithConnectedMachineForFocusedMachine request model. + public partial class GetConnectionsWithConnectedMachineForFocusedMachineContent : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal GetConnectionsWithConnectedMachineForFocusedMachineContent() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +35,11 @@ void IJsonModel.Writ /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("focusedMachineId"u8); writer.WriteStringValue(FocusedMachineId); writer.WritePropertyName("connectedMachineId"u8); @@ -43,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("filters"u8); writer.WriteObjectValue(Filters, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -60,22 +66,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - GetConnectionsWithConnectedMachineForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + GetConnectionsWithConnectedMachineForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetConnectionsWithConnectedMachineForFocusedMachineContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetConnectionsWithConnectedMachineForFocusedMachineContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(document.RootElement, options); } - internal static GetConnectionsWithConnectedMachineForFocusedMachineContent DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetConnectionsWithConnectedMachineForFocusedMachineContent DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -83,42 +94,43 @@ internal static GetConnectionsWithConnectedMachineForFocusedMachineContent Deser ResourceIdentifier focusedMachineId = default; ResourceIdentifier connectedMachineId = default; DependencyMapVisualizationFilter filters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("focusedMachineId"u8)) + if (prop.NameEquals("focusedMachineId"u8)) { - focusedMachineId = new ResourceIdentifier(property.Value.GetString()); + focusedMachineId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("connectedMachineId"u8)) + if (prop.NameEquals("connectedMachineId"u8)) { - connectedMachineId = new ResourceIdentifier(property.Value.GetString()); + connectedMachineId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("filters"u8)) + if (prop.NameEquals("filters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, serializedAdditionalRawData); + return new GetConnectionsWithConnectedMachineForFocusedMachineContent(focusedMachineId, connectedMachineId, filters, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -128,15 +140,20 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + GetConnectionsWithConnectedMachineForFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetConnectionsWithConnectedMachineForFocusedMachineContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeGetConnectionsWithConnectedMachineForFocusedMachineContent(document.RootElement, options); } default: @@ -144,6 +161,19 @@ GetConnectionsWithConnectedMachineForFocusedMachineContent IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(GetConnectionsWithConnectedMachineForFocusedMachineContent getConnectionsWithConnectedMachineForFocusedMachineContent) + { + if (getConnectionsWithConnectedMachineForFocusedMachineContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(getConnectionsWithConnectedMachineForFocusedMachineContent, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs index a6c066c17a88..4ae242e8b4d1 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetConnectionsWithConnectedMachineForFocusedMachineContent.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// GetConnectionsWithConnectedMachineForFocusedMachine request model. public partial class GetConnectionsWithConnectedMachineForFocusedMachineContent { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Source machine arm id. @@ -63,24 +35,21 @@ public GetConnectionsWithConnectedMachineForFocusedMachineContent(ResourceIdenti /// Source machine arm id. /// Destination machine arm id. /// Filters for GetNetworkConnectionsBetweenMachines. - /// Keeps track of any properties unknown to the library. - internal GetConnectionsWithConnectedMachineForFocusedMachineContent(ResourceIdentifier focusedMachineId, ResourceIdentifier connectedMachineId, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal GetConnectionsWithConnectedMachineForFocusedMachineContent(ResourceIdentifier focusedMachineId, ResourceIdentifier connectedMachineId, DependencyMapVisualizationFilter filters, IDictionary additionalBinaryDataProperties) { FocusedMachineId = focusedMachineId; ConnectedMachineId = connectedMachineId; Filters = filters; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetConnectionsWithConnectedMachineForFocusedMachineContent() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Source machine arm id. public ResourceIdentifier FocusedMachineId { get; } + /// Destination machine arm id. public ResourceIdentifier ConnectedMachineId { get; } + /// Filters for GetNetworkConnectionsBetweenMachines. public DependencyMapVisualizationFilter Filters { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.Serialization.cs new file mode 100644 index 000000000000..75ef13ccf2bc --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DependencyMap; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// GetDependencyViewForAllMachines request model. + public partial class GetDependencyViewForAllMachinesContent : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesContent)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteObjectValue(Filters, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetDependencyViewForAllMachinesContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetDependencyViewForAllMachinesContent DeserializeGetDependencyViewForAllMachinesContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DependencyProcessFilter filters = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("filters"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + filters = DependencyProcessFilter.DeserializeDependencyProcessFilter(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new GetDependencyViewForAllMachinesContent(filters, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDependencyMapContext.Default); + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesContent)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeGetDependencyViewForAllMachinesContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(GetDependencyViewForAllMachinesContent getDependencyViewForAllMachinesContent) + { + if (getDependencyViewForAllMachinesContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(getDependencyViewForAllMachinesContent, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.cs new file mode 100644 index 000000000000..cfd523a188bf --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesContent.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// GetDependencyViewForAllMachines request model. + public partial class GetDependencyViewForAllMachinesContent + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public GetDependencyViewForAllMachinesContent() + { + } + + /// Initializes a new instance of . + /// Filters for GetDependencyViewForAllMachines. + /// Keeps track of any properties unknown to the library. + internal GetDependencyViewForAllMachinesContent(DependencyProcessFilter filters, IDictionary additionalBinaryDataProperties) + { + Filters = filters; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Filters for GetDependencyViewForAllMachines. + internal DependencyProcessFilter Filters { get; set; } + + /// Process name filter. + public DependencyMapProcessNameFilter ProcessNameFilter + { + get + { + return Filters is null ? default : Filters.ProcessNameFilter; + } + set + { + if (Filters is null) + { + Filters = new DependencyProcessFilter(); + } + Filters.ProcessNameFilter = value; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.Serialization.cs new file mode 100644 index 000000000000..576144b6056a --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure; +using Azure.ResourceManager.DependencyMap; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Model representing the result of the export dependencies asynchronous operation. + public partial class GetDependencyViewForAllMachinesOperationResult : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal GetDependencyViewForAllMachinesOperationResult() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesOperationResult)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + ((IJsonModel)Error).Write(writer, options); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesOperationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesOperationResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetDependencyViewForAllMachinesOperationResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetDependencyViewForAllMachinesOperationResult DeserializeGetDependencyViewForAllMachinesOperationResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string name = default; + string status = default; + ResponseError error = default; + DateTimeOffset? startOn = default; + DateTimeOffset? endOn = default; + GetDependencyViewForAllMachinesResultProperties properties = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("error"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDependencyMapContext.Default); + continue; + } + if (prop.NameEquals("startTime"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startOn = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("endTime"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endOn = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = GetDependencyViewForAllMachinesResultProperties.DeserializeGetDependencyViewForAllMachinesResultProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new GetDependencyViewForAllMachinesOperationResult( + id, + name, + status, + error, + startOn, + endOn, + properties, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDependencyMapContext.Default); + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesOperationResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesOperationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeGetDependencyViewForAllMachinesOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesOperationResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static GetDependencyViewForAllMachinesOperationResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeGetDependencyViewForAllMachinesOperationResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.cs new file mode 100644 index 000000000000..f9a4320122c6 --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesOperationResult.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Model representing the result of the export dependencies asynchronous operation. + public partial class GetDependencyViewForAllMachinesOperationResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. + internal GetDependencyViewForAllMachinesOperationResult(string status) + { + Status = status; + } + + /// Initializes a new instance of . + /// The status URL of the asynchronous operation. + /// The resource name of the operation status. It must match the last segment of 'id' field. + /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. + /// Contains error details if status is Failed/Canceled. + /// The start time of the operation. + /// The end time of the operation. + /// Properties for export dependencies. These should only be set if the status is Succeeded. + /// Keeps track of any properties unknown to the library. + internal GetDependencyViewForAllMachinesOperationResult(string id, string name, string status, ResponseError error, DateTimeOffset? startOn, DateTimeOffset? endOn, GetDependencyViewForAllMachinesResultProperties properties, IDictionary additionalBinaryDataProperties) + { + Id = id; + Name = name; + Status = status; + Error = error; + StartOn = startOn; + EndOn = endOn; + Properties = properties; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The status URL of the asynchronous operation. + public string Id { get; } + + /// The resource name of the operation status. It must match the last segment of 'id' field. + public string Name { get; } + + /// The overall arm status of the operation. It has one of the terminal states - Succeeded/Failed/Canceled. + public string Status { get; } + + /// Contains error details if status is Failed/Canceled. + public ResponseError Error { get; } + + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + + /// Properties for export dependencies. These should only be set if the status is Succeeded. + internal GetDependencyViewForAllMachinesResultProperties Properties { get; } + + /// The SAS URI of the blob containing the layout file for the multi-server view. + public string GetDependencyViewForAllMachinesResultLayoutFileSasUri + { + get + { + return Properties.LayoutFileSasUri; + } + } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.Serialization.cs new file mode 100644 index 000000000000..05f98fb3317b --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DependencyMap; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Model representing properties returned upon successful completion of the export dependencies asynchronous operation. + internal partial class GetDependencyViewForAllMachinesResultProperties : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal GetDependencyViewForAllMachinesResultProperties() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesResultProperties)} does not support writing '{format}' format."); + } + writer.WritePropertyName("layoutFileSasUrl"u8); + writer.WriteStringValue(LayoutFileSasUri); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesResultProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesResultProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGetDependencyViewForAllMachinesResultProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetDependencyViewForAllMachinesResultProperties DeserializeGetDependencyViewForAllMachinesResultProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string layoutFileSasUri = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("layoutFileSasUrl"u8)) + { + layoutFileSasUri = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new GetDependencyViewForAllMachinesResultProperties(layoutFileSasUri, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDependencyMapContext.Default); + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesResultProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + GetDependencyViewForAllMachinesResultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForAllMachinesResultProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeGetDependencyViewForAllMachinesResultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GetDependencyViewForAllMachinesResultProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.cs new file mode 100644 index 000000000000..ed0a099cd6cd --- /dev/null +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForAllMachinesResultProperties.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DependencyMap.Models +{ + /// Model representing properties returned upon successful completion of the export dependencies asynchronous operation. + internal partial class GetDependencyViewForAllMachinesResultProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The SAS URI of the blob containing the layout file for the multi-server view. + internal GetDependencyViewForAllMachinesResultProperties(string layoutFileSasUri) + { + LayoutFileSasUri = layoutFileSasUri; + } + + /// Initializes a new instance of . + /// The SAS URI of the blob containing the layout file for the multi-server view. + /// Keeps track of any properties unknown to the library. + internal GetDependencyViewForAllMachinesResultProperties(string layoutFileSasUri, IDictionary additionalBinaryDataProperties) + { + LayoutFileSasUri = layoutFileSasUri; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The SAS URI of the blob containing the layout file for the multi-server view. + public string LayoutFileSasUri { get; } + } +} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs index c56cb49aa277..80fe78141eab 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.Serialization.cs @@ -10,13 +10,20 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class GetDependencyViewForFocusedMachineContent : IUtf8JsonSerializable, IJsonModel + /// GetDependencyViewForFocusedMachine request model. + public partial class GetDependencyViewForFocusedMachineContent : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal GetDependencyViewForFocusedMachineContent() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("focusedMachineId"u8); writer.WriteStringValue(FocusedMachineId); if (Optional.IsDefined(Filters)) @@ -41,15 +47,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("filters"u8); writer.WriteObjectValue(Filters, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -58,59 +64,65 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - GetDependencyViewForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + GetDependencyViewForFocusedMachineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForFocusedMachineContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(GetDependencyViewForFocusedMachineContent)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeGetDependencyViewForFocusedMachineContent(document.RootElement, options); } - internal static GetDependencyViewForFocusedMachineContent DeserializeGetDependencyViewForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GetDependencyViewForFocusedMachineContent DeserializeGetDependencyViewForFocusedMachineContent(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } ResourceIdentifier focusedMachineId = default; DependencyMapVisualizationFilter filters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("focusedMachineId"u8)) + if (prop.NameEquals("focusedMachineId"u8)) { - focusedMachineId = new ResourceIdentifier(property.Value.GetString()); + focusedMachineId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("filters"u8)) + if (prop.NameEquals("filters"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(property.Value, options); + filters = DependencyMapVisualizationFilter.DeserializeDependencyMapVisualizationFilter(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, serializedAdditionalRawData); + return new GetDependencyViewForFocusedMachineContent(focusedMachineId, filters, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -120,15 +132,20 @@ BinaryData IPersistableModel.Write(Mo } } - GetDependencyViewForFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + GetDependencyViewForFocusedMachineContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual GetDependencyViewForFocusedMachineContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeGetDependencyViewForFocusedMachineContent(document.RootElement, options); } default: @@ -136,6 +153,19 @@ GetDependencyViewForFocusedMachineContent IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(GetDependencyViewForFocusedMachineContent getDependencyViewForFocusedMachineContent) + { + if (getDependencyViewForFocusedMachineContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(getDependencyViewForFocusedMachineContent, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs index 91b8318c3ee0..270817e57636 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/GetDependencyViewForFocusedMachineContent.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// GetDependencyViewForFocusedMachine request model. public partial class GetDependencyViewForFocusedMachineContent { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Machine arm id. @@ -59,21 +31,17 @@ public GetDependencyViewForFocusedMachineContent(ResourceIdentifier focusedMachi /// Initializes a new instance of . /// Machine arm id. /// Filters for GetSingleMachineDependencyView. - /// Keeps track of any properties unknown to the library. - internal GetDependencyViewForFocusedMachineContent(ResourceIdentifier focusedMachineId, DependencyMapVisualizationFilter filters, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal GetDependencyViewForFocusedMachineContent(ResourceIdentifier focusedMachineId, DependencyMapVisualizationFilter filters, IDictionary additionalBinaryDataProperties) { FocusedMachineId = focusedMachineId; Filters = filters; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetDependencyViewForFocusedMachineContent() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Machine arm id. public ResourceIdentifier FocusedMachineId { get; } + /// Filters for GetSingleMachineDependencyView. public DependencyMapVisualizationFilter Filters { get; set; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs index 2c84e8f3b8f7..5b64d9487b2b 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.Serialization.cs @@ -9,14 +9,21 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - internal partial class MapsResourceListResult : IUtf8JsonSerializable, IJsonModel + /// The response of a MapsResource list operation. + internal partial class MapsResourceListResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal MapsResourceListResult() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,15 +35,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Value) + foreach (DependencyMapData item in Value) { writer.WriteObjectValue(item, options); } @@ -46,15 +52,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -63,64 +69,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MapsResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + MapsResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual MapsResourceListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MapsResourceListResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMapsResourceListResult(document.RootElement, options); } - internal static MapsResourceListResult DeserializeMapsResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static MapsResourceListResult DeserializeMapsResourceListResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IList value = default; Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(DependencyMapData.DeserializeDependencyMapData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) + if (prop.NameEquals("nextLink"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - nextLink = new Uri(property.Value.GetString()); + nextLink = new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MapsResourceListResult(value, nextLink, serializedAdditionalRawData); + return new MapsResourceListResult(value, nextLink, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti } } - MapsResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + MapsResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual MapsResourceListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeMapsResourceListResult(document.RootElement, options); } default: @@ -146,6 +163,15 @@ MapsResourceListResult IPersistableModel.Create(BinaryDa } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static MapsResourceListResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeMapsResourceListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs index aceec270ff82..bae8773bb4e5 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/MapsResourceListResult.cs @@ -8,72 +8,37 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { /// The response of a MapsResource list operation. internal partial class MapsResourceListResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// The MapsResource items on this page. - /// is null. internal MapsResourceListResult(IEnumerable value) { - Argument.AssertNotNull(value, nameof(value)); - Value = value.ToList(); } /// Initializes a new instance of . /// The MapsResource items on this page. /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal MapsResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal MapsResourceListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) { Value = value; NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MapsResourceListResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The MapsResource items on this page. - public IReadOnlyList Value { get; } + public IList Value { get; } + /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.Serialization.cs index ed4ecceaba85..e64e3227b6a8 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.Serialization.cs @@ -10,13 +10,20 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - public partial class OffAzureDiscoverySourceProperties : IUtf8JsonSerializable, IJsonModel + /// OffAzure discovery source resource properties. + public partial class OffAzureDiscoverySourceProperties : DependencyMapDiscoverySourceProperties, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal OffAzureDiscoverySourceProperties() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,31 +35,35 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OffAzureDiscoverySourceProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); } - OffAzureDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + OffAzureDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (OffAzureDiscoverySourceProperties)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(OffAzureDiscoverySourceProperties)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeOffAzureDiscoverySourceProperties(document.RootElement, options); } - internal static OffAzureDiscoverySourceProperties DeserializeOffAzureDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static OffAzureDiscoverySourceProperties DeserializeOffAzureDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -60,42 +71,43 @@ internal static OffAzureDiscoverySourceProperties DeserializeOffAzureDiscoverySo DependencyMapProvisioningState? provisioningState = default; SourceType sourceType = default; ResourceIdentifier sourceId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("provisioningState"u8)) + if (prop.NameEquals("provisioningState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new DependencyMapProvisioningState(property.Value.GetString()); + provisioningState = new DependencyMapProvisioningState(prop.Value.GetString()); continue; } - if (property.NameEquals("sourceType"u8)) + if (prop.NameEquals("sourceType"u8)) { - sourceType = new SourceType(property.Value.GetString()); + sourceType = new SourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("sourceId"u8)) + if (prop.NameEquals("sourceId"u8)) { - sourceId = new ResourceIdentifier(property.Value.GetString()); + sourceId = new ResourceIdentifier(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new OffAzureDiscoverySourceProperties(provisioningState, sourceType, sourceId, serializedAdditionalRawData); + return new OffAzureDiscoverySourceProperties(provisioningState, sourceType, sourceId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +117,20 @@ BinaryData IPersistableModel.Write(ModelReade } } - OffAzureDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + OffAzureDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (OffAzureDiscoverySourceProperties)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected override DependencyMapDiscoverySourceProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeOffAzureDiscoverySourceProperties(document.RootElement, options); } default: @@ -121,6 +138,7 @@ OffAzureDiscoverySourceProperties IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.cs index a54245ffc737..6e1dd1679bcf 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/OffAzureDiscoverySourceProperties.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { @@ -17,25 +18,18 @@ public partial class OffAzureDiscoverySourceProperties : DependencyMapDiscoveryS /// Initializes a new instance of . /// Source ArmId of Discovery Source resource. /// is null. - public OffAzureDiscoverySourceProperties(ResourceIdentifier sourceId) : base(sourceId) + public OffAzureDiscoverySourceProperties(ResourceIdentifier sourceId) : base(SourceType.OffAzure, sourceId) { Argument.AssertNotNull(sourceId, nameof(sourceId)); - SourceType = SourceType.OffAzure; } /// Initializes a new instance of . /// Provisioning state of Discovery Source resource. /// Source type of Discovery Source resource. /// Source ArmId of Discovery Source resource. - /// Keeps track of any properties unknown to the library. - internal OffAzureDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary serializedAdditionalRawData) : base(provisioningState, sourceType, sourceId, serializedAdditionalRawData) - { - SourceType = sourceType; - } - - /// Initializes a new instance of for deserialization. - internal OffAzureDiscoverySourceProperties() + /// Keeps track of any properties unknown to the library. + internal OffAzureDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary additionalBinaryDataProperties) : base(provisioningState, sourceType, sourceId, additionalBinaryDataProperties) { } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs index 6e1732d5abca..afb1bf6e84f1 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/SourceType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { @@ -14,35 +15,52 @@ namespace Azure.ResourceManager.DependencyMap.Models internal readonly partial struct SourceType : IEquatable { private readonly string _value; + /// OffAzure source type. + private const string OffAzureValue = "OffAzure"; /// Initializes a new instance of . + /// The value. /// is null. public SourceType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string OffAzureValue = "OffAzure"; + _value = value; + } /// OffAzure source type. public static SourceType OffAzure { get; } = new SourceType(OffAzureValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SourceType left, SourceType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SourceType left, SourceType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SourceType(string value) => new SourceType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SourceType?(string value) => value == null ? null : new SourceType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SourceType other && Equals(other); - /// + + /// public bool Equals(SourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.Serialization.cs index 11b36fe54923..6dd4e722cf0d 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.Serialization.cs @@ -10,13 +10,19 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.DependencyMap; namespace Azure.ResourceManager.DependencyMap.Models { - internal partial class UnknownDependencyMapDiscoverySourceProperties : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownDependencyMapDiscoverySourceProperties : DependencyMapDiscoverySourceProperties, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal UnknownDependencyMapDiscoverySourceProperties() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,74 +34,79 @@ void IJsonModel.Write(Utf8JsonWriter wri /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceProperties)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); } - DependencyMapDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DependencyMapDiscoverySourceProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(DependencyMapDiscoverySourceProperties)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeDependencyMapDiscoverySourceProperties(document.RootElement, options); } - internal static UnknownDependencyMapDiscoverySourceProperties DeserializeUnknownDependencyMapDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownDependencyMapDiscoverySourceProperties DeserializeUnknownDependencyMapDiscoverySourceProperties(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } DependencyMapProvisioningState? provisioningState = default; - SourceType sourceType = "Unknown"; + SourceType sourceType = default; ResourceIdentifier sourceId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("provisioningState"u8)) + if (prop.NameEquals("provisioningState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new DependencyMapProvisioningState(property.Value.GetString()); + provisioningState = new DependencyMapProvisioningState(prop.Value.GetString()); continue; } - if (property.NameEquals("sourceType"u8)) + if (prop.NameEquals("sourceType"u8)) { - sourceType = new SourceType(property.Value.GetString()); + sourceType = new SourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("sourceId"u8)) + if (prop.NameEquals("sourceId"u8)) { - sourceId = new ResourceIdentifier(property.Value.GetString()); + sourceId = new ResourceIdentifier(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownDependencyMapDiscoverySourceProperties(provisioningState, sourceType, sourceId, serializedAdditionalRawData); + return new UnknownDependencyMapDiscoverySourceProperties(provisioningState, sourceType, sourceId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -105,15 +116,20 @@ BinaryData IPersistableModel.Write(Model } } - DependencyMapDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + DependencyMapDiscoverySourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected override DependencyMapDiscoverySourceProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDependencyMapDiscoverySourceProperties(document.RootElement, options); } default: @@ -121,6 +137,7 @@ DependencyMapDiscoverySourceProperties IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.cs index 28c559728f84..5bf4d3d07c32 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/Models/UnknownDependencyMapDiscoverySourceProperties.cs @@ -11,21 +11,14 @@ namespace Azure.ResourceManager.DependencyMap.Models { - /// Unknown version of DependencyMapDiscoverySourceProperties. internal partial class UnknownDependencyMapDiscoverySourceProperties : DependencyMapDiscoverySourceProperties { /// Initializes a new instance of . /// Provisioning state of Discovery Source resource. /// Source type of Discovery Source resource. /// Source ArmId of Discovery Source resource. - /// Keeps track of any properties unknown to the library. - internal UnknownDependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary serializedAdditionalRawData) : base(provisioningState, sourceType, sourceId, serializedAdditionalRawData) - { - SourceType = sourceType; - } - - /// Initializes a new instance of for deserialization. - internal UnknownDependencyMapDiscoverySourceProperties() + /// Keeps track of any properties unknown to the library. + internal UnknownDependencyMapDiscoverySourceProperties(DependencyMapProvisioningState? provisioningState, SourceType sourceType, ResourceIdentifier sourceId, IDictionary additionalBinaryDataProperties) : base(provisioningState, sourceType != default ? sourceType : "unknown", sourceId, additionalBinaryDataProperties) { } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs index 24660c191602..77a1f6794cee 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/ProviderConstants.cs @@ -9,8 +9,9 @@ namespace Azure.ResourceManager.DependencyMap { - internal static class ProviderConstants + internal static partial class ProviderConstants { + /// Gets the DefaultProviderNamespace. public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs index ca9f6e64115d..69c2b6126cfe 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/DiscoverySourcesRestOperations.cs @@ -6,143 +6,44 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DependencyMap.Models; namespace Azure.ResourceManager.DependencyMap { - internal partial class DiscoverySourcesRestOperations + internal partial class DiscoverySources { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of DiscoverySourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// Service host. - /// The API version to use for this operation. - /// or is null. - public DiscoverySourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// Initializes a new instance of DiscoverySources for mocking. + protected DiscoverySources() { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + /// Initializes a new instance of DiscoverySources. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal DiscoverySources(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/discoverySources/", false); - uri.AppendPath(sourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/discoverySources/", false); - uri.AppendPath(sourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName, sourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DependencyMapDiscoverySourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DependencyMapDiscoverySourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - /// Get a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName, sourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DependencyMapDiscoverySourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DependencyMapDiscoverySourceData.DeserializeDependencyMapDiscoverySourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DependencyMapDiscoverySourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourceData data) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -153,15 +54,17 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath("/discoverySources/", false); uri.AppendPath(sourceName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourceData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -172,96 +75,19 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/discoverySources/", false); uri.AppendPath(sourceName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Create a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// Resource create parameters. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// Resource create parameters. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourcePatch patch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/discoverySources/", false); - uri.AppendPath(sourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourcePatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -272,96 +98,19 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/discoverySources/", false); uri.AppendPath(sourceName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Update a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string mapName, string sourceName, DependencyMapDiscoverySourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, sourceName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string mapName, string sourceName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/discoverySources/", false); - uri.AppendPath(sourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName, string sourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -372,86 +121,16 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/discoverySources/", false); uri.AppendPath(sourceName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Delete a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName, sourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a DiscoverySourceResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// discovery source resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string mapName, string sourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNullOrEmpty(sourceName, nameof(sourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName, sourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByMapsResourceRequestUri(string subscriptionId, string resourceGroupName, string mapName) + internal HttpMessage CreateGetByMapsResourceRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/discoverySources", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByMapsResourceRequest(string subscriptionId, string resourceGroupName, string mapName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -461,152 +140,24 @@ internal HttpMessage CreateListByMapsResourceRequest(string subscriptionId, stri uri.AppendPath(mapName, true); uri.AppendPath("/discoverySources", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List DiscoverySourceResource resources by MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByMapsResourceAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateListByMapsResourceRequest(subscriptionId, resourceGroupName, mapName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DiscoverySourceResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List DiscoverySourceResource resources by MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByMapsResource(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateListByMapsResourceRequest(subscriptionId, resourceGroupName, mapName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DiscoverySourceResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByMapsResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string mapName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByMapsResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string mapName) + internal HttpMessage CreateNextGetByMapsResourceRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string mapName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// List DiscoverySourceResource resources by MapsResource. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByMapsResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateListByMapsResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, mapName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DiscoverySourceResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List DiscoverySourceResource resources by MapsResource. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByMapsResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateListByMapsResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, mapName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DiscoverySourceResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DiscoverySourceResourceListResult.DeserializeDiscoverySourceResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs index 303682057357..6508d3f33680 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/RestOperations/MapsRestOperations.cs @@ -6,135 +6,44 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DependencyMap.Models; namespace Azure.ResourceManager.DependencyMap { - internal partial class MapsRestOperations + internal partial class Maps { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of MapsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// Service host. - /// The API version to use for this operation. - /// or is null. - public MapsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string mapName) + /// Initializes a new instance of Maps for mocking. + protected Maps() { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + /// Initializes a new instance of Maps. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal Maps(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DependencyMapData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DependencyMapData.DeserializeDependencyMapData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DependencyMapData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Get a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, mapName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DependencyMapData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DependencyMapData.DeserializeDependencyMapData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DependencyMapData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, DependencyMapData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -143,15 +52,17 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); uri.AppendPath(mapName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, DependencyMapData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -160,90 +71,19 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); uri.AppendPath(mapName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Create a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string mapName, DependencyMapData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string mapName, DependencyMapData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, mapName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string mapName, DependencyMapPatch patch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string mapName, DependencyMapPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -252,90 +92,19 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); uri.AppendPath(mapName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Update a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string mapName, DependencyMapPatch patch, CancellationToken cancellationToken = default) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string mapName, DependencyMapPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, mapName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string mapName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string mapName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -344,80 +113,16 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); uri.AppendPath(mapName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Delete a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) + internal HttpMessage CreateGetByResourceGroupRequest(string subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a MapsResource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string mapName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, mapName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -425,165 +130,57 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DependencyMap/maps", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List MapsResource resources by resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List MapsResource resources by resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + internal HttpMessage CreateGetBySubscriptionRequest(string subscriptionId, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.DependencyMap/maps", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List MapsResource resources by subscription ID. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List MapsResource resources by subscription ID. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetDependencyViewForFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content) + internal HttpMessage CreateNextGetBySubscriptionRequest(Uri nextPage, string subscriptionId, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/getDependencyViewForFocusedMachine", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateGetDependencyViewForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content) + internal HttpMessage CreateGetDependencyViewForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -593,88 +190,18 @@ internal HttpMessage CreateGetDependencyViewForFocusedMachineRequest(string subs uri.AppendPath(mapName, true); uri.AppendPath("/getDependencyViewForFocusedMachine", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; return message; } - /// Get dependency map of single machine. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task GetDependencyViewForFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetDependencyViewForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get dependency map of single machine. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetDependencyViewForFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetDependencyViewForFocusedMachineContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetDependencyViewForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetConnectionsWithConnectedMachineForFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/getConnectionsWithConnectedMachineForFocusedMachine", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content) + internal HttpMessage CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -684,88 +211,18 @@ internal HttpMessage CreateGetConnectionsWithConnectedMachineForFocusedMachineRe uri.AppendPath(mapName, true); uri.AppendPath("/getConnectionsWithConnectedMachineForFocusedMachine", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; return message; } - /// Get network connections between machines. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task GetConnectionsWithConnectedMachineForFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get network connections between machines. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetConnectionsWithConnectedMachineForFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsWithConnectedMachineForFocusedMachineContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetConnectionsWithConnectedMachineForFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetConnectionsForProcessOnFocusedMachineRequestUri(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content) + internal HttpMessage CreateGetConnectionsForProcessOnFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); - uri.AppendPath(mapName, true); - uri.AppendPath("/getConnectionsForProcessOnFocusedMachine", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetConnectionsForProcessOnFocusedMachineRequest(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -775,70 +232,18 @@ internal HttpMessage CreateGetConnectionsForProcessOnFocusedMachineRequest(strin uri.AppendPath(mapName, true); uri.AppendPath("/getConnectionsForProcessOnFocusedMachine", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; return message; } - /// Get network connections of a process. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task GetConnectionsForProcessOnFocusedMachineAsync(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) + internal HttpMessage CreateExportDependenciesRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetConnectionsForProcessOnFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get network connections of a process. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetConnectionsForProcessOnFocusedMachine(string subscriptionId, string resourceGroupName, string mapName, GetConnectionsForProcessOnFocusedMachineContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateGetConnectionsForProcessOnFocusedMachineRequest(subscriptionId, resourceGroupName, mapName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateExportDependenciesRequestUri(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -848,15 +253,19 @@ internal RequestUriBuilder CreateExportDependenciesRequestUri(string subscriptio uri.AppendPath(mapName, true); uri.AppendPath("/exportDependencies", false); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; + return message; } - internal HttpMessage CreateExportDependenciesRequest(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content) + internal HttpMessage CreateGetDependencyViewForAllMachinesRequest(string subscriptionId, string resourceGroupName, string mapName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -864,226 +273,16 @@ internal HttpMessage CreateExportDependenciesRequest(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DependencyMap/maps/", false); uri.AppendPath(mapName, true); - uri.AppendPath("/exportDependencies", false); + uri.AppendPath("/getDependencyViewForAllMachines", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Export dependencies. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ExportDependenciesAsync(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateExportDependenciesRequest(subscriptionId, resourceGroupName, mapName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Export dependencies. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Maps resource name. - /// The content of the action request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ExportDependencies(string subscriptionId, string resourceGroupName, string mapName, ExportDependenciesContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(mapName, nameof(mapName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateExportDependenciesRequest(subscriptionId, resourceGroupName, mapName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List MapsResource resources by resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List MapsResource resources by resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; return message; } - - /// List MapsResource resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List MapsResource resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MapsResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MapsResourceListResult.DeserializeMapsResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapCollection.cs deleted file mode 100644 index cf98eb56e9f4..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapCollection.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DependencyMap.Samples -{ - public partial class Sample_DependencyMapCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_MapsCreateOrUpdateGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_CreateOrUpdate.json - // this example is just showing the usage of "MapsResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DependencyMapResource - DependencyMapCollection collection = resourceGroupResource.GetDependencyMaps(); - - // invoke the operation - string mapName = "mapsTest1"; - DependencyMapData data = new DependencyMapData(new AzureLocation("wjtzelgfcmswfeflfltwxqveo")) - { - Tags = { }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mapName, data); - DependencyMapResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_MapsGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Get.json - // this example is just showing the usage of "MapsResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DependencyMapResource - DependencyMapCollection collection = resourceGroupResource.GetDependencyMaps(); - - // invoke the operation - string mapName = "mapsTest1"; - DependencyMapResource result = await collection.GetAsync(mapName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_MapsListByResourceGroupGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_ListByResourceGroup.json - // this example is just showing the usage of "MapsResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DependencyMapResource - DependencyMapCollection collection = resourceGroupResource.GetDependencyMaps(); - - // invoke the operation and iterate over the result - await foreach (DependencyMapResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_MapsGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Get.json - // this example is just showing the usage of "MapsResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DependencyMapResource - DependencyMapCollection collection = resourceGroupResource.GetDependencyMaps(); - - // invoke the operation - string mapName = "mapsTest1"; - bool result = await collection.ExistsAsync(mapName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_MapsGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Get.json - // this example is just showing the usage of "MapsResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DependencyMapResource - DependencyMapCollection collection = resourceGroupResource.GetDependencyMaps(); - - // invoke the operation - string mapName = "mapsTest1"; - NullableResponse response = await collection.GetIfExistsAsync(mapName); - DependencyMapResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs deleted file mode 100644 index 332fcf9caf60..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceCollection.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DependencyMap.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DependencyMap.Samples -{ - public partial class Sample_DependencyMapDiscoverySourceCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_DiscoverySourcesCreateOrUpdateGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_CreateOrUpdate.json - // this example is just showing the usage of "DiscoverySourceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // get the collection of this DependencyMapDiscoverySourceResource - DependencyMapDiscoverySourceCollection collection = dependencyMap.GetDependencyMapDiscoverySources(); - - // invoke the operation - string sourceName = "sourceTest1"; - DependencyMapDiscoverySourceData data = new DependencyMapDiscoverySourceData(new AzureLocation("y")) - { - Properties = new OffAzureDiscoverySourceProperties(new ResourceIdentifier("wzlrkzumplzjmixbqv")), - Tags = { }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sourceName, data); - DependencyMapDiscoverySourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_DiscoverySourcesGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Get.json - // this example is just showing the usage of "DiscoverySourceResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // get the collection of this DependencyMapDiscoverySourceResource - DependencyMapDiscoverySourceCollection collection = dependencyMap.GetDependencyMapDiscoverySources(); - - // invoke the operation - string sourceName = "sourceTest1"; - DependencyMapDiscoverySourceResource result = await collection.GetAsync(sourceName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_DiscoverySourcesListByMapsResourceGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_ListByMapsResource.json - // this example is just showing the usage of "DiscoverySourceResource_ListByMapsResource" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // get the collection of this DependencyMapDiscoverySourceResource - DependencyMapDiscoverySourceCollection collection = dependencyMap.GetDependencyMapDiscoverySources(); - - // invoke the operation and iterate over the result - await foreach (DependencyMapDiscoverySourceResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_DiscoverySourcesGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Get.json - // this example is just showing the usage of "DiscoverySourceResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // get the collection of this DependencyMapDiscoverySourceResource - DependencyMapDiscoverySourceCollection collection = dependencyMap.GetDependencyMapDiscoverySources(); - - // invoke the operation - string sourceName = "sourceTest1"; - bool result = await collection.ExistsAsync(sourceName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_DiscoverySourcesGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Get.json - // this example is just showing the usage of "DiscoverySourceResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // get the collection of this DependencyMapDiscoverySourceResource - DependencyMapDiscoverySourceCollection collection = dependencyMap.GetDependencyMapDiscoverySources(); - - // invoke the operation - string sourceName = "sourceTest1"; - NullableResponse response = await collection.GetIfExistsAsync(sourceName); - DependencyMapDiscoverySourceResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs deleted file mode 100644 index df39d893f239..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapDiscoverySourceResource.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DependencyMap.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DependencyMap.Samples -{ - public partial class Sample_DependencyMapDiscoverySourceResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_DiscoverySourcesGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Get.json - // this example is just showing the usage of "DiscoverySourceResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapDiscoverySourceResource created on azure - // for more information of creating DependencyMapDiscoverySourceResource, please refer to the document of DependencyMapDiscoverySourceResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - string sourceName = "sourceTest1"; - ResourceIdentifier dependencyMapDiscoverySourceResourceId = DependencyMapDiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); - DependencyMapDiscoverySourceResource dependencyMapDiscoverySource = client.GetDependencyMapDiscoverySourceResource(dependencyMapDiscoverySourceResourceId); - - // invoke the operation - DependencyMapDiscoverySourceResource result = await dependencyMapDiscoverySource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DiscoverySourcesDeleteGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Delete.json - // this example is just showing the usage of "DiscoverySourceResource_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapDiscoverySourceResource created on azure - // for more information of creating DependencyMapDiscoverySourceResource, please refer to the document of DependencyMapDiscoverySourceResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - string sourceName = "sourceTest1"; - ResourceIdentifier dependencyMapDiscoverySourceResourceId = DependencyMapDiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); - DependencyMapDiscoverySourceResource dependencyMapDiscoverySource = client.GetDependencyMapDiscoverySourceResource(dependencyMapDiscoverySourceResourceId); - - // invoke the operation - await dependencyMapDiscoverySource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_DiscoverySourcesUpdateGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/DiscoverySources_Update.json - // this example is just showing the usage of "DiscoverySourceResource_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapDiscoverySourceResource created on azure - // for more information of creating DependencyMapDiscoverySourceResource, please refer to the document of DependencyMapDiscoverySourceResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - string sourceName = "sourceTest1"; - ResourceIdentifier dependencyMapDiscoverySourceResourceId = DependencyMapDiscoverySourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName, sourceName); - DependencyMapDiscoverySourceResource dependencyMapDiscoverySource = client.GetDependencyMapDiscoverySourceResource(dependencyMapDiscoverySourceResourceId); - - // invoke the operation - DependencyMapDiscoverySourcePatch patch = new DependencyMapDiscoverySourcePatch - { - Tags = { }, - }; - ArmOperation lro = await dependencyMapDiscoverySource.UpdateAsync(WaitUntil.Completed, patch); - DependencyMapDiscoverySourceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapDiscoverySourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapResource.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapResource.cs deleted file mode 100644 index 83d19fade712..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_DependencyMapResource.cs +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DependencyMap.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DependencyMap.Samples -{ - public partial class Sample_DependencyMapResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_MapsGetGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Get.json - // this example is just showing the usage of "MapsResource_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - DependencyMapResource result = await dependencyMap.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_MapsDeleteGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Delete.json - // this example is just showing the usage of "MapsResource_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - await dependencyMap.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_MapsUpdateGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_Update.json - // this example is just showing the usage of "MapsResource_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - DependencyMapPatch patch = new DependencyMapPatch - { - Tags = { }, - }; - ArmOperation lro = await dependencyMap.UpdateAsync(WaitUntil.Completed, patch); - DependencyMapResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDependencyViewForFocusedMachine_MapsGetDependencyViewForFocusedMachineGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_GetDependencyViewForFocusedMachine.json - // this example is just showing the usage of "Maps_GetDependencyViewForFocusedMachine" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - GetDependencyViewForFocusedMachineContent content = new GetDependencyViewForFocusedMachineContent(new ResourceIdentifier("imzykeisagngrnfinbqtu")) - { - Filters = new DependencyMapVisualizationFilter - { - DateTime = new DependencyMapDateTimeFilter - { - StartOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - EndOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - }, - ProcessNameFilter = new DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), - }, - }; - await dependencyMap.GetDependencyViewForFocusedMachineAsync(WaitUntil.Completed, content); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetConnectionsWithConnectedMachineForFocusedMachine_MapsGetConnectionsWithConnectedMachineForFocusedMachineGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_GetConnectionsWithConnectedMachineForFocusedMachine.json - // this example is just showing the usage of "Maps_GetConnectionsWithConnectedMachineForFocusedMachine" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - GetConnectionsWithConnectedMachineForFocusedMachineContent content = new GetConnectionsWithConnectedMachineForFocusedMachineContent(new ResourceIdentifier("gagovctcfgocievqwq"), new ResourceIdentifier("enaieiloylabljxzvmyrshp")) - { - Filters = new DependencyMapVisualizationFilter - { - DateTime = new DependencyMapDateTimeFilter - { - StartOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - EndOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - }, - ProcessNameFilter = new DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), - }, - }; - await dependencyMap.GetConnectionsWithConnectedMachineForFocusedMachineAsync(WaitUntil.Completed, content); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetConnectionsForProcessOnFocusedMachine_MapsGetConnectionsForProcessOnFocusedMachineGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_GetConnectionsForProcessOnFocusedMachine.json - // this example is just showing the usage of "Maps_GetConnectionsForProcessOnFocusedMachine" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - GetConnectionsForProcessOnFocusedMachineContent content = new GetConnectionsForProcessOnFocusedMachineContent(new ResourceIdentifier("abjy"), "yzldgsfupsfvzlztqoqpiv") - { - Filters = new DependencyMapVisualizationFilter - { - DateTime = new DependencyMapDateTimeFilter - { - StartOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - EndOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - }, - ProcessNameFilter = new DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), - }, - }; - await dependencyMap.GetConnectionsForProcessOnFocusedMachineAsync(WaitUntil.Completed, content); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task ExportDependencies_MapsExportDependenciesGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_ExportDependencies.json - // this example is just showing the usage of "Maps_ExportDependencies" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DependencyMapResource created on azure - // for more information of creating DependencyMapResource, please refer to the document of DependencyMapResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - string resourceGroupName = "rgdependencyMap"; - string mapName = "mapsTest1"; - ResourceIdentifier dependencyMapResourceId = DependencyMapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mapName); - DependencyMapResource dependencyMap = client.GetDependencyMapResource(dependencyMapResourceId); - - // invoke the operation - ExportDependenciesContent content = new ExportDependenciesContent - { - FocusedMachineId = new ResourceIdentifier("qzjpilzxpurauwfwwanpiiafvz"), - Filters = new DependencyMapVisualizationFilter - { - DateTime = new DependencyMapDateTimeFilter - { - StartOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - EndOn = DateTimeOffset.Parse("2024-03-29T07:35:15.336Z"), - }, - ProcessNameFilter = new DependencyMapProcessNameFilter(DependencyMapProcessNameFilterOperator.Contains, new string[] { "mnqtvduwzemjcvvmnnoqvcuemwhnz" }), - }, - ApplianceNameList = { "guwwagnitv" }, - }; - ArmOperation lro = await dependencyMap.ExportDependenciesAsync(WaitUntil.Completed, content); - ExportDependenciesOperationResult result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index d2c64b5d1119..000000000000 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DependencyMap.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDependencyMaps_MapsListBySubscriptionGeneratedByMaximumSetRule() - { - // Generated from example definition: 2025-05-01-preview/Maps_ListBySubscription.json - // this example is just showing the usage of "MapsResource_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "D6E58BDB-45F1-41EC-A884-1FC945058848"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DependencyMapResource item in subscriptionResource.GetDependencyMapsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DependencyMapData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml index a10b3be57544..06549ef66f9e 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification\azuredependencymap\DependencyMap.Management -commit: 6267b64842af3d744c5b092a3f3beef49729ad6d +commit: 25c608787f5b8efa1fcaa98bf65d65caed07a6ef repo: Azure/azure-rest-api-specs +emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs index ecbcfc5d5349..0040c537c0fb 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs @@ -488,8 +488,8 @@ protected DeviceRegistryNamespaceResource() { } public virtual Azure.Response GetDeviceRegistryNamespaceDiscoveredDevice(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDeviceRegistryNamespaceDiscoveredDeviceAsync(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredDeviceCollection GetDeviceRegistryNamespaceDiscoveredDevices() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -733,7 +733,7 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusDataset DeviceRegistryAssetStatusDataset(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusError DeviceRegistryAssetStatusError(int? code = default(int?), string message = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusEvent DeviceRegistryAssetStatusEvent(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryDataset DeviceRegistryDataset(string name = null, string datasetConfiguration = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryTopic topic = null, System.Collections.Generic.IEnumerable dataPoints = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryErrorDetails DeviceRegistryErrorDetails(string code = null, string message = null, string info = null, string correlationId = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceAssetData DeviceRegistryNamespaceAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } @@ -747,7 +747,7 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusManagementGroup DeviceRegistryNamespaceAssetStatusManagementGroup(string name = null, System.Collections.Generic.IEnumerable actions = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusStream DeviceRegistryNamespaceAssetStatusStream(string name = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceMessageSchemaReference messageSchemaReference = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryStatusError error = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceData DeviceRegistryNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string eTag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string etag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDevicePatch DeviceRegistryNamespaceDevicePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DeviceRegistry.Models.NamespaceDeviceUpdateProperties properties = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties DeviceRegistryNamespaceDeviceProperties(string uuid = null, bool? enabled = default(bool?), string externalDeviceId = null, string discoveredDeviceRef = null, string manufacturer = null, string model = null, string operatingSystem = null, string operatingSystemVersion = null, Azure.ResourceManager.DeviceRegistry.Models.MessagingEndpoints endpoints = null, System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceStatus status = null, long? version = default(long?), System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredAssetData DeviceRegistryNamespaceDiscoveredAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDiscoveredAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } @@ -789,7 +789,6 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceEventGroup NamespaceEventGroup(string name = null, string dataSource = null, string eventGroupConfiguration = null, System.Collections.Generic.IEnumerable defaultDestinations = null, string typeRef = null, System.Collections.Generic.IEnumerable events = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent NamespaceMigrateContent(Azure.ResourceManager.DeviceRegistry.Models.Scope? scope = default(Azure.ResourceManager.DeviceRegistry.Models.Scope?), System.Collections.Generic.IEnumerable resourceIds = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceStream NamespaceStream(string name = null, string streamConfiguration = null, string typeRef = null, System.Collections.Generic.IEnumerable destinations = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceUpdateProperties NamespaceUpdateProperties(System.Collections.Generic.IDictionary messagingEndpoints = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.OutboundEndpoints OutboundEndpoints(System.Collections.Generic.IDictionary assigned = null, System.Collections.Generic.IDictionary unassigned = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity SystemAssignedServiceIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType type = default(Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType)) { throw null; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs index ecbcfc5d5349..0040c537c0fb 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs @@ -488,8 +488,8 @@ protected DeviceRegistryNamespaceResource() { } public virtual Azure.Response GetDeviceRegistryNamespaceDiscoveredDevice(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDeviceRegistryNamespaceDiscoveredDeviceAsync(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredDeviceCollection GetDeviceRegistryNamespaceDiscoveredDevices() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -733,7 +733,7 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusDataset DeviceRegistryAssetStatusDataset(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusError DeviceRegistryAssetStatusError(int? code = default(int?), string message = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusEvent DeviceRegistryAssetStatusEvent(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryDataset DeviceRegistryDataset(string name = null, string datasetConfiguration = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryTopic topic = null, System.Collections.Generic.IEnumerable dataPoints = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryErrorDetails DeviceRegistryErrorDetails(string code = null, string message = null, string info = null, string correlationId = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceAssetData DeviceRegistryNamespaceAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } @@ -747,7 +747,7 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusManagementGroup DeviceRegistryNamespaceAssetStatusManagementGroup(string name = null, System.Collections.Generic.IEnumerable actions = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusStream DeviceRegistryNamespaceAssetStatusStream(string name = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceMessageSchemaReference messageSchemaReference = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryStatusError error = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceData DeviceRegistryNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string eTag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string etag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDevicePatch DeviceRegistryNamespaceDevicePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DeviceRegistry.Models.NamespaceDeviceUpdateProperties properties = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties DeviceRegistryNamespaceDeviceProperties(string uuid = null, bool? enabled = default(bool?), string externalDeviceId = null, string discoveredDeviceRef = null, string manufacturer = null, string model = null, string operatingSystem = null, string operatingSystemVersion = null, Azure.ResourceManager.DeviceRegistry.Models.MessagingEndpoints endpoints = null, System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceStatus status = null, long? version = default(long?), System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?)) { throw null; } public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredAssetData DeviceRegistryNamespaceDiscoveredAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDiscoveredAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; } @@ -789,7 +789,6 @@ public static partial class ArmDeviceRegistryModelFactory public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceEventGroup NamespaceEventGroup(string name = null, string dataSource = null, string eventGroupConfiguration = null, System.Collections.Generic.IEnumerable defaultDestinations = null, string typeRef = null, System.Collections.Generic.IEnumerable events = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent NamespaceMigrateContent(Azure.ResourceManager.DeviceRegistry.Models.Scope? scope = default(Azure.ResourceManager.DeviceRegistry.Models.Scope?), System.Collections.Generic.IEnumerable resourceIds = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceStream NamespaceStream(string name = null, string streamConfiguration = null, string typeRef = null, System.Collections.Generic.IEnumerable destinations = null) { throw null; } - public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceUpdateProperties NamespaceUpdateProperties(System.Collections.Generic.IDictionary messagingEndpoints = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.OutboundEndpoints OutboundEndpoints(System.Collections.Generic.IDictionary assigned = null, System.Collections.Generic.IDictionary unassigned = null) { throw null; } public static Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity SystemAssignedServiceIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType type = default(Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType)) { throw null; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/ArmDeviceRegistryModelFactory.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/ArmDeviceRegistryModelFactory.cs index 056bd0833d60..e7845da8ad66 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/ArmDeviceRegistryModelFactory.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/ArmDeviceRegistryModelFactory.cs @@ -302,9 +302,9 @@ public static DeviceRegistryAssetEndpointProfilePatch DeviceRegistryAssetEndpoin /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// Provisioning state of the resource. - /// Resource ETag. + /// Resource ETag. /// A new instance for mocking. - public static DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DeviceRegistryProvisioningState? billingContainerProvisioningState = default, ETag? eTag = default) + public static DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DeviceRegistryProvisioningState? billingContainerProvisioningState = default, ETag? etag = default) { return new DeviceRegistryBillingContainerData( id, @@ -313,7 +313,7 @@ public static DeviceRegistryBillingContainerData DeviceRegistryBillingContainerD systemData, additionalBinaryDataProperties: null, billingContainerProvisioningState is null ? default : new BillingContainerProperties(billingContainerProvisioningState, new Dictionary()), - eTag); + etag); } /// Namespace definition. @@ -373,13 +373,6 @@ public static DeviceRegistryNamespacePatch DeviceRegistryNamespacePatch(SystemAs return new DeviceRegistryNamespacePatch(identity, tags, properties, additionalBinaryDataProperties: null); } - /// Dictionary of messaging endpoints. - /// A new instance for mocking. - public static NamespaceUpdateProperties NamespaceUpdateProperties(IDictionary messagingEndpoints = default) - { - return new NamespaceUpdateProperties(messagingEndpoints is null ? default : new Messaging(messagingEndpoints, new Dictionary()), additionalBinaryDataProperties: null); - } - /// Request body for the migrate resources operation in to Namespace resource. /// Scope of the migrate resources operation. /// List of asset resources to be migrated. @@ -809,7 +802,6 @@ public static NamespaceAssetUpdateProperties NamespaceAssetUpdateProperties(bool additionalBinaryDataProperties: null); } - /// Device definition. /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. /// The name of the resource. /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". @@ -817,10 +809,10 @@ public static NamespaceAssetUpdateProperties NamespaceAssetUpdateProperties(bool /// Resource tags. /// The geo-location where the resource lives. /// The resource-specific properties for this resource. - /// Resource Tag. + /// Resource Tag. /// The extended location. /// A new instance for mocking. - public static DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, DeviceRegistryNamespaceDeviceProperties properties = default, string eTag = default, DeviceRegistryExtendedLocation extendedLocation = default) + public static DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, DeviceRegistryNamespaceDeviceProperties properties = default, string etag = default, DeviceRegistryExtendedLocation extendedLocation = default) { tags ??= new ChangeTrackingDictionary(); @@ -833,7 +825,7 @@ public static DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceDat tags, location, properties, - eTag, + etag, extendedLocation); } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetCollection.cs index e79ce7e54304..e4942618ddba 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// Assets_CreateOrReplace. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpd /// /// /// Operation Id. - /// CreateOrReplace. + /// Assets_CreateOrReplace. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string assetName, Cancella /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string assetName, CancellationToken cancell /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIfEx /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileCollection.cs index 703d0d56ded8..ea863fd6958d 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// AssetEndpointProfiles_CreateOrReplace. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task /// /// Operation Id. - /// CreateOrReplace. + /// AssetEndpointProfiles_CreateOrReplace. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOr /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Cance /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string assetEndpointProfil /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string assetEndpointProfileName, Cancellati /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.cs index 8e84961fa7f6..b510e5ffb6b4 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// AssetEndpointProfiles_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(Cancella } } - /// Update a AssetEndpointProfile. + /// + /// Update a AssetEndpointProfile + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}. + /// + /// + /// Operation Id. + /// AssetEndpointProfiles_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task Update a AssetEndpointProfile. + /// + /// Update a AssetEndpointProfile + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}. + /// + /// + /// Operation Id. + /// AssetEndpointProfiles_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(W /// /// /// Operation Id. - /// Delete. + /// AssetEndpointProfiles_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// AssetEndpointProfiles_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.cs index ff4f45c292e8..749111e131a0 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Operation Id. - /// Get. + /// Assets_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cance } } - /// Update a Asset. + /// + /// Update a Asset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}. + /// + /// + /// Operation Id. + /// Assets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> UpdateAsync } } - /// Update a Asset. + /// + /// Update a Asset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}. + /// + /// + /// Operation Id. + /// Assets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Operation Id. - /// Delete. + /// Assets_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Assets_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerCollection.cs index ce6c3f8776cd..20de3dc93364 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -113,7 +113,7 @@ public virtual async Task> GetA /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -186,7 +186,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -243,7 +243,7 @@ public virtual async Task> ExistsAsync(string billingContainerNam /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -300,7 +300,7 @@ public virtual Response Exists(string billingContainerName, CancellationTo /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -361,7 +361,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.cs index d346fba0863a..65b25944129f 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. @@ -147,7 +147,7 @@ public virtual async Task> GetA /// /// /// Operation Id. - /// Get. + /// BillingContainers_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetCollection.cs index 3568bb073869..11f833978675 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceAssets_CreateOrReplace. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task> Cr /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceAssets_CreateOrReplace. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string assetName, Cancella /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string assetName, CancellationToken cancell /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetResource.cs index 1785fd08ac3a..d56a231ff6a4 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceAssetResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -151,7 +151,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// NamespaceAssets_Get. /// /// /// Default Api Version. @@ -190,7 +190,27 @@ public virtual Response Get(CancellationTo } } - /// Update a NamespaceAsset. + /// + /// Update a NamespaceAsset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/assets/{assetName}. + /// + /// + /// Operation Id. + /// NamespaceAssets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -229,7 +249,27 @@ public virtual async Task> Up } } - /// Update a NamespaceAsset. + /// + /// Update a NamespaceAsset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/assets/{assetName}. + /// + /// + /// Operation Id. + /// NamespaceAssets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -277,7 +317,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Operation Id. - /// Delete. + /// NamespaceAssets_Delete. /// /// /// Default Api Version. @@ -326,7 +366,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// NamespaceAssets_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceCollection.cs index ca1675295474..7ac0f8c22d56 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// Namespaces_CreateOrReplace. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateO /// /// /// Operation Id. - /// CreateOrReplace. + /// Namespaces_CreateOrReplace. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(st /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string namespaceName, Canc /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string namespaceName, CancellationToken can /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> Get /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceCollection.cs index 3ab1a5c74ef1..0c07f441174b 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDevices_CreateOrReplace. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task> C /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDevices_CreateOrReplace. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task> GetAs /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string deviceName, Cancell /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string deviceName, CancellationToken cancel /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceResource.cs index 6f4f3827f194..a22d53a7b3b0 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDeviceResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -151,7 +151,7 @@ public virtual async Task> GetAs /// /// /// Operation Id. - /// Get. + /// NamespaceDevices_Get. /// /// /// Default Api Version. @@ -190,7 +190,27 @@ public virtual Response Get(CancellationT } } - /// Update a NamespaceDevice. + /// + /// Update a NamespaceDevice + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/devices/{deviceName}. + /// + /// + /// Operation Id. + /// NamespaceDevices_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -229,7 +249,27 @@ public virtual async Task> U } } - /// Update a NamespaceDevice. + /// + /// Update a NamespaceDevice + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/devices/{deviceName}. + /// + /// + /// Operation Id. + /// NamespaceDevices_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -277,7 +317,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Operation Id. - /// Delete. + /// NamespaceDevices_Delete. /// /// /// Default Api Version. @@ -326,7 +366,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// NamespaceDevices_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetCollection.cs index 1685f18f739a..a9b63ab79f50 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDiscoveredAssets_CreateOrReplace. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDiscoveredAssets_CreateOrReplace. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation Crea /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll(C /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string discoveredAssetName /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string discoveredAssetName, CancellationTok /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetResource.cs index 563466d3f241..751982fba241 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredAssetResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -151,7 +151,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredAssets_Get. /// /// /// Default Api Version. @@ -190,7 +190,27 @@ public virtual Response Get(Canc } } - /// Update a NamespaceDiscoveredAsset. + /// + /// Update a NamespaceDiscoveredAsset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/discoveredAssets/{discoveredAssetName}. + /// + /// + /// Operation Id. + /// NamespaceDiscoveredAssets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -229,7 +249,27 @@ public virtual async Task Update a NamespaceDiscoveredAsset. + /// + /// Update a NamespaceDiscoveredAsset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/discoveredAssets/{discoveredAssetName}. + /// + /// + /// Operation Id. + /// NamespaceDiscoveredAssets_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -277,7 +317,7 @@ public virtual ArmOperation Upda /// /// /// Operation Id. - /// Delete. + /// NamespaceDiscoveredAssets_Delete. /// /// /// Default Api Version. @@ -326,7 +366,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// NamespaceDiscoveredAssets_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceCollection.cs index 36a81c6b157c..cc78631a96eb 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDiscoveredDevices_CreateOrReplace. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task /// /// Operation Id. - /// CreateOrReplace. + /// NamespaceDiscoveredDevices_CreateOrReplace. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation Cre /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll( /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string discoveredDeviceNam /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string discoveredDeviceName, CancellationTo /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceResource.cs index 20569b65a959..c03de071762d 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceDiscoveredDeviceResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -151,7 +151,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// NamespaceDiscoveredDevices_Get. /// /// /// Default Api Version. @@ -190,7 +190,27 @@ public virtual Response Get(Can } } - /// Update a NamespaceDiscoveredDevice. + /// + /// Update a NamespaceDiscoveredDevice + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/discoveredDevices/{discoveredDeviceName}. + /// + /// + /// Operation Id. + /// NamespaceDiscoveredDevices_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -229,7 +249,27 @@ public virtual async Task Update a NamespaceDiscoveredDevice. + /// + /// Update a NamespaceDiscoveredDevice + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}/discoveredDevices/{discoveredDeviceName}. + /// + /// + /// Operation Id. + /// NamespaceDiscoveredDevices_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -277,7 +317,7 @@ public virtual ArmOperation Upd /// /// /// Operation Id. - /// Delete. + /// NamespaceDiscoveredDevices_Delete. /// /// /// Default Api Version. @@ -326,7 +366,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// NamespaceDiscoveredDevices_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceResource.cs index 9bc232ab5e2d..d992715054bd 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryNamespaceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Operation Id. - /// Get. + /// Namespaces_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken c } } - /// Update a Namespace. + /// + /// Update a Namespace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}. + /// + /// + /// Operation Id. + /// Namespaces_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> UpdateA } } - /// Update a Namespace. + /// + /// Update a Namespace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}. + /// + /// + /// Operation Id. + /// Namespaces_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Operation Id. - /// Delete. + /// Namespaces_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Namespaces_Delete. /// /// /// Default Api Version. @@ -374,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// Migrate. + /// Namespaces_Migrate. /// /// /// Default Api Version. @@ -387,12 +427,12 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The content of the action request. + /// The content of the action request. /// The cancellation token to use. - /// is null. - public virtual async Task MigrateAsync(WaitUntil waitUntil, NamespaceMigrateContent body, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task MigrateAsync(WaitUntil waitUntil, NamespaceMigrateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); using DiagnosticScope scope = _namespacesClientDiagnostics.CreateScope("DeviceRegistryNamespaceResource.Migrate"); scope.Start(); @@ -402,7 +442,7 @@ public virtual async Task MigrateAsync(WaitUntil waitUntil, Namesp { CancellationToken = cancellationToken }; - HttpMessage message = _namespacesRestClient.CreateMigrateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, NamespaceMigrateContent.ToRequestContent(body), context); + HttpMessage message = _namespacesRestClient.CreateMigrateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, NamespaceMigrateContent.ToRequestContent(content), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); DeviceRegistryArmOperation operation = new DeviceRegistryArmOperation(_namespacesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) @@ -427,7 +467,7 @@ public virtual async Task MigrateAsync(WaitUntil waitUntil, Namesp /// /// /// Operation Id. - /// Migrate. + /// Namespaces_Migrate. /// /// /// Default Api Version. @@ -440,12 +480,12 @@ public virtual async Task MigrateAsync(WaitUntil waitUntil, Namesp /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The content of the action request. + /// The content of the action request. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Migrate(WaitUntil waitUntil, NamespaceMigrateContent body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Migrate(WaitUntil waitUntil, NamespaceMigrateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); using DiagnosticScope scope = _namespacesClientDiagnostics.CreateScope("DeviceRegistryNamespaceResource.Migrate"); scope.Start(); @@ -455,7 +495,7 @@ public virtual ArmOperation Migrate(WaitUntil waitUntil, NamespaceMigrateContent { CancellationToken = cancellationToken }; - HttpMessage message = _namespacesRestClient.CreateMigrateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, NamespaceMigrateContent.ToRequestContent(body), context); + HttpMessage message = _namespacesRestClient.CreateMigrateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, NamespaceMigrateContent.ToRequestContent(content), context); Response response = Pipeline.ProcessMessage(message, context); DeviceRegistryArmOperation operation = new DeviceRegistryArmOperation(_namespacesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaCollection.cs index b25e289beba6..8f30882f8fee 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// Schemas_CreateOrReplace. /// /// /// Default Api Version. @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUp /// /// /// Operation Id. - /// CreateOrReplace. + /// Schemas_CreateOrReplace. /// /// /// Default Api Version. @@ -173,7 +173,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -222,7 +222,7 @@ public virtual async Task> GetAsync(strin /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -295,7 +295,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(string schemaName, Cancell /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -409,7 +409,7 @@ public virtual Response Exists(string schemaName, CancellationToken cancel /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -470,7 +470,7 @@ public virtual async Task> GetIfE /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryCollection.cs index df87041d3246..fc7281b5691b 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaRegistries_CreateOrReplace. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> Cr /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaRegistries_CreateOrReplace. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string schemaRegistryName, /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string schemaRegistryName, CancellationToke /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryResource.cs index d6fae6b457f2..f695f8b62185 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaRegistryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// SchemaRegistries_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationTo } } - /// Update a SchemaRegistry. + /// + /// Update a SchemaRegistry + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}. + /// + /// + /// Operation Id. + /// SchemaRegistries_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> Up } } - /// Update a SchemaRegistry. + /// + /// Update a SchemaRegistry + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}. + /// + /// + /// Operation Id. + /// SchemaRegistries_Update. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Operation Id. - /// Delete. + /// SchemaRegistries_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// SchemaRegistries_Delete. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaResource.cs index 6df3e36a78f0..6a10513130a5 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Operation Id. - /// Get. + /// Schemas_Get. /// /// /// Default Api Version. @@ -196,7 +196,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Operation Id. - /// Delete. + /// Schemas_Delete. /// /// /// Default Api Version. @@ -245,7 +245,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Schemas_Delete. /// /// /// Default Api Version. @@ -294,7 +294,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// CreateOrReplace. + /// Schemas_CreateOrReplace. /// /// /// Default Api Version. @@ -346,7 +346,7 @@ public virtual async Task> UpdateAsync(De /// /// /// Operation Id. - /// CreateOrReplace. + /// Schemas_CreateOrReplace. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionCollection.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionCollection.cs index 113d6a67afa1..2bbdc8b48609 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionCollection.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaVersions_CreateOrReplace. /// /// /// Default Api Version. @@ -118,7 +118,7 @@ public virtual async Task> Cre /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaVersions_CreateOrReplace. /// /// /// Default Api Version. @@ -173,7 +173,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -222,7 +222,7 @@ public virtual async Task> GetAsyn /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -307,7 +307,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string schemaVersionName, /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -421,7 +421,7 @@ public virtual Response Exists(string schemaVersionName, CancellationToken /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -482,7 +482,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionResource.cs index b69838d6dc4f..b3b589ec68c1 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistrySchemaVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -149,7 +149,7 @@ public virtual async Task> GetAsyn /// /// /// Operation Id. - /// Get. + /// SchemaVersions_Get. /// /// /// Default Api Version. @@ -197,7 +197,7 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id. - /// Delete. + /// SchemaVersions_Delete. /// /// /// Default Api Version. @@ -246,7 +246,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// SchemaVersions_Delete. /// /// /// Default Api Version. @@ -295,7 +295,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaVersions_CreateOrReplace. /// /// /// Default Api Version. @@ -347,7 +347,7 @@ public virtual async Task> UpdateA /// /// /// Operation Id. - /// CreateOrReplace. + /// SchemaVersions_CreateOrReplace. /// /// /// Default Api Version. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistryResourceGroupResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistryResourceGroupResource.cs index 79bda6ee8f6e..1718db97c315 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistryResourceGroupResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistryResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual DeviceRegistryAssetCollection GetDeviceRegistryAssets() return GetCachedClient(client => new DeviceRegistryAssetCollection(client, Id)); } - /// Get a Asset. + /// + /// Get a Asset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}. + /// + /// + /// Operation Id. + /// Assets_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Asset name parameter. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetDeviceRegist return await GetDeviceRegistryAssets().GetAsync(assetName, cancellationToken).ConfigureAwait(false); } - /// Get a Asset. + /// + /// Get a Asset + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}. + /// + /// + /// Operation Id. + /// Assets_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Asset name parameter. /// The cancellation token to use. /// is null. @@ -71,7 +103,23 @@ public virtual DeviceRegistryAssetEndpointProfileCollection GetDeviceRegistryAss return GetCachedClient(client => new DeviceRegistryAssetEndpointProfileCollection(client, Id)); } - /// Get a AssetEndpointProfile. + /// + /// Get a AssetEndpointProfile + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}. + /// + /// + /// Operation Id. + /// AssetEndpointProfiles_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Asset Endpoint Profile name parameter. /// The cancellation token to use. /// is null. @@ -84,7 +132,23 @@ public virtual async Task> return await GetDeviceRegistryAssetEndpointProfiles().GetAsync(assetEndpointProfileName, cancellationToken).ConfigureAwait(false); } - /// Get a AssetEndpointProfile. + /// + /// Get a AssetEndpointProfile + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}. + /// + /// + /// Operation Id. + /// AssetEndpointProfiles_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Asset Endpoint Profile name parameter. /// The cancellation token to use. /// is null. @@ -104,7 +168,23 @@ public virtual DeviceRegistryNamespaceCollection GetDeviceRegistryNamespaces() return GetCachedClient(client => new DeviceRegistryNamespaceCollection(client, Id)); } - /// Get a Namespace. + /// + /// Get a Namespace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}. + /// + /// + /// Operation Id. + /// Namespaces_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// The name of the namespace. /// The cancellation token to use. /// is null. @@ -117,7 +197,23 @@ public virtual async Task> GetDeviceRe return await GetDeviceRegistryNamespaces().GetAsync(namespaceName, cancellationToken).ConfigureAwait(false); } - /// Get a Namespace. + /// + /// Get a Namespace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/namespaces/{namespaceName}. + /// + /// + /// Operation Id. + /// Namespaces_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// The name of the namespace. /// The cancellation token to use. /// is null. @@ -137,7 +233,23 @@ public virtual DeviceRegistrySchemaRegistryCollection GetDeviceRegistrySchemaReg return GetCachedClient(client => new DeviceRegistrySchemaRegistryCollection(client, Id)); } - /// Get a SchemaRegistry. + /// + /// Get a SchemaRegistry + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}. + /// + /// + /// Operation Id. + /// SchemaRegistries_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Schema registry name parameter. /// The cancellation token to use. /// is null. @@ -150,7 +262,23 @@ public virtual async Task> GetDev return await GetDeviceRegistrySchemaRegistries().GetAsync(schemaRegistryName, cancellationToken).ConfigureAwait(false); } - /// Get a SchemaRegistry. + /// + /// Get a SchemaRegistry + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/schemaRegistries/{schemaRegistryName}. + /// + /// + /// Operation Id. + /// SchemaRegistries_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Schema registry name parameter. /// The cancellation token to use. /// is null. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistrySubscriptionResource.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistrySubscriptionResource.cs index 25b7d445bfaa..0043ca650a62 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistrySubscriptionResource.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Extensions/MockableDeviceRegistrySubscriptionResource.cs @@ -64,7 +64,23 @@ public virtual DeviceRegistryBillingContainerCollection GetDeviceRegistryBilling return GetCachedClient(client => new DeviceRegistryBillingContainerCollection(client, Id)); } - /// Get a BillingContainer. + /// + /// Get a BillingContainer + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}. + /// + /// + /// Operation Id. + /// BillingContainers_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Name of the billing container. /// The cancellation token to use. /// is null. @@ -77,7 +93,23 @@ public virtual async Task> GetD return await GetDeviceRegistryBillingContainers().GetAsync(billingContainerName, cancellationToken).ConfigureAwait(false); } - /// Get a BillingContainer. + /// + /// Get a BillingContainer + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}. + /// + /// + /// Operation Id. + /// BillingContainers_Get. + /// + /// + /// Default Api Version. + /// 2025-10-01. + /// + /// + /// /// Name of the billing container. /// The cancellation token to use. /// is null. diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/AzureResourceManagerDeviceRegistryContext.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/AzureResourceManagerDeviceRegistryContext.cs index c3d957aaef2c..c511ceeb5a79 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/AzureResourceManagerDeviceRegistryContext.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/AzureResourceManagerDeviceRegistryContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.DeviceRegistry.Models; using Azure.ResourceManager.Models; @@ -137,6 +138,7 @@ namespace Azure.ResourceManager.DeviceRegistry [ModelReaderWriterBuildable(typeof(NamespaceStream))] [ModelReaderWriterBuildable(typeof(NamespaceUpdateProperties))] [ModelReaderWriterBuildable(typeof(OutboundEndpoints))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SchemaListResult))] [ModelReaderWriterBuildable(typeof(SchemaRegistryListResult))] [ModelReaderWriterBuildable(typeof(SchemaRegistryUpdateProperties))] diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetEndpointProfilePatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetEndpointProfilePatch.Serialization.cs index 90fde4799ce0..b17a141d337e 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetEndpointProfilePatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetEndpointProfilePatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryAssetEndpointProfilePatch PersistableModelCreate /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryAssetEndpointProfilePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryAssetEndpointProfilePatch deviceRegistryAssetEndpointProfilePatch) { - if (patch == null) + if (deviceRegistryAssetEndpointProfilePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryAssetEndpointProfilePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetPatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetPatch.Serialization.cs index 8c620d7fc835..464d1a04dc85 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetPatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryAssetPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryAssetPatch PersistableModelCreateCore(BinaryData /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryAssetPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryAssetPatch deviceRegistryAssetPatch) { - if (patch == null) + if (deviceRegistryAssetPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryAssetPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceAssetPatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceAssetPatch.Serialization.cs index 589173f27073..aa5d3711b667 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceAssetPatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceAssetPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryNamespaceAssetPatch PersistableModelCreateCore(B /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryNamespaceAssetPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryNamespaceAssetPatch deviceRegistryNamespaceAssetPatch) { - if (patch == null) + if (deviceRegistryNamespaceAssetPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryNamespaceAssetPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDevicePatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDevicePatch.Serialization.cs index 5228c0376173..d8216664bc7e 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDevicePatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDevicePatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryNamespaceDevicePatch PersistableModelCreateCore( /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDevicePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDevicePatch deviceRegistryNamespaceDevicePatch) { - if (patch == null) + if (deviceRegistryNamespaceDevicePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryNamespaceDevicePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredAssetPatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredAssetPatch.Serialization.cs index b941d91b269a..e953b3d9791d 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredAssetPatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredAssetPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryNamespaceDiscoveredAssetPatch PersistableModelCr /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDiscoveredAssetPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDiscoveredAssetPatch deviceRegistryNamespaceDiscoveredAssetPatch) { - if (patch == null) + if (deviceRegistryNamespaceDiscoveredAssetPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryNamespaceDiscoveredAssetPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredDevicePatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredDevicePatch.Serialization.cs index 4aad401a8b28..99c84bc6e87a 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredDevicePatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespaceDiscoveredDevicePatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual DeviceRegistryNamespaceDiscoveredDevicePatch PersistableModelC /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDiscoveredDevicePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryNamespaceDiscoveredDevicePatch deviceRegistryNamespaceDiscoveredDevicePatch) { - if (patch == null) + if (deviceRegistryNamespaceDiscoveredDevicePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryNamespaceDiscoveredDevicePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespacePatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespacePatch.Serialization.cs index 98b5984d9f5c..470cf0705c55 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespacePatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistryNamespacePatch.Serialization.cs @@ -196,15 +196,15 @@ protected virtual DeviceRegistryNamespacePatch PersistableModelCreateCore(Binary /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistryNamespacePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistryNamespacePatch deviceRegistryNamespacePatch) { - if (patch == null) + if (deviceRegistryNamespacePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistryNamespacePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistrySchemaRegistryPatch.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistrySchemaRegistryPatch.Serialization.cs index ef296dc86d8f..fe09717a5930 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistrySchemaRegistryPatch.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/Models/DeviceRegistrySchemaRegistryPatch.Serialization.cs @@ -196,15 +196,15 @@ protected virtual DeviceRegistrySchemaRegistryPatch PersistableModelCreateCore(B /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeviceRegistrySchemaRegistryPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeviceRegistrySchemaRegistryPatch deviceRegistrySchemaRegistryPatch) { - if (patch == null) + if (deviceRegistrySchemaRegistryPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deviceRegistrySchemaRegistryPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md index 669c6feb119e..e4e31f3ec2e8 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/CHANGELOG.md @@ -1,18 +1,23 @@ # Release History -## 1.0.0 (2025-10-13) +## 1.1.0-beta.1 (Unreleased) -First GA release of the Durable Task Scheduler management SDK +### Features Added ### Breaking Changes -- All classes have dropped the `DurableTask` name prefix. -- `DurableTaskHub` classes have been renamed to `SchedulerTaskHub` +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2025-11-03) + +First GA release of the Durable Task Scheduler management SDK ### Other Changes - Now uses API version `2025-11-01` for all resource manager calls. -- `SchedulerSkuName` now provides constants for the possible Sku values. +- `DurableTaskSchedulerSkuName` now provides constants for the possible Scheduler SKU values. ## 1.0.0-beta.1 (2025-04-24) diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs index 23a093da98c2..e2ee57509008 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.net8.0.cs @@ -8,150 +8,159 @@ internal AzureResourceManagerDurableTaskContext() { } } public static partial class DurableTaskExtensions { - public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - public RetentionPolicyData() { } - public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } + protected DurableTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected RetentionPolicyResource() { } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } + protected DurableTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected SchedulerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SchedulerData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + public DurableTaskRetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SchedulerResource() { } - public virtual Azure.ResourceManager.DurableTask.SchedulerData Data { get { throw null; } } + protected DurableTaskRetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } - public virtual Azure.Response GetSchedulerTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSchedulerTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubCollection GetSchedulerTaskHubs() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SchedulerTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected SchedulerTaskHubCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected DurableTaskSchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SchedulerTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerTaskHubData() { } - public Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties Properties { get { throw null; } set { } } + public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SchedulerTaskHubResource() { } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubData Data { get { throw null; } } + protected DurableTaskSchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Mocking @@ -159,217 +168,246 @@ namespace Azure.ResourceManager.DurableTask.Mocking public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource { protected MockableDurableTaskArmClient() { } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskResourceGroupResource() { } - public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } } public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskSubscriptionResource() { } - public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Models { public static partial class ArmDurableTaskModelFactory { - public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.SchedulerProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties SchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerTaskHubData SchedulerTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties SchedulerTaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskHubData DurableTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch DurableTaskSchedulerPatch(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + } + public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public readonly partial struct DurableTaskProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.ProvisioningState other) { throw null; } + public DurableTaskProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PurgeableOrchestrationState : System.IEquatable + public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PurgeableOrchestrationState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Completed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Terminated { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState other) { throw null; } + public DurableTaskPurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ResourceRedundancyState : System.IEquatable + public readonly partial struct DurableTaskResourceRedundancyState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ResourceRedundancyState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState None { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState Zone { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState other) { throw null; } + public DurableTaskResourceRedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } public override string ToString() { throw null; } } - public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public RetentionPolicyDetails(int retentionPeriodInDays) { } - public Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } + public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } public int RetentionPeriodInDays { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public RetentionPolicyProperties() { } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + public DurableTaskRetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerPatch() { } - public Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties Properties { get { throw null; } set { } } + public DurableTaskSchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerPatchProperties() { } + public DurableTaskSchedulerPatchProperties() { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } + public DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName name) { } public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? RedundancyState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SchedulerSkuName : System.IEquatable + public readonly partial struct DurableTaskSchedulerSkuName : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SchedulerSkuName(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Consumption { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Dedicated { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName other) { throw null; } + public DurableTaskSchedulerSkuName(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Consumption { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Dedicated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.SchedulerSkuName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName right) { throw null; } public override string ToString() { throw null; } } - public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerSkuUpdate() { } + public DurableTaskSchedulerSkuUpdate() { } public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? RedundancyState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SchedulerTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SchedulerTaskHubProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs index 23a093da98c2..e2ee57509008 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/api/Azure.ResourceManager.DurableTask.netstandard2.0.cs @@ -8,150 +8,159 @@ internal AzureResourceManagerDurableTaskContext() { } } public static partial class DurableTaskExtensions { - public static Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDurableTaskScheduler(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDurableTaskSchedulers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDurableTaskSchedulersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class RetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - public RetentionPolicyData() { } - public Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties Properties { get { throw null; } set { } } + protected DurableTaskHubCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DurableTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class RetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected RetentionPolicyResource() { } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyData Data { get { throw null; } } + protected DurableTaskHubResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.RetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.RetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DurableTaskRetentionPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected SchedulerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.SchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class SchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SchedulerData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.DurableTask.Models.SchedulerProperties Properties { get { throw null; } set { } } + public DurableTaskRetentionPolicyData() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SchedulerResource() { } - public virtual Azure.ResourceManager.DurableTask.SchedulerData Data { get { throw null; } } + protected DurableTaskRetentionPolicyResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicy() { throw null; } - public virtual Azure.Response GetSchedulerTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSchedulerTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubCollection GetSchedulerTaskHubs() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.SchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SchedulerTaskHubCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DurableTaskSchedulerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected SchedulerTaskHubCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string taskHubName, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected DurableTaskSchedulerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string schedulerName, Azure.ResourceManager.DurableTask.DurableTaskSchedulerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SchedulerTaskHubData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerTaskHubData() { } - public Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties Properties { get { throw null; } set { } } + public DurableTaskSchedulerData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties Properties { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerTaskHubResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SchedulerTaskHubResource() { } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubData Data { get { throw null; } } + protected DurableTaskSchedulerResource() { } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.SchedulerTaskHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.SchedulerTaskHubData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDurableTaskHub(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskHubAsync(string taskHubName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubCollection GetDurableTaskHubs() { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.DurableTaskSchedulerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Mocking @@ -159,217 +168,246 @@ namespace Azure.ResourceManager.DurableTask.Mocking public partial class MockableDurableTaskArmClient : Azure.ResourceManager.ArmResource { protected MockableDurableTaskArmClient() { } - public virtual Azure.ResourceManager.DurableTask.RetentionPolicyResource GetRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerResource GetSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerTaskHubResource GetSchedulerTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskHubResource GetDurableTaskHubResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerResource GetDurableTaskSchedulerResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDurableTaskResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskResourceGroupResource() { } - public virtual Azure.Response GetScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.DurableTask.SchedulerCollection GetSchedulers() { throw null; } + public virtual Azure.Response GetDurableTaskScheduler(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDurableTaskSchedulerAsync(string schedulerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DurableTask.DurableTaskSchedulerCollection GetDurableTaskSchedulers() { throw null; } } public partial class MockableDurableTaskSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDurableTaskSubscriptionResource() { } - public virtual Azure.Pageable GetSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDurableTaskSchedulers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDurableTaskSchedulersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.DurableTask.Models { public static partial class ArmDurableTaskModelFactory { - public static Azure.ResourceManager.DurableTask.RetentionPolicyData RetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties RetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerData SchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.SchedulerProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties SchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerProperties SchedulerProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSku SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate SchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState?)) { throw null; } - public static Azure.ResourceManager.DurableTask.SchedulerTaskHubData SchedulerTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties properties = null) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties SchedulerTaskHubProperties(Azure.ResourceManager.DurableTask.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.ProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskHubData DurableTaskHubData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties DurableTaskHubProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Uri dashboardUri = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), System.Collections.Generic.IEnumerable retentionPolicies = null) { throw null; } + public static Azure.ResourceManager.DurableTask.DurableTaskSchedulerData DurableTaskSchedulerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties properties = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch DurableTaskSchedulerPatch(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties DurableTaskSchedulerProperties(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? provisioningState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState?), string endpoint = null, System.Collections.Generic.IEnumerable ipAllowlist = null, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku = null) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName name = default(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? name = default(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName?), int? capacity = default(int?), Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? redundancyState = default(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState?)) { throw null; } + } + public partial class DurableTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DurableTaskHubProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public readonly partial struct DurableTaskProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.ProvisioningState other) { throw null; } + public DurableTaskProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ProvisioningState left, Azure.ResourceManager.DurableTask.Models.ProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState left, Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PurgeableOrchestrationState : System.IEquatable + public readonly partial struct DurableTaskPurgeableOrchestrationState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PurgeableOrchestrationState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Canceled { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Completed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Failed { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState Terminated { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState other) { throw null; } + public DurableTaskPurgeableOrchestrationState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Canceled { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Completed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Failed { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState Terminated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState left, Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ResourceRedundancyState : System.IEquatable + public readonly partial struct DurableTaskResourceRedundancyState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ResourceRedundancyState(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState None { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState Zone { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState other) { throw null; } + public DurableTaskResourceRedundancyState(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState None { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState Zone { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState left, Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState right) { throw null; } public override string ToString() { throw null; } } - public partial class RetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public RetentionPolicyDetails(int retentionPeriodInDays) { } - public Azure.ResourceManager.DurableTask.Models.PurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } + public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskPurgeableOrchestrationState? OrchestrationState { get { throw null; } set { } } public int RetentionPeriodInDays { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class RetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskRetentionPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public RetentionPolicyProperties() { } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + public DurableTaskRetentionPolicyProperties() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList RetentionPolicies { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.RetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskRetentionPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerPatch() { } - public Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties Properties { get { throw null; } set { } } + public DurableTaskSchedulerPatch() { } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerPatchProperties() { } + public DurableTaskSchedulerPatchProperties() { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.SchedulerSku sku) { } + public DurableTaskSchedulerProperties(System.Collections.Generic.IEnumerable ipAllowlist, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku sku) { } public string Endpoint { get { throw null; } } public System.Collections.Generic.IList IPAllowlist { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSku Sku { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku Sku { get { throw null; } set { } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerSku(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName name) { } + public DurableTaskSchedulerSku(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName name) { } public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? RedundancyState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SchedulerSkuName : System.IEquatable + public readonly partial struct DurableTaskSchedulerSkuName : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SchedulerSkuName(string value) { throw null; } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Consumption { get { throw null; } } - public static Azure.ResourceManager.DurableTask.Models.SchedulerSkuName Dedicated { get { throw null; } } - public bool Equals(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName other) { throw null; } + public DurableTaskSchedulerSkuName(string value) { throw null; } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Consumption { get { throw null; } } + public static Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName Dedicated { get { throw null; } } + public bool Equals(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } - public static implicit operator Azure.ResourceManager.DurableTask.Models.SchedulerSkuName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DurableTask.Models.SchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.SchedulerSkuName right) { throw null; } + public static bool operator ==(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName right) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName (string value) { throw null; } + public static implicit operator Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName left, Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName right) { throw null; } public override string ToString() { throw null; } } - public partial class SchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DurableTaskSchedulerSkuUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SchedulerSkuUpdate() { } + public DurableTaskSchedulerSkuUpdate() { } public int? Capacity { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.SchedulerSkuName? Name { get { throw null; } set { } } - public Azure.ResourceManager.DurableTask.Models.ResourceRedundancyState? RedundancyState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SchedulerTaskHubProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SchedulerTaskHubProperties() { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.DurableTask.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuName? Name { get { throw null; } set { } } + public Azure.ResourceManager.DurableTask.Models.DurableTaskResourceRedundancyState? RedundancyState { get { throw null; } } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DurableTask.Models.SchedulerTaskHubProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DurableTask.Models.DurableTaskSchedulerSkuUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj index 905880dc5096..1200aaa053be 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Azure.ResourceManager.DurableTask.csproj @@ -1,6 +1,8 @@ - 1.0.0 + 1.1.0-beta.1 + + 1.0.0 Azure.ResourceManager.DurableTask Azure Resource Manager client SDK for Azure resource provider Durable Task. azure;management;arm;resource manager;durabletask diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs index 1fdc628f7b1b..70278d737167 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ArmDurableTaskModelFactory.cs @@ -8,138 +8,152 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; +using Azure.ResourceManager.DurableTask; using Azure.ResourceManager.Models; namespace Azure.ResourceManager.DurableTask.Models { - /// Model factory for models. + /// A factory class for creating instances of the models for mocking. public static partial class ArmDurableTaskModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. + + /// A Durable Task Scheduler resource. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Resource tags. + /// The geo-location where the resource lives. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static SchedulerData SchedulerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SchedulerProperties properties = null) + /// A new instance for mocking. + public static DurableTaskSchedulerData DurableTaskSchedulerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, DurableTaskSchedulerProperties properties = default) { - tags ??= new Dictionary(); + tags ??= new ChangeTrackingDictionary(); - return new SchedulerData( + return new DurableTaskSchedulerData( id, name, resourceType, systemData, + additionalBinaryDataProperties: null, tags, location, - properties, - serializedAdditionalRawData: null); + properties); } - /// Initializes a new instance of . + /// Details of the Scheduler. /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. - /// A new instance for mocking. - public static SchedulerProperties SchedulerProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSku sku = null) + /// A new instance for mocking. + public static DurableTaskSchedulerProperties DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState = default, string endpoint = default, IEnumerable ipAllowlist = default, DurableTaskSchedulerSku sku = default) { - ipAllowlist ??= new List(); + ipAllowlist ??= new ChangeTrackingList(); - return new SchedulerProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + return new DurableTaskSchedulerProperties(provisioningState, endpoint, ipAllowlist.ToList(), sku, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. - /// A new instance for mocking. - public static SchedulerSku SchedulerSku(SchedulerSkuName name = default, int? capacity = null, ResourceRedundancyState? redundancyState = null) + /// A new instance for mocking. + public static DurableTaskSchedulerSku DurableTaskSchedulerSku(DurableTaskSchedulerSkuName name = default, int? capacity = default, DurableTaskResourceRedundancyState? redundancyState = default) + { + return new DurableTaskSchedulerSku(name, capacity, redundancyState, additionalBinaryDataProperties: null); + } + + /// The update request model for the Scheduler resource. + /// The resource-specific properties for this resource. + /// Resource tags. + /// A new instance for mocking. + public static DurableTaskSchedulerPatch DurableTaskSchedulerPatch(DurableTaskSchedulerPatchProperties properties = default, IDictionary tags = default) { - return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData: null); + tags ??= new ChangeTrackingDictionary(); + + return new DurableTaskSchedulerPatch(properties, tags, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// The Scheduler resource properties to be updated. /// The status of the last operation. /// URL of the durable task scheduler. /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. /// SKU of the durable task scheduler. - /// A new instance for mocking. - public static SchedulerPatchProperties SchedulerPatchProperties(ProvisioningState? provisioningState = null, string endpoint = null, IEnumerable ipAllowlist = null, SchedulerSkuUpdate sku = null) + /// A new instance for mocking. + public static DurableTaskSchedulerPatchProperties DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState = default, string endpoint = default, IEnumerable ipAllowlist = default, DurableTaskSchedulerSkuUpdate sku = default) { - ipAllowlist ??= new List(); + ipAllowlist ??= new ChangeTrackingList(); - return new SchedulerPatchProperties(provisioningState, endpoint, ipAllowlist?.ToList(), sku, serializedAdditionalRawData: null); + return new DurableTaskSchedulerPatchProperties(provisioningState, endpoint, ipAllowlist.ToList(), sku, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . + /// The SKU (Stock Keeping Unit) properties to be updated. /// The name of the SKU. /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. /// Indicates whether the current SKU configuration is zone redundant. - /// A new instance for mocking. - public static SchedulerSkuUpdate SchedulerSkuUpdate(SchedulerSkuName? name = null, int? capacity = null, ResourceRedundancyState? redundancyState = null) + /// A new instance for mocking. + public static DurableTaskSchedulerSkuUpdate DurableTaskSchedulerSkuUpdate(DurableTaskSchedulerSkuName? name = default, int? capacity = default, DurableTaskResourceRedundancyState? redundancyState = default) { - return new SchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData: null); + return new DurableTaskSchedulerSkuUpdate(name, capacity, redundancyState, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. + /// A Task Hub resource belonging to the scheduler. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static SchedulerTaskHubData SchedulerTaskHubData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SchedulerTaskHubProperties properties = null) + /// A new instance for mocking. + public static DurableTaskHubData DurableTaskHubData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DurableTaskHubProperties properties = default) { - return new SchedulerTaskHubData( + return new DurableTaskHubData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null, + properties); } - /// Initializes a new instance of . + /// The properties of Task Hub. /// The status of the last operation. /// URL of the durable task scheduler dashboard. - /// A new instance for mocking. - public static SchedulerTaskHubProperties SchedulerTaskHubProperties(ProvisioningState? provisioningState = null, Uri dashboardUri = null) + /// A new instance for mocking. + public static DurableTaskHubProperties DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState = default, Uri dashboardUri = default) { - return new SchedulerTaskHubProperties(provisioningState, dashboardUri, serializedAdditionalRawData: null); + return new DurableTaskHubProperties(provisioningState, dashboardUri, additionalBinaryDataProperties: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. + /// A retention policy resource belonging to the scheduler. + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// The resource-specific properties for this resource. - /// A new instance for mocking. - public static RetentionPolicyData RetentionPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RetentionPolicyProperties properties = null) + /// A new instance for mocking. + public static DurableTaskRetentionPolicyData DurableTaskRetentionPolicyData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, DurableTaskRetentionPolicyProperties properties = default) { - return new RetentionPolicyData( + return new DurableTaskRetentionPolicyData( id, name, resourceType, systemData, - properties, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null, + properties); } - /// Initializes a new instance of . + /// The retention policy settings for the resource. /// The status of the last operation. /// The orchestration retention policies. - /// A new instance for mocking. - public static RetentionPolicyProperties RetentionPolicyProperties(ProvisioningState? provisioningState = null, IEnumerable retentionPolicies = null) + /// A new instance for mocking. + public static DurableTaskRetentionPolicyProperties DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState = default, IEnumerable retentionPolicies = default) { - retentionPolicies ??= new List(); + retentionPolicies ??= new ChangeTrackingList(); - return new RetentionPolicyProperties(provisioningState, retentionPolicies?.ToList(), serializedAdditionalRawData: null); + return new DurableTaskRetentionPolicyProperties(provisioningState, retentionPolicies.ToList(), additionalBinaryDataProperties: null); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs new file mode 100644 index 000000000000..90ecdae92dfd --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubCollection.cs @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of a parent resource (TODO: add parent resource information). + /// To get a instance call the GetDurableTaskHubs method from an instance of the parent resource. + /// + public partial class DurableTaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _taskHubsClientDiagnostics; + private readonly TaskHubs _taskHubsRestClient; + + /// Initializes a new instance of DurableTaskHubCollection for mocking. + protected DurableTaskHubCollection() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DurableTaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(DurableTaskHubResource.ResourceType, out string durableTaskHubApiVersion); + _taskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskHubResource.ResourceType.Namespace, Diagnostics); + _taskHubsRestClient = new TaskHubs(_taskHubsClientDiagnostics, Pipeline, Endpoint, durableTaskHubApiVersion ?? "2025-11-01"); + ValidateResourceId(id); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DurableTaskSchedulerResource.ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, DurableTaskSchedulerResource.ResourceType), id); + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the TaskHub. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, DurableTaskHubData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskHubOperationSource(Client), + _taskHubsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the TaskHub. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string taskHubName, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, DurableTaskHubData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskHubOperationSource(Client), + _taskHubsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List Task Hubs. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new TaskHubsGetBySchedulerAsyncCollectionResultOfT(_taskHubsRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new DurableTaskHubResource(Client, data)); + } + + /// List Task Hubs. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new TaskHubsGetBySchedulerCollectionResultOfT(_taskHubsRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context), data => new DurableTaskHubResource(Client, data)); + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskHubData)null, result); + break; + default: + throw new RequestFailedException(result); + } + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskHubData)null, result); + break; + default: + throw new RequestFailedException(result); + } + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskHubData)null, result); + break; + default: + throw new RequestFailedException(result); + } + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, taskHubName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskHubData)null, result); + break; + default: + throw new RequestFailedException(result); + } + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + /// The cancellation token to use. + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs new file mode 100644 index 000000000000..d17a0fe7e258 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A Task Hub resource belonging to the scheduler. + public partial class DurableTaskHubData : ResourceData, IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DurableTaskHubData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskHubData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskHubData DeserializeDurableTaskHubData(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType resourceType = default; + SystemData systemData = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + DurableTaskHubProperties properties = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("systemData"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DurableTaskHubProperties.DeserializeDurableTaskHubProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskHubData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties, + properties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DurableTaskHubData)PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskHubData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskHubData)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DurableTaskHubData durableTaskHubData) + { + if (durableTaskHubData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(durableTaskHubData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static DurableTaskHubData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDurableTaskHubData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs new file mode 100644 index 000000000000..425384d401a9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A Task Hub resource belonging to the scheduler. + public partial class DurableTaskHubData : ResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskHubData() + { + } + + /// Initializes a new instance of . + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// The resource-specific properties for this resource. + internal DurableTaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, DurableTaskHubProperties properties) : base(id, name, resourceType, systemData) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + public DurableTaskHubProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs new file mode 100644 index 000000000000..e5601cf57aa9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + /// + public partial class DurableTaskHubResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DurableTaskHubData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + /// The reader for deserializing the model. + /// The client options for reading and writing models. + DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs new file mode 100644 index 000000000000..42c26778a439 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing a DurableTaskHub along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskHubs method. + /// + public partial class DurableTaskHubResource : ArmResource + { + private readonly ClientDiagnostics _taskHubsClientDiagnostics; + private readonly TaskHubs _taskHubsRestClient; + private readonly DurableTaskHubData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/taskHubs"; + + /// Initializes a new instance of DurableTaskHubResource for mocking. + protected DurableTaskHubResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskHubResource(ArmClient client, DurableTaskHubData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DurableTaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string durableTaskHubApiVersion); + _taskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + _taskHubsRestClient = new TaskHubs(_taskHubsClientDiagnostics, Pipeline, Endpoint, durableTaskHubApiVersion ?? "2025-11-01"); + ValidateResourceId(id); + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + public virtual DurableTaskHubData Data + { + get + { + if (!HasData) + { + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } + return _data; + } + } + + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + /// The taskHubName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskHubData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskHubResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_taskHubsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_taskHubsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletionResponse(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, DurableTaskHubData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskHubOperationSource(Client), + _taskHubsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Task Hub + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}. + /// + /// + /// Operation Id. + /// TaskHubs_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskHubData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _taskHubsClientDiagnostics.CreateScope("DurableTaskHubResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _taskHubsRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, Id.Name, DurableTaskHubData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskHubOperationSource(Client), + _taskHubsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs new file mode 100644 index 000000000000..4e78fa0a724f --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A retention policy resource belonging to the scheduler. + public partial class DurableTaskRetentionPolicyData : ResourceData, IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DurableTaskRetentionPolicyData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskRetentionPolicyData DeserializeDurableTaskRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType resourceType = default; + SystemData systemData = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + DurableTaskRetentionPolicyProperties properties = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("systemData"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DurableTaskRetentionPolicyProperties.DeserializeDurableTaskRetentionPolicyProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskRetentionPolicyData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties, + properties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DurableTaskRetentionPolicyData)PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskRetentionPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyData)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DurableTaskRetentionPolicyData durableTaskRetentionPolicyData) + { + if (durableTaskRetentionPolicyData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(durableTaskRetentionPolicyData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static DurableTaskRetentionPolicyData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDurableTaskRetentionPolicyData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs new file mode 100644 index 000000000000..793de632f6d2 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A retention policy resource belonging to the scheduler. + public partial class DurableTaskRetentionPolicyData : ResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskRetentionPolicyData() + { + } + + /// Initializes a new instance of . + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// The resource-specific properties for this resource. + internal DurableTaskRetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, DurableTaskRetentionPolicyProperties properties) : base(id, name, resourceType, systemData) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + public DurableTaskRetentionPolicyProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs new file mode 100644 index 000000000000..89c89771f0f7 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + /// + public partial class DurableTaskRetentionPolicyResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DurableTaskRetentionPolicyData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + /// The reader for deserializing the model. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs new file mode 100644 index 000000000000..b9159fbdafbf --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing a DurableTaskRetentionPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskRetentionPolicy method. + /// + public partial class DurableTaskRetentionPolicyResource : ArmResource + { + private readonly ClientDiagnostics _retentionPoliciesClientDiagnostics; + private readonly RetentionPolicies _retentionPoliciesRestClient; + private readonly DurableTaskRetentionPolicyData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/retentionPolicies"; + + /// Initializes a new instance of DurableTaskRetentionPolicyResource for mocking. + protected DurableTaskRetentionPolicyResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskRetentionPolicyResource(ArmClient client, DurableTaskRetentionPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DurableTaskRetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string durableTaskRetentionPolicyApiVersion); + _retentionPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + _retentionPoliciesRestClient = new RetentionPolicies(_retentionPoliciesClientDiagnostics, Pipeline, Endpoint, durableTaskRetentionPolicyApiVersion ?? "2025-11-01"); + ValidateResourceId(id); + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + public virtual DurableTaskRetentionPolicyData Data + { + get + { + if (!HasData) + { + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } + return _data; + } + } + + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } + } + + /// + /// Get a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskRetentionPolicyData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskRetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskRetentionPolicyData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskRetentionPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_CreateOrReplace. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateCreateOrReplaceRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, DurableTaskRetentionPolicyData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskRetentionPolicyOperationSource(Client), + _retentionPoliciesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_CreateOrReplace. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateCreateOrReplaceRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, DurableTaskRetentionPolicyData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskRetentionPolicyOperationSource(Client), + _retentionPoliciesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Update. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, DurableTaskRetentionPolicyData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskRetentionPolicyOperationSource(Client), + _retentionPoliciesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Update. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskRetentionPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, DurableTaskRetentionPolicyData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskRetentionPolicyOperationSource(Client), + _retentionPoliciesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_retentionPoliciesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Retention Policy + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default. + /// + /// + /// Operation Id. + /// RetentionPolicies_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _retentionPoliciesClientDiagnostics.CreateScope("DurableTaskRetentionPolicyResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _retentionPoliciesRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Parent.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_retentionPoliciesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletionResponse(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs new file mode 100644 index 000000000000..b972e9100153 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerCollection.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of a parent resource (TODO: add parent resource information). + /// To get a instance call the GetDurableTaskSchedulers method from an instance of the parent resource. + /// + public partial class DurableTaskSchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _schedulersClientDiagnostics; + private readonly Schedulers _schedulersRestClient; + + /// Initializes a new instance of DurableTaskSchedulerCollection for mocking. + protected DurableTaskSchedulerCollection() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DurableTaskSchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(DurableTaskSchedulerResource.ResourceType, out string durableTaskSchedulerApiVersion); + _schedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", DurableTaskSchedulerResource.ResourceType.Namespace, Diagnostics); + _schedulersRestClient = new Schedulers(_schedulersClientDiagnostics, Pipeline, Endpoint, durableTaskSchedulerApiVersion ?? "2025-11-01"); + ValidateResourceId(id); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), id); + } + } + + /// + /// Create or update a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Scheduler. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, DurableTaskSchedulerData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskSchedulerOperationSource(Client), + _schedulersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_CreateOrUpdate. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Scheduler. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string schedulerName, DurableTaskSchedulerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + Argument.AssertNotNull(data, nameof(data)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.CreateOrUpdate"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateCreateOrUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, DurableTaskSchedulerData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskSchedulerOperationSource(Client), + _schedulersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List Schedulers by resource group. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SchedulersGetByResourceGroupAsyncCollectionResultOfT(_schedulersRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, context), data => new DurableTaskSchedulerResource(Client, data)); + } + + /// List Schedulers by resource group. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SchedulersGetByResourceGroupCollectionResultOfT(_schedulersRestClient, Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, context), data => new DurableTaskSchedulerResource(Client, data)); + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskSchedulerData)null, result); + break; + default: + throw new RequestFailedException(result); + } + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.Exists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskSchedulerData)null, result); + break; + default: + throw new RequestFailedException(result); + } + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskSchedulerData)null, result); + break; + default: + throw new RequestFailedException(result); + } + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// + /// The name of the Scheduler. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetIfExists"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, schedulerName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((DurableTaskSchedulerData)null, result); + break; + default: + throw new RequestFailedException(result); + } + if (response.Value == null) + { + return new NoValueResponse(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + /// The cancellation token to use. + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs new file mode 100644 index 000000000000..f4b1aabb97eb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A Durable Task Scheduler resource. + public partial class DurableTaskSchedulerData : TrackedResourceData, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerData() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DurableTaskSchedulerData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerData(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerData DeserializeDurableTaskSchedulerData(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType resourceType = default; + SystemData systemData = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary tags = default; + AzureLocation location = default; + DurableTaskSchedulerProperties properties = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("type"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("systemData"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); + continue; + } + if (prop.NameEquals("tags"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (prop.NameEquals("location"u8)) + { + location = new AzureLocation(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DurableTaskSchedulerProperties.DeserializeDurableTaskSchedulerProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties, + tags ?? new ChangeTrackingDictionary(), + location, + properties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DurableTaskSchedulerData)PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerData)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DurableTaskSchedulerData durableTaskSchedulerData) + { + if (durableTaskSchedulerData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(durableTaskSchedulerData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static DurableTaskSchedulerData FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeDurableTaskSchedulerData(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs new file mode 100644 index 000000000000..a8e30f116fda --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DurableTask +{ + /// A Durable Task Scheduler resource. + public partial class DurableTaskSchedulerData : TrackedResourceData + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The geo-location where the resource lives. + public DurableTaskSchedulerData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource tags. + /// The geo-location where the resource lives. + /// The resource-specific properties for this resource. + internal DurableTaskSchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, DurableTaskSchedulerProperties properties) : base(id, name, resourceType, systemData, tags, location) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; + } + + /// The resource-specific properties for this resource. + public DurableTaskSchedulerProperties Properties { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs new file mode 100644 index 000000000000..79023500c803 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DurableTask +{ + /// + public partial class DurableTaskSchedulerResource : IJsonModel + { + private static IJsonModel s_dataDeserializationInstance; + + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new DurableTaskSchedulerData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + /// The reader for deserializing the model. + /// The client options for reading and writing models. + DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The binary data to be processed. + /// The client options for reading and writing models. + DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs new file mode 100644 index 000000000000..5ffb8fa2db64 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.cs @@ -0,0 +1,722 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.DurableTask.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DurableTask +{ + /// + /// A class representing a DurableTaskScheduler along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetDurableTaskSchedulers method. + /// + public partial class DurableTaskSchedulerResource : ArmResource + { + private readonly ClientDiagnostics _schedulersClientDiagnostics; + private readonly Schedulers _schedulersRestClient; + private readonly DurableTaskSchedulerData _data; + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers"; + + /// Initializes a new instance of DurableTaskSchedulerResource for mocking. + protected DurableTaskSchedulerResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DurableTaskSchedulerResource(ArmClient client, DurableTaskSchedulerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DurableTaskSchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + TryGetApiVersion(ResourceType, out string durableTaskSchedulerApiVersion); + _schedulersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); + _schedulersRestClient = new Schedulers(_schedulersClientDiagnostics, Pipeline, Endpoint, durableTaskSchedulerApiVersion ?? "2025-11-01"); + ValidateResourceId(id); + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + public virtual DurableTaskSchedulerData Data + { + get + { + if (!HasData) + { + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } + return _data; + } + } + + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The schedulerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Get. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Get"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Update. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, DurableTaskSchedulerPatch.ToRequestContent(patch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskSchedulerOperationSource(Client), + _schedulersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Update. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DurableTaskSchedulerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, DurableTaskSchedulerPatch.ToRequestContent(patch), context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation( + new DurableTaskSchedulerOperationSource(Client), + _schedulersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_schedulersClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Scheduler + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. + /// + /// + /// Operation Id. + /// Schedulers_Delete. + /// + /// + /// Default Api Version. + /// 2025-11-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.Delete"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateDeleteRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + DurableTaskArmOperation operation = new DurableTaskArmOperation(_schedulersClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletionResponse(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a tag to the current resource. + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) + { + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + foreach (KeyValuePair tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a tag to the current resource. + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken)) + { + Response originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = Get(cancellationToken: cancellationToken).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + foreach (KeyValuePair tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + patch.Tags.ReplaceWith(tags); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = Get(cancellationToken: cancellationToken).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + patch.Tags.ReplaceWith(tags); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Removes a tag by key from the resource. + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) + { + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + foreach (KeyValuePair tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Removes a tag by key from the resource. + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using DiagnosticScope scope = _schedulersClientDiagnostics.CreateScope("DurableTaskSchedulerResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken)) + { + Response originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _schedulersRestClient.CreateGetRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(DurableTaskSchedulerData.FromResponse(result), result); + return Response.FromValue(new DurableTaskSchedulerResource(Client, response.Value), response.GetRawResponse()); + } + else + { + DurableTaskSchedulerData current = Get(cancellationToken: cancellationToken).Value.Data; + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch(); + foreach (KeyValuePair tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a collection of DurableTaskHubs in the . + /// An object representing collection of DurableTaskHubs and their operations over a DurableTaskHubResource. + public virtual DurableTaskHubCollection GetDurableTaskHubs() + { + return GetCachedClient(client => new DurableTaskHubCollection(client, Id)); + } + + /// Get a Task Hub. + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDurableTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + return await GetDurableTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); + } + + /// Get a Task Hub. + /// The name of the TaskHub. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDurableTaskHub(string taskHubName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + + return GetDurableTaskHubs().Get(taskHubName, cancellationToken); + } + + /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// Returns a object. + public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicy() + { + return new DurableTaskRetentionPolicyResource(Client, Id.AppendChildResource("retentionPolicies", "default")); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs index e7063af1920f..c0985cd8fc65 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/DurableTaskExtensions.cs @@ -8,7 +8,9 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; using Azure.ResourceManager.DurableTask.Mocking; using Azure.ResourceManager.Resources; @@ -17,241 +19,119 @@ namespace Azure.ResourceManager.DurableTask /// A class to add extension methods to Azure.ResourceManager.DurableTask. public static partial class DurableTaskExtensions { + /// private static MockableDurableTaskArmClient GetMockableDurableTaskArmClient(ArmClient client) { - return client.GetCachedClient(client0 => new MockableDurableTaskArmClient(client0)); + return client.GetCachedClient(client0 => new MockableDurableTaskArmClient(client0, ResourceIdentifier.Root)); } - private static MockableDurableTaskResourceGroupResource GetMockableDurableTaskResourceGroupResource(ArmResource resource) + /// + private static MockableDurableTaskResourceGroupResource GetMockableDurableTaskResourceGroupResource(ResourceGroupResource resourceGroupResource) { - return resource.GetCachedClient(client => new MockableDurableTaskResourceGroupResource(client, resource.Id)); + return resourceGroupResource.GetCachedClient(client => new MockableDurableTaskResourceGroupResource(client, resourceGroupResource.Id)); } - private static MockableDurableTaskSubscriptionResource GetMockableDurableTaskSubscriptionResource(ArmResource resource) + /// + private static MockableDurableTaskSubscriptionResource GetMockableDurableTaskSubscriptionResource(SubscriptionResource subscriptionResource) { - return resource.GetCachedClient(client => new MockableDurableTaskSubscriptionResource(client, resource.Id)); + return subscriptionResource.GetCachedClient(client => new MockableDurableTaskSubscriptionResource(client, subscriptionResource.Id)); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static SchedulerResource GetSchedulerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DurableTaskSchedulerResource GetDurableTaskSchedulerResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetSchedulerResource(id); + return GetMockableDurableTaskArmClient(client).GetDurableTaskSchedulerResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static SchedulerTaskHubResource GetSchedulerTaskHubResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DurableTaskHubResource GetDurableTaskHubResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetSchedulerTaskHubResource(id); + return GetMockableDurableTaskArmClient(client).GetDurableTaskHubResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static RetentionPolicyResource GetRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDurableTaskArmClient(client).GetRetentionPolicyResource(id); + return GetMockableDurableTaskArmClient(client).GetDurableTaskRetentionPolicyResource(id); } - /// - /// Gets a collection of SchedulerResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Gets a collection of DurableTaskSchedulers in the . + /// The the method will execute against. /// is null. - /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. - public static SchedulerCollection GetSchedulers(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of DurableTaskSchedulers and their operations over a DurableTaskSchedulerResource. + public static DurableTaskSchedulerCollection GetDurableTaskSchedulers(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulers(); + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulers(); } - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Get a Scheduler. + /// The the method will execute against. /// The name of the Scheduler. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + public static async Task> GetDurableTaskSchedulerAsync(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); + return await GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskSchedulerAsync(schedulerName, cancellationToken).ConfigureAwait(false); } - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// Get a Scheduler. + /// The the method will execute against. /// The name of the Scheduler. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) + public static Response GetDurableTaskScheduler(this ResourceGroupResource resourceGroupResource, string schedulerName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetScheduler(schedulerName, cancellationToken); + return GetMockableDurableTaskResourceGroupResource(resourceGroupResource).GetDurableTaskScheduler(schedulerName, cancellationToken); } - /// - /// List Schedulers by subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// List Schedulers by subscription. + /// The the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDurableTaskSchedulersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulersAsync(cancellationToken); + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulersAsync(cancellationToken); } - /// - /// List Schedulers by subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. + /// List Schedulers by subscription. + /// The the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDurableTaskSchedulers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetSchedulers(cancellationToken); + return GetMockableDurableTaskSubscriptionResource(subscriptionResource).GetDurableTaskSchedulers(cancellationToken); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs index 316171154272..7eb6cafd3cdc 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskArmClient.cs @@ -6,68 +6,51 @@ #nullable disable using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.DurableTask; namespace Azure.ResourceManager.DurableTask.Mocking { - /// A class to add extension methods to ArmClient. + /// A class to add extension methods to . public partial class MockableDurableTaskArmClient : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDurableTaskArmClient for mocking. protected MockableDurableTaskArmClient() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDurableTaskArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) { } - internal MockableDurableTaskArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. - /// Returns a object. - public virtual SchedulerResource GetSchedulerResource(ResourceIdentifier id) + /// Returns a object. + public virtual DurableTaskSchedulerResource GetDurableTaskSchedulerResource(ResourceIdentifier id) { - SchedulerResource.ValidateResourceId(id); - return new SchedulerResource(Client, id); + DurableTaskSchedulerResource.ValidateResourceId(id); + return new DurableTaskSchedulerResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. - /// Returns a object. - public virtual SchedulerTaskHubResource GetSchedulerTaskHubResource(ResourceIdentifier id) + /// Returns a object. + public virtual DurableTaskHubResource GetDurableTaskHubResource(ResourceIdentifier id) { - SchedulerTaskHubResource.ValidateResourceId(id); - return new SchedulerTaskHubResource(Client, id); + DurableTaskHubResource.ValidateResourceId(id); + return new DurableTaskHubResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. - /// Returns a object. - public virtual RetentionPolicyResource GetRetentionPolicyResource(ResourceIdentifier id) + /// Returns a object. + public virtual DurableTaskRetentionPolicyResource GetDurableTaskRetentionPolicyResource(ResourceIdentifier id) { - RetentionPolicyResource.ValidateResourceId(id); - return new RetentionPolicyResource(Client, id); + DurableTaskRetentionPolicyResource.ValidateResourceId(id); + return new DurableTaskRetentionPolicyResource(Client, id); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs index ffe0d4838367..cd53e68757c8 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskResourceGroupResource.cs @@ -8,56 +8,50 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.DurableTask; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DurableTask.Mocking { - /// A class to add extension methods to ResourceGroupResource. + /// A class to add extension methods to . public partial class MockableDurableTaskResourceGroupResource : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDurableTaskResourceGroupResource for mocking. protected MockableDurableTaskResourceGroupResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDurableTaskResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private string GetApiVersionOrNull(ResourceType resourceType) + /// Gets a collection of DurableTaskSchedulers in the . + /// An object representing collection of DurableTaskSchedulers and their operations over a DurableTaskSchedulerResource. + public virtual DurableTaskSchedulerCollection GetDurableTaskSchedulers() { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of SchedulerResources in the ResourceGroupResource. - /// An object representing collection of SchedulerResources and their operations over a SchedulerResource. - public virtual SchedulerCollection GetSchedulers() - { - return GetCachedClient(client => new SchedulerCollection(client, Id)); + return GetCachedClient(client => new DurableTaskSchedulerCollection(client, Id)); } /// /// Get a Scheduler /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. /// /// - /// Default Api Version - /// 2025-11-01 + /// Operation Id. + /// Schedulers_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-11-01. /// /// /// @@ -66,29 +60,27 @@ public virtual SchedulerCollection GetSchedulers() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) + public virtual async Task> GetDurableTaskSchedulerAsync(string schedulerName, CancellationToken cancellationToken = default) { - return await GetSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + return await GetDurableTaskSchedulers().GetAsync(schedulerName, cancellationToken).ConfigureAwait(false); } /// /// Get a Scheduler /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}. /// /// - /// Default Api Version - /// 2025-11-01 + /// Operation Id. + /// Schedulers_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2025-11-01. /// /// /// @@ -97,9 +89,11 @@ public virtual async Task> GetSchedulerAsync(string /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetScheduler(string schedulerName, CancellationToken cancellationToken = default) + public virtual Response GetDurableTaskScheduler(string schedulerName, CancellationToken cancellationToken = default) { - return GetSchedulers().Get(schedulerName, cancellationToken); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + return GetDurableTaskSchedulers().Get(schedulerName, cancellationToken); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs index 1ca9d2309320..0f60ad23c70e 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Extensions/MockableDurableTaskSubscriptionResource.cs @@ -5,98 +5,61 @@ #nullable disable +using System; using System.Threading; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.DurableTask; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.DurableTask.Mocking { - /// A class to add extension methods to SubscriptionResource. + /// A class to add extension methods to . public partial class MockableDurableTaskSubscriptionResource : ArmResource { - private ClientDiagnostics _schedulerClientDiagnostics; - private SchedulersRestOperations _schedulerRestClient; + private ClientDiagnostics _schedulersClientDiagnostics; + private Schedulers _schedulersRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableDurableTaskSubscriptionResource for mocking. protected MockableDurableTaskSubscriptionResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableDurableTaskSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private ClientDiagnostics SchedulerClientDiagnostics => _schedulerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); - private SchedulersRestOperations SchedulerRestClient => _schedulerRestClient ??= new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SchedulerResource.ResourceType)); + private ClientDiagnostics SchedulersClientDiagnostics => _schedulersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DurableTask.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } + private Schedulers SchedulersRestClient => _schedulersRestClient ??= new Schedulers(SchedulersClientDiagnostics, Pipeline, Endpoint, "2025-11-01"); - /// - /// List Schedulers by subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// List Schedulers by subscription. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSchedulersAsync(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDurableTaskSchedulersAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SchedulersGetBySubscriptionAsyncCollectionResultOfT(SchedulersRestClient, Guid.Parse(Id.SubscriptionId), context), data => new DurableTaskSchedulerResource(Client, data)); } - /// - /// List Schedulers by subscription - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListBySubscription - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// List Schedulers by subscription. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSchedulers(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDurableTaskSchedulers(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SchedulerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SchedulerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), SchedulerClientDiagnostics, Pipeline, "MockableDurableTaskSubscriptionResource.GetSchedulers", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SchedulersGetBySubscriptionCollectionResultOfT(SchedulersRestClient, Guid.Parse(Id.SubscriptionId), context), data => new DurableTaskSchedulerResource(Client, data)); } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs index d15981d33b18..9d30c0953938 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Argument.cs @@ -11,8 +11,10 @@ namespace Azure.ResourceManager.DurableTask { - internal static class Argument + internal static partial class Argument { + /// The value. + /// The name. public static void AssertNotNull(T value, string name) { if (value is null) @@ -21,8 +23,10 @@ public static void AssertNotNull(T value, string name) } } + /// The value. + /// The name. public static void AssertNotNull(T? value, string name) - where T : struct + where T : struct { if (!value.HasValue) { @@ -30,6 +34,8 @@ public static void AssertNotNull(T? value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(IEnumerable value, string name) { if (value is null) @@ -51,6 +57,8 @@ public static void AssertNotNullOrEmpty(IEnumerable value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(string value, string name) { if (value is null) @@ -62,68 +70,5 @@ public static void AssertNotNullOrEmpty(string value, string name) throw new ArgumentException("Value cannot be an empty string.", name); } } - - public static void AssertNotNullOrWhiteSpace(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); - } - } - - public static void AssertNotDefault(ref T value, string name) - where T : struct, IEquatable - { - if (value.Equals(default)) - { - throw new ArgumentException("Value cannot be empty.", name); - } - } - - public static void AssertInRange(T value, T minimum, T maximum, string name) - where T : notnull, IComparable - { - if (minimum.CompareTo(value) > 0) - { - throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); - } - if (maximum.CompareTo(value) < 0) - { - throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); - } - } - - public static void AssertEnumDefined(Type enumType, object value, string name) - { - if (!Enum.IsDefined(enumType, value)) - { - throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); - } - } - - public static T CheckNotNull(T value, string name) - where T : class - { - AssertNotNull(value, name); - return value; - } - - public static string CheckNotNullOrEmpty(string value, string name) - { - AssertNotNullOrEmpty(value, name); - return value; - } - - public static void AssertNull(T value, string name, string message = null) - { - if (value != null) - { - throw new ArgumentException(message ?? "Value must be null.", name); - } - } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/AsyncPageableWrapper.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/AsyncPageableWrapper.cs new file mode 100644 index 000000000000..a4ab10858e35 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/AsyncPageableWrapper.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class AsyncPageableWrapper : AsyncPageable + { + /// The source async pageable value of type AsyncPageable<T>. + private AsyncPageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the AsyncPageableWrapper class. + /// The source async pageable value of type AsyncPageable<T>. + /// The converter function from T to U. + public AsyncPageableWrapper(AsyncPageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from AsyncPageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + await foreach (Page page in _source.AsPages(continuationToken, pageSizeHint).ConfigureAwait(false)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs index 001cb5f61046..445d935bdc6b 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -11,7 +11,8 @@ namespace Azure.ResourceManager.DurableTask { - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary + where TKey : notnull { private IDictionary _innerDictionary; @@ -19,6 +20,7 @@ public ChangeTrackingDictionary() { } + /// The inner dictionary. public ChangeTrackingDictionary(IDictionary dictionary) { if (dictionary == null) @@ -28,6 +30,7 @@ public ChangeTrackingDictionary(IDictionary dictionary) _innerDictionary = new Dictionary(dictionary); } + /// The inner dictionary. public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) { if (dictionary == null) @@ -41,16 +44,22 @@ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerDictionary == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + /// Gets the Keys. public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + /// Gets the Values. public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + /// Gets or sets the value associated with the specified key. public TValue this[TKey key] { get @@ -67,8 +76,10 @@ public TValue this[TKey key] } } + /// Gets the Keys. IEnumerable IReadOnlyDictionary.Keys => Keys; + /// Gets the Values. IEnumerable IReadOnlyDictionary.Values => Values; public IEnumerator> GetEnumerator() @@ -89,6 +100,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(KeyValuePair item) { EnsureDictionary().Add(item); @@ -99,6 +111,7 @@ public void Clear() EnsureDictionary().Clear(); } + /// The item to search for. public bool Contains(KeyValuePair item) { if (IsUndefined) @@ -108,6 +121,8 @@ public bool Contains(KeyValuePair item) return EnsureDictionary().Contains(item); } + /// The array to copy. + /// The index. public void CopyTo(KeyValuePair[] array, int index) { if (IsUndefined) @@ -117,6 +132,7 @@ public void CopyTo(KeyValuePair[] array, int index) EnsureDictionary().CopyTo(array, index); } + /// The item to remove. public bool Remove(KeyValuePair item) { if (IsUndefined) @@ -126,11 +142,14 @@ public bool Remove(KeyValuePair item) return EnsureDictionary().Remove(item); } + /// The key. + /// The value to add. public void Add(TKey key, TValue value) { EnsureDictionary().Add(key, value); } + /// The key to search for. public bool ContainsKey(TKey key) { if (IsUndefined) @@ -140,6 +159,7 @@ public bool ContainsKey(TKey key) return EnsureDictionary().ContainsKey(key); } + /// The key. public bool Remove(TKey key) { if (IsUndefined) @@ -149,6 +169,8 @@ public bool Remove(TKey key) return EnsureDictionary().Remove(key); } + /// The key to search for. + /// The value. public bool TryGetValue(TKey key, out TValue value) { if (IsUndefined) diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs index 5ce8ee7ec441..f9271866d0ee 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ChangeTrackingList.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.DurableTask { - internal class ChangeTrackingList : IList, IReadOnlyList + internal partial class ChangeTrackingList : IList, IReadOnlyList { private IList _innerList; @@ -20,6 +20,7 @@ public ChangeTrackingList() { } + /// The inner list. public ChangeTrackingList(IList innerList) { if (innerList != null) @@ -28,6 +29,7 @@ public ChangeTrackingList(IList innerList) } } + /// The inner list. public ChangeTrackingList(IReadOnlyList innerList) { if (innerList != null) @@ -36,12 +38,16 @@ public ChangeTrackingList(IReadOnlyList innerList) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerList == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureList().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + /// Gets or sets the value associated with the specified key. public T this[int index] { get @@ -85,6 +91,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(T item) { EnsureList().Add(item); @@ -95,6 +102,7 @@ public void Clear() EnsureList().Clear(); } + /// The item. public bool Contains(T item) { if (IsUndefined) @@ -104,6 +112,8 @@ public bool Contains(T item) return EnsureList().Contains(item); } + /// The array to copy to. + /// The array index. public void CopyTo(T[] array, int arrayIndex) { if (IsUndefined) @@ -113,6 +123,7 @@ public void CopyTo(T[] array, int arrayIndex) EnsureList().CopyTo(array, arrayIndex); } + /// The item. public bool Remove(T item) { if (IsUndefined) @@ -122,6 +133,7 @@ public bool Remove(T item) return EnsureList().Remove(item); } + /// The item. public int IndexOf(T item) { if (IsUndefined) @@ -131,11 +143,14 @@ public int IndexOf(T item) return EnsureList().IndexOf(item); } + /// The inner list. + /// The item. public void Insert(int index, T item) { EnsureList().Insert(index, item); } + /// The inner list. public void RemoveAt(int index) { if (IsUndefined) diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ClientPipelineExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ClientPipelineExtensions.cs new file mode 100644 index 000000000000..7f37bc55afd9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ClientPipelineExtensions.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DurableTask +{ + internal static partial class ClientPipelineExtensions + { + public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + await pipeline.SendAsync(message, userCancellationToken).ConfigureAwait(false); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + pipeline.Send(message, userCancellationToken); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = await pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + + public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = pipeline.ProcessMessage(message, context); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenMemberAttribute.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenMemberAttribute.cs new file mode 100644 index 000000000000..ae1227a12708 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenMemberAttribute.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DurableTask +{ + [AttributeUsage((AttributeTargets.Property | AttributeTargets.Field))] + internal partial class CodeGenMemberAttribute : CodeGenTypeAttribute + { + /// The original name of the member. + public CodeGenMemberAttribute(string originalName) : base(originalName) + { + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSerializationAttribute.cs new file mode 100644 index 000000000000..adce779e9a27 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DurableTask +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), AllowMultiple = true, Inherited = true)] + internal partial class CodeGenSerializationAttribute : Attribute + { + /// The property name which these hooks apply to. + public CodeGenSerializationAttribute(string propertyName) + { + PropertyName = propertyName; + } + + /// The property name which these hooks apply to. + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + { + PropertyName = propertyName; + PropertySerializationName = propertySerializationName; + } + + /// Gets or sets the property name which these hooks should apply to. + public string PropertyName { get; } + + /// Gets or sets the serialization name of the property. + public string PropertySerializationName { get; set; } + + /// + /// Gets or sets the method name to use when serializing the property value (property name excluded). + /// The signature of the serialization hook method must be or compatible with when invoking: private void SerializeHook(Utf8JsonWriter writer); + /// + public string SerializationValueHook { get; set; } + + /// + /// Gets or sets the method name to use when deserializing the property value from the JSON. + /// private static void DeserializationHook(JsonProperty property, ref TypeOfTheProperty propertyValue); // if the property is required + /// private static void DeserializationHook(JsonProperty property, ref Optional<TypeOfTheProperty> propertyValue); // if the property is optional + /// + public string DeserializationValueHook { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSuppressAttribute.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSuppressAttribute.cs new file mode 100644 index 000000000000..a9a12cfe93f9 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenSuppressAttribute.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DurableTask +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct), AllowMultiple = true)] + internal partial class CodeGenSuppressAttribute : Attribute + { + /// The member to suppress. + /// The types of the parameters of the member. + public CodeGenSuppressAttribute(string member, params Type[] parameters) + { + Member = member; + Parameters = parameters; + } + + /// Gets the Member. + public string Member { get; } + + /// Gets the Parameters. + public Type[] Parameters { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenTypeAttribute.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenTypeAttribute.cs new file mode 100644 index 000000000000..51fe8ec73c75 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/CodeGenTypeAttribute.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DurableTask +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))] + internal partial class CodeGenTypeAttribute : Attribute + { + /// The original name of the type. + public CodeGenTypeAttribute(string originalName) + { + OriginalName = originalName; + } + + /// Gets the OriginalName. + public string OriginalName { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ErrorResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ErrorResult.cs new file mode 100644 index 000000000000..63ea9983c810 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ErrorResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class ErrorResult : Response + { + private readonly Response _response; + private readonly RequestFailedException _exception; + + public ErrorResult(Response response, RequestFailedException exception) + { + _response = response; + _exception = exception; + } + + /// Gets the Value. + public override T Value => throw _exception; + + /// + public override Response GetRawResponse() + { + return _response; + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs index 0ec40ad2846b..8694c7fd99ea 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/ModelSerializationExtensions.cs @@ -11,18 +11,16 @@ using System.Diagnostics; using System.Globalization; using System.Text.Json; -using System.Xml; -using Azure.Core; namespace Azure.ResourceManager.DurableTask { - internal static class ModelSerializationExtensions + internal static partial class ModelSerializationExtensions { - internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); - internal static readonly ModelReaderWriterOptions WireV3Options = new ModelReaderWriterOptions("W|v3"); - internal static readonly ModelReaderWriterOptions JsonV3Options = new ModelReaderWriterOptions("J|v3"); - internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions + { + MaxDepth = 256 + }; public static object GetObject(this JsonElement element) { @@ -48,14 +46,14 @@ public static object GetObject(this JsonElement element) case JsonValueKind.Null: return null; case JsonValueKind.Object: - var dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var jsonProperty in element.EnumerateObject()) { dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); } return dictionary; case JsonValueKind.Array: - var list = new List(); + List list = new List(); foreach (var item in element.EnumerateArray()) { list.Add(item.GetObject()); @@ -93,7 +91,7 @@ public static char GetChar(this JsonElement element) { if (element.ValueKind == JsonValueKind.String) { - var text = element.GetString(); + string text = element.GetString(); if (text == null || text.Length != 1) { throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); @@ -107,14 +105,14 @@ public static char GetChar(this JsonElement element) } [Conditional("DEBUG")] - public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + public static void ThrowNonNullablePropertyIsNull(this JsonProperty @property) { - throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + throw new JsonException($"A property '{@property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); } public static string GetRequiredString(this JsonElement element) { - var value = element.GetString(); + string value = element.GetString(); if (value == null) { throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); @@ -181,9 +179,6 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, T value, Mode case IJsonModel jsonModel: jsonModel.Write(writer, options ?? WireOptions); break; - case IUtf8JsonSerializable serializable: - serializable.Write(writer); - break; case byte[] bytes: writer.WriteBase64StringValue(bytes); break; @@ -259,151 +254,5 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, Mo { writer.WriteObjectValue(value, options); } - - internal static bool IsSentinelValue(BinaryData value) - { - ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; - ReadOnlySpan valueSpan = value.ToMemory().Span; - return sentinelSpan.SequenceEqual(valueSpan); - } - - internal static class TypeFormatters - { - private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - public const string DefaultNumberFormat = "G"; - - public static string ToString(bool value) => value ? "true" : "false"; - - public static string ToString(DateTime value, string format) => value.Kind switch - { - DateTimeKind.Utc => ToString((DateTimeOffset)value, format), - _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") - }; - - public static string ToString(DateTimeOffset value, string format) => format switch - { - "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), - "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), - "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "R" => value.ToString("r", CultureInfo.InvariantCulture), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(TimeSpan value, string format) => format switch - { - "P" => XmlConvert.ToString(value), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(byte[] value, string format) => format switch - { - "U" => ToBase64UrlString(value), - "D" => Convert.ToBase64String(value), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - - public static string ToBase64UrlString(byte[] value) - { - int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; - int size = checked(numWholeOrPartialInputBlocks * 4); - char[] output = new char[size]; - - int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); - - int i = 0; - for (; i < numBase64Chars; i++) - { - char ch = output[i]; - if (ch == '+') - { - output[i] = '-'; - } - else - { - if (ch == '/') - { - output[i] = '_'; - } - else - { - if (ch == '=') - { - break; - } - } - } - } - - return new string(output, 0, i); - } - - public static byte[] FromBase64UrlString(string value) - { - int paddingCharsToAdd = (value.Length % 4) switch - { - 0 => 0, - 2 => 2, - 3 => 1, - _ => throw new InvalidOperationException("Malformed input") - }; - char[] output = new char[(value.Length + paddingCharsToAdd)]; - int i = 0; - for (; i < value.Length; i++) - { - char ch = value[i]; - if (ch == '-') - { - output[i] = '+'; - } - else - { - if (ch == '_') - { - output[i] = '/'; - } - else - { - output[i] = ch; - } - } - } - - for (; i < output.Length; i++) - { - output[i] = '='; - } - - return Convert.FromBase64CharArray(output, 0, output.Length); - } - - public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch - { - "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), - _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) - }; - - public static TimeSpan ParseTimeSpan(string value, string format) => format switch - { - "P" => XmlConvert.ToTimeSpan(value), - _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) - }; - - public static string ConvertToString(object value, string format = null) => value switch - { - null => "null", - string s => s, - bool b => ToString(b), - int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), - byte[] b0 when format != null => ToString(b0, format), - IEnumerable s0 => string.Join(",", s0), - DateTimeOffset dateTime when format != null => ToString(dateTime, format), - TimeSpan timeSpan when format != null => ToString(timeSpan, format), - TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), - Guid guid => guid.ToString(), - BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), - _ => value.ToString() - }; - } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs index dd8a99d7dd47..cbe743283152 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Optional.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DurableTask { - internal static class Optional + internal static partial class Optional { public static bool IsCollectionDefined(IEnumerable collection) { @@ -28,7 +28,7 @@ public static bool IsCollectionDefined(IReadOnlyDictionary(T? value) - where T : struct + where T : struct { return value.HasValue; } @@ -38,14 +38,14 @@ public static bool IsDefined(object value) return value != null; } - public static bool IsDefined(JsonElement value) + public static bool IsDefined(string value) { - return value.ValueKind != JsonValueKind.Undefined; + return value != null; } - public static bool IsDefined(string value) + public static bool IsDefined(JsonElement value) { - return value != null; + return value.ValueKind != JsonValueKind.Undefined; } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/PageableWrapper.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/PageableWrapper.cs new file mode 100644 index 000000000000..b5899f434c2e --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/PageableWrapper.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class PageableWrapper : Pageable + { + /// The source pageable value of type Pageable<T>. + private Pageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the PageableWrapper class. + /// The source pageable value of type Pageable<T>. + /// The converter function from T to U. + public PageableWrapper(Pageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from Pageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + foreach (Page page in _source.AsPages(continuationToken, pageSizeHint)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RawRequestUriBuilderExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RawRequestUriBuilderExtensions.cs new file mode 100644 index 000000000000..8629db913193 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RawRequestUriBuilderExtensions.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.DurableTask +{ + internal static partial class RawRequestUriBuilderExtensions + { + public static void AppendQueryDelimited(this RawRequestUriBuilder builder, string name, IEnumerable value, string delimiter, SerializationFormat format = SerializationFormat.Default, bool escape = true) + { + delimiter ??= ","; + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + builder.AppendQuery(name, string.Join(delimiter, stringValues), escape); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RequestContextExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RequestContextExtensions.cs new file mode 100644 index 000000000000..7986f3c7e926 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/RequestContextExtensions.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using Azure; + +namespace Azure.ResourceManager.DurableTask +{ + internal static partial class RequestContextExtensions + { + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + public static ValueTuple Parse(this RequestContext context) + { + if (context == null) + { + return (CancellationToken.None, ErrorOptions.Default); + } + return (context.CancellationToken, context.ErrorOptions); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/SerializationFormat.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/SerializationFormat.cs new file mode 100644 index 000000000000..4ce74b9474c4 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/SerializationFormat.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DurableTask +{ + internal enum SerializationFormat + { + /// The default serialization format. + Default = 0, + /// The RFC1123 date time format. + DateTime_RFC1123 = 1, + /// The RFC3339 date time format. + DateTime_RFC3339 = 2, + /// The RFC7231 date time format. + DateTime_RFC7231 = 3, + /// The ISO8601 date time format. + DateTime_ISO8601 = 4, + /// The Unix date time format. + DateTime_Unix = 5, + /// The ISO8601 date format. + Date_ISO8601 = 6, + /// The ISO8601 duration format. + Duration_ISO8601 = 7, + /// The constant duration format. + Duration_Constant = 8, + /// The seconds duration format. + Duration_Seconds = 9, + /// The seconds duration format with float precision. + Duration_Seconds_Float = 10, + /// The seconds duration format with double precision. + Duration_Seconds_Double = 11, + /// The milliseconds duration format. + Duration_Milliseconds = 12, + /// The milliseconds duration format with float precision. + Duration_Milliseconds_Float = 13, + /// The milliseconds duration format with double precision. + Duration_Milliseconds_Double = 14, + /// The ISO8601 time format. + Time_ISO8601 = 15, + /// The Base64Url bytes format. + Bytes_Base64Url = 16, + /// The Base64 bytes format. + Bytes_Base64 = 17 + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/TypeFormatters.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/TypeFormatters.cs new file mode 100644 index 000000000000..9309273a4bd8 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/TypeFormatters.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Xml; + +namespace Azure.ResourceManager.DurableTask +{ + internal static partial class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Generated clients require it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked (value.Length + 2) / 3; + int size = checked (numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ToFormatSpecifier(SerializationFormat format) => format switch + { + SerializationFormat.DateTime_RFC1123 => "R", + SerializationFormat.DateTime_RFC3339 => "O", + SerializationFormat.DateTime_RFC7231 => "R", + SerializationFormat.DateTime_ISO8601 => "O", + SerializationFormat.Date_ISO8601 => "D", + SerializationFormat.DateTime_Unix => "U", + SerializationFormat.Bytes_Base64Url => "U", + SerializationFormat.Bytes_Base64 => "D", + SerializationFormat.Duration_ISO8601 => "P", + SerializationFormat.Duration_Constant => "c", + SerializationFormat.Duration_Seconds => "%s", + SerializationFormat.Duration_Seconds_Float => "s\\.FFF", + SerializationFormat.Duration_Seconds_Double => "s\\.FFFFFF", + SerializationFormat.Time_ISO8601 => "T", + _ => null + }; + + public static string ConvertToString(object value, SerializationFormat format = SerializationFormat.Default) + { + string formatSpecifier = ToFormatSpecifier(format); + + return value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when formatSpecifier != null => ToString(b0, formatSpecifier), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when formatSpecifier != null => ToString(dateTime, formatSpecifier), + TimeSpan timeSpan when format == SerializationFormat.Duration_Seconds => Convert.ToInt32(timeSpan.TotalSeconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan0 when format == SerializationFormat.Duration_Seconds_Float || format == SerializationFormat.Duration_Seconds_Double => timeSpan0.TotalSeconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan1 when format == SerializationFormat.Duration_Milliseconds => Convert.ToInt32(timeSpan1.TotalMilliseconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan2 when format == SerializationFormat.Duration_Milliseconds_Float || format == SerializationFormat.Duration_Milliseconds_Double => timeSpan2.TotalMilliseconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan3 when formatSpecifier != null => ToString(timeSpan3, formatSpecifier), + TimeSpan timeSpan4 => XmlConvert.ToString(timeSpan4), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs index 491ccbbaaf8c..46bb063fb13f 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.DurableTask { - internal class Utf8JsonRequestContent : RequestContent + internal partial class Utf8JsonRequestContent : RequestContent { private readonly MemoryStream _stream; private readonly RequestContent _content; @@ -25,20 +25,26 @@ public Utf8JsonRequestContent() JsonWriter = new Utf8JsonWriter(_stream); } + /// Gets the JsonWriter. public Utf8JsonWriter JsonWriter { get; } + /// The stream containing the data to be written. + /// The cancellation token to use. public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) { await JsonWriter.FlushAsync().ConfigureAwait(false); await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); } + /// The stream containing the data to be written. + /// The cancellation token to use. public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) { JsonWriter.Flush(); _content.WriteTo(stream, cancellationToken); } + /// public override bool TryComputeLength(out long length) { length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs index dce4f9959160..6f0afcac5a21 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperation.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.DurableTask { -#pragma warning disable SA1649 // File name should match first type name - internal class DurableTaskArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class DurableTaskArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected DurableTaskArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response); @@ -36,12 +37,20 @@ internal DurableTaskArmOperation(Response response, RehydrationToken? rehydratio _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal DurableTaskArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,48 +58,49 @@ internal DurableTaskArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeli _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DurableTaskArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + nextLinkOperation, + clientDiagnostics, + response, + "DurableTaskArmOperation", + null, + new SequentialDelayStrategy()); } + /// Gets the Id. + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// Gets the HasCompleted. + public override bool HasCompleted => _operation.HasCompleted; + + /// The token to rehydrate a long-running operation. private string GetOperationId(RehydrationToken? rehydrationToken) { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); + return rehydrationToken?.Id; } - /// - public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// + /// public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs index 61f031b78ccb..d2450d9654ce 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskArmOperationOfT.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.DurableTask { -#pragma warning disable SA1649 // File name should match first type name - internal class DurableTaskArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class DurableTaskArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected DurableTaskArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal DurableTaskArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); @@ -36,12 +37,21 @@ internal DurableTaskArmOperation(Response response, RehydrationToken? rehydra _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal DurableTaskArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,54 +59,55 @@ internal DurableTaskArmOperation(IOperationSource source, ClientDiagnostics c _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DurableTaskArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + NextLinkOperationImplementation.Create(source, nextLinkOperation), + clientDiagnostics, + response, + "DurableTaskArmOperation", + null, + new SequentialDelayStrategy()); } - private string GetOperationId(RehydrationToken? rehydrationToken) - { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); - } - /// + /// Gets the Id. public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// - public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - - /// + /// Gets the Value. public override T Value => _operation.Value; - /// + /// Gets the HasValue. public override bool HasValue => _operation.HasValue; - /// + /// Gets the HasCompleted. public override bool HasCompleted => _operation.HasCompleted; - /// + /// The token to rehydrate a long-running operation. + private string GetOperationId(RehydrationToken? rehydrationToken) + { + return rehydrationToken?.Id; + } + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); - /// + /// public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs new file mode 100644 index 000000000000..9c59ee4a287b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskHubOperationSource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + internal partial class DurableTaskHubOperationSource : IOperationSource + { + private readonly ArmClient _client; + + /// + /// + internal DurableTaskHubOperationSource(ArmClient client) + { + _client = client; + } + + /// The response from the service. + /// The cancellation token to use. + /// + DurableTaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + DurableTaskHubData data = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskHubResource(_client, data); + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + DurableTaskHubData data = DurableTaskHubData.DeserializeDurableTaskHubData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskHubResource(_client, data); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs new file mode 100644 index 000000000000..a39aa8822157 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskRetentionPolicyOperationSource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + internal partial class DurableTaskRetentionPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + /// + /// + internal DurableTaskRetentionPolicyOperationSource(ArmClient client) + { + _client = client; + } + + /// The response from the service. + /// The cancellation token to use. + /// + DurableTaskRetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + DurableTaskRetentionPolicyData data = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskRetentionPolicyResource(_client, data); + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + DurableTaskRetentionPolicyData data = DurableTaskRetentionPolicyData.DeserializeDurableTaskRetentionPolicyData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskRetentionPolicyResource(_client, data); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs new file mode 100644 index 000000000000..2efeeda8dafe --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/DurableTaskSchedulerOperationSource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.DurableTask +{ + /// + internal partial class DurableTaskSchedulerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + /// + /// + internal DurableTaskSchedulerOperationSource(ArmClient client) + { + _client = client; + } + + /// The response from the service. + /// The cancellation token to use. + /// + DurableTaskSchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + DurableTaskSchedulerData data = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskSchedulerResource(_client, data); + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + DurableTaskSchedulerData data = DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new DurableTaskSchedulerResource(_client, data); + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs deleted file mode 100644 index a64f6c90cf32..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/RetentionPolicyOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class RetentionPolicyOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal RetentionPolicyOperationSource(ArmClient client) - { - _client = client; - } - - RetentionPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new RetentionPolicyResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new RetentionPolicyResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs deleted file mode 100644 index 2f0bd9c8aca9..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class SchedulerOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal SchedulerOperationSource(ArmClient client) - { - _client = client; - } - - SchedulerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new SchedulerResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new SchedulerResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs deleted file mode 100644 index 1acd73ebcc93..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/LongRunningOperation/SchedulerTaskHubOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask -{ - internal class SchedulerTaskHubOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal SchedulerTaskHubOperationSource(ArmClient client) - { - _client = client; - } - - SchedulerTaskHubResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return new SchedulerTaskHubResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDurableTaskContext.Default); - return await Task.FromResult(new SchedulerTaskHubResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs index b075c519ae09..cd6bd4b0c6cc 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/AzureResourceManagerDurableTaskContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.DurableTask.Models; using Azure.ResourceManager.Models; @@ -13,25 +14,24 @@ namespace Azure.ResourceManager.DurableTask { /// /// Context class which will be filled in by the System.ClientModel.SourceGeneration. - /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' + /// For more information /// + [ModelReaderWriterBuildable(typeof(DurableTaskHubData))] + [ModelReaderWriterBuildable(typeof(DurableTaskHubProperties))] + [ModelReaderWriterBuildable(typeof(DurableTaskHubResource))] + [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyData))] + [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyDetails))] + [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyProperties))] + [ModelReaderWriterBuildable(typeof(DurableTaskRetentionPolicyResource))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerData))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerPatch))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerPatchProperties))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerProperties))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerResource))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerSku))] + [ModelReaderWriterBuildable(typeof(DurableTaskSchedulerSkuUpdate))] [ModelReaderWriterBuildable(typeof(ResponseError))] - [ModelReaderWriterBuildable(typeof(RetentionPolicyData))] - [ModelReaderWriterBuildable(typeof(RetentionPolicyDetails))] - [ModelReaderWriterBuildable(typeof(RetentionPolicyListResult))] - [ModelReaderWriterBuildable(typeof(RetentionPolicyProperties))] - [ModelReaderWriterBuildable(typeof(RetentionPolicyResource))] - [ModelReaderWriterBuildable(typeof(SchedulerData))] [ModelReaderWriterBuildable(typeof(SchedulerListResult))] - [ModelReaderWriterBuildable(typeof(SchedulerPatch))] - [ModelReaderWriterBuildable(typeof(SchedulerPatchProperties))] - [ModelReaderWriterBuildable(typeof(SchedulerProperties))] - [ModelReaderWriterBuildable(typeof(SchedulerResource))] - [ModelReaderWriterBuildable(typeof(SchedulerSku))] - [ModelReaderWriterBuildable(typeof(SchedulerSkuUpdate))] - [ModelReaderWriterBuildable(typeof(SchedulerTaskHubData))] - [ModelReaderWriterBuildable(typeof(SchedulerTaskHubProperties))] - [ModelReaderWriterBuildable(typeof(SchedulerTaskHubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(TaskHubListResult))] public partial class AzureResourceManagerDurableTaskContext : ModelReaderWriterContext diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs new file mode 100644 index 000000000000..6c4202e2d049 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of Task Hub. + public partial class DurableTaskHubProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DashboardUri)) + { + writer.WritePropertyName("dashboardUrl"u8); + writer.WriteStringValue(DashboardUri.AbsoluteUri); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskHubProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskHubProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskHubProperties DeserializeDurableTaskHubProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + Uri dashboardUri = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DurableTaskProvisioningState(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("dashboardUrl"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dashboardUri = new Uri(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskHubProperties(provisioningState, dashboardUri, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskHubProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskHubProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskHubProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs new file mode 100644 index 000000000000..f8918e674505 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskHubProperties.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of Task Hub. + public partial class DurableTaskHubProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskHubProperties() + { + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler dashboard. + /// Keeps track of any properties unknown to the library. + internal DurableTaskHubProperties(DurableTaskProvisioningState? provisioningState, Uri dashboardUri, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + DashboardUri = dashboardUri; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + + /// URL of the durable task scheduler dashboard. + public Uri DashboardUri { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs new file mode 100644 index 000000000000..622cde376611 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskProvisioningState.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The status of the current operation. + public readonly partial struct DurableTaskProvisioningState : IEquatable + { + private readonly string _value; + /// Resource has been created. + private const string SucceededValue = "Succeeded"; + /// Resource creation failed. + private const string FailedValue = "Failed"; + /// Resource creation was canceled. + private const string CanceledValue = "Canceled"; + /// The resource is being provisioned. + private const string ProvisioningValue = "Provisioning"; + /// The resource is updating. + private const string UpdatingValue = "Updating"; + /// The resource is being deleted. + private const string DeletingValue = "Deleting"; + /// The resource create request has been accepted. + private const string AcceptedValue = "Accepted"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DurableTaskProvisioningState(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Resource has been created. + public static DurableTaskProvisioningState Succeeded { get; } = new DurableTaskProvisioningState(SucceededValue); + + /// Resource creation failed. + public static DurableTaskProvisioningState Failed { get; } = new DurableTaskProvisioningState(FailedValue); + + /// Resource creation was canceled. + public static DurableTaskProvisioningState Canceled { get; } = new DurableTaskProvisioningState(CanceledValue); + + /// The resource is being provisioned. + public static DurableTaskProvisioningState Provisioning { get; } = new DurableTaskProvisioningState(ProvisioningValue); + + /// The resource is updating. + public static DurableTaskProvisioningState Updating { get; } = new DurableTaskProvisioningState(UpdatingValue); + + /// The resource is being deleted. + public static DurableTaskProvisioningState Deleting { get; } = new DurableTaskProvisioningState(DeletingValue); + + /// The resource create request has been accepted. + public static DurableTaskProvisioningState Accepted { get; } = new DurableTaskProvisioningState(AcceptedValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DurableTaskProvisioningState left, DurableTaskProvisioningState right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskProvisioningState(string value) => new DurableTaskProvisioningState(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskProvisioningState?(string value) => value == null ? null : new DurableTaskProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskProvisioningState other && Equals(other); + + /// + public bool Equals(DurableTaskProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskPurgeableOrchestrationState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskPurgeableOrchestrationState.cs new file mode 100644 index 000000000000..36ef1c3efba5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskPurgeableOrchestrationState.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Purgeable orchestration state to be used in retention policies. + public readonly partial struct DurableTaskPurgeableOrchestrationState : IEquatable + { + private readonly string _value; + /// The orchestration is completed. + private const string CompletedValue = "Completed"; + /// The orchestration is failed. + private const string FailedValue = "Failed"; + /// The orchestration is terminated. + private const string TerminatedValue = "Terminated"; + /// The orchestration is canceled. + private const string CanceledValue = "Canceled"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DurableTaskPurgeableOrchestrationState(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// The orchestration is completed. + public static DurableTaskPurgeableOrchestrationState Completed { get; } = new DurableTaskPurgeableOrchestrationState(CompletedValue); + + /// The orchestration is failed. + public static DurableTaskPurgeableOrchestrationState Failed { get; } = new DurableTaskPurgeableOrchestrationState(FailedValue); + + /// The orchestration is terminated. + public static DurableTaskPurgeableOrchestrationState Terminated { get; } = new DurableTaskPurgeableOrchestrationState(TerminatedValue); + + /// The orchestration is canceled. + public static DurableTaskPurgeableOrchestrationState Canceled { get; } = new DurableTaskPurgeableOrchestrationState(CanceledValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DurableTaskPurgeableOrchestrationState left, DurableTaskPurgeableOrchestrationState right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DurableTaskPurgeableOrchestrationState left, DurableTaskPurgeableOrchestrationState right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskPurgeableOrchestrationState(string value) => new DurableTaskPurgeableOrchestrationState(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskPurgeableOrchestrationState?(string value) => value == null ? null : new DurableTaskPurgeableOrchestrationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskPurgeableOrchestrationState other && Equals(other); + + /// + public bool Equals(DurableTaskPurgeableOrchestrationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskResourceRedundancyState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskResourceRedundancyState.cs new file mode 100644 index 000000000000..ccf3cb193f1d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskResourceRedundancyState.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The state of the resource redundancy. + public readonly partial struct DurableTaskResourceRedundancyState : IEquatable + { + private readonly string _value; + /// The resource is not redundant. + private const string NoneValue = "None"; + /// The resource is zone redundant. + private const string ZoneValue = "Zone"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DurableTaskResourceRedundancyState(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// The resource is not redundant. + public static DurableTaskResourceRedundancyState None { get; } = new DurableTaskResourceRedundancyState(NoneValue); + + /// The resource is zone redundant. + public static DurableTaskResourceRedundancyState Zone { get; } = new DurableTaskResourceRedundancyState(ZoneValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DurableTaskResourceRedundancyState left, DurableTaskResourceRedundancyState right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DurableTaskResourceRedundancyState left, DurableTaskResourceRedundancyState right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskResourceRedundancyState(string value) => new DurableTaskResourceRedundancyState(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskResourceRedundancyState?(string value) => value == null ? null : new DurableTaskResourceRedundancyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskResourceRedundancyState other && Equals(other); + + /// + public bool Equals(DurableTaskResourceRedundancyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs new file mode 100644 index 000000000000..27c84dd976f0 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of a retention policy. + public partial class DurableTaskRetentionPolicyDetails : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DurableTaskRetentionPolicyDetails() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support writing '{format}' format."); + } + writer.WritePropertyName("retentionPeriodInDays"u8); + writer.WriteNumberValue(RetentionPeriodInDays); + if (Optional.IsDefined(OrchestrationState)) + { + writer.WritePropertyName("orchestrationState"u8); + writer.WriteStringValue(OrchestrationState.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskRetentionPolicyDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskRetentionPolicyDetails DeserializeDurableTaskRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int retentionPeriodInDays = default; + DurableTaskPurgeableOrchestrationState? orchestrationState = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("retentionPeriodInDays"u8)) + { + retentionPeriodInDays = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("orchestrationState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orchestrationState = new DurableTaskPurgeableOrchestrationState(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskRetentionPolicyDetails(retentionPeriodInDays, orchestrationState, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskRetentionPolicyDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskRetentionPolicyDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyDetails)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs new file mode 100644 index 000000000000..7e1c92e8f66a --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyDetails.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The properties of a retention policy. + public partial class DurableTaskRetentionPolicyDetails + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The retention period in days after which the orchestration will be purged automatically. + public DurableTaskRetentionPolicyDetails(int retentionPeriodInDays) + { + RetentionPeriodInDays = retentionPeriodInDays; + } + + /// Initializes a new instance of . + /// The retention period in days after which the orchestration will be purged automatically. + /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. + /// Keeps track of any properties unknown to the library. + internal DurableTaskRetentionPolicyDetails(int retentionPeriodInDays, DurableTaskPurgeableOrchestrationState? orchestrationState, IDictionary additionalBinaryDataProperties) + { + RetentionPeriodInDays = retentionPeriodInDays; + OrchestrationState = orchestrationState; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The retention period in days after which the orchestration will be purged automatically. + public int RetentionPeriodInDays { get; set; } + + /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. + public DurableTaskPurgeableOrchestrationState? OrchestrationState { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..0ccd88079375 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The retention policy settings for the resource. + public partial class DurableTaskRetentionPolicyProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(RetentionPolicies)) + { + writer.WritePropertyName("retentionPolicies"u8); + writer.WriteStartArray(); + foreach (DurableTaskRetentionPolicyDetails item in RetentionPolicies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskRetentionPolicyProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskRetentionPolicyProperties DeserializeDurableTaskRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + IList retentionPolicies = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DurableTaskProvisioningState(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("retentionPolicies"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(DurableTaskRetentionPolicyDetails.DeserializeDurableTaskRetentionPolicyDetails(item, options)); + } + retentionPolicies = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskRetentionPolicyProperties(provisioningState, retentionPolicies ?? new ChangeTrackingList(), additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskRetentionPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskRetentionPolicyProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskRetentionPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskRetentionPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs new file mode 100644 index 000000000000..853d55bfb459 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskRetentionPolicyProperties.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The retention policy settings for the resource. + public partial class DurableTaskRetentionPolicyProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskRetentionPolicyProperties() + { + RetentionPolicies = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// The orchestration retention policies. + /// Keeps track of any properties unknown to the library. + internal DurableTaskRetentionPolicyProperties(DurableTaskProvisioningState? provisioningState, IList retentionPolicies, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + RetentionPolicies = retentionPolicies; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + + /// The orchestration retention policies. + public IList RetentionPolicies { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs new file mode 100644 index 000000000000..bda505966d6d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The update request model for the Scheduler resource. + public partial class DurableTaskSchedulerPatch : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerPatch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerPatch DeserializeDurableTaskSchedulerPatch(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskSchedulerPatchProperties properties = default; + IDictionary tags = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DurableTaskSchedulerPatchProperties.DeserializeDurableTaskSchedulerPatchProperties(prop.Value, options); + continue; + } + if (prop.NameEquals("tags"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerPatch(properties, tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerPatch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatch)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(DurableTaskSchedulerPatch durableTaskSchedulerPatch) + { + if (durableTaskSchedulerPatch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(durableTaskSchedulerPatch, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs new file mode 100644 index 000000000000..cfb7593066e6 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatch.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The update request model for the Scheduler resource. + public partial class DurableTaskSchedulerPatch + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskSchedulerPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal DurableTaskSchedulerPatch(DurableTaskSchedulerPatchProperties properties, IDictionary tags, IDictionary additionalBinaryDataProperties) + { + Properties = properties; + Tags = tags; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The resource-specific properties for this resource. + public DurableTaskSchedulerPatchProperties Properties { get; set; } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs new file mode 100644 index 000000000000..5db368e67032 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The Scheduler resource properties to be updated. + public partial class DurableTaskSchedulerPatchProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + if (Optional.IsCollectionDefined(IPAllowlist)) + { + writer.WritePropertyName("ipAllowlist"u8); + writer.WriteStartArray(); + foreach (string item in IPAllowlist) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerPatchProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerPatchProperties DeserializeDurableTaskSchedulerPatchProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + DurableTaskSchedulerSkuUpdate sku = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DurableTaskProvisioningState(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("endpoint"u8)) + { + endpoint = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("ipAllowlist"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + ipAllowlist = array; + continue; + } + if (prop.NameEquals("sku"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DurableTaskSchedulerSkuUpdate.DeserializeDurableTaskSchedulerSkuUpdate(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerPatchProperties(provisioningState, endpoint, ipAllowlist ?? new ChangeTrackingList(), sku, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerPatchProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs new file mode 100644 index 000000000000..d31c8538117c --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerPatchProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The Scheduler resource properties to be updated. + public partial class DurableTaskSchedulerPatchProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskSchedulerPatchProperties() + { + IPAllowlist = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// Keeps track of any properties unknown to the library. + internal DurableTaskSchedulerPatchProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSkuUpdate sku, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + + /// URL of the durable task scheduler. + public string Endpoint { get; } + + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + public IList IPAllowlist { get; } + + /// SKU of the durable task scheduler. + public DurableTaskSchedulerSkuUpdate Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs new file mode 100644 index 000000000000..17ceb2f2e716 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Details of the Scheduler. + public partial class DurableTaskSchedulerProperties : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerProperties() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + writer.WritePropertyName("ipAllowlist"u8); + writer.WriteStartArray(); + foreach (string item in IPAllowlist) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerProperties DeserializeDurableTaskSchedulerProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskProvisioningState? provisioningState = default; + string endpoint = default; + IList ipAllowlist = default; + DurableTaskSchedulerSku sku = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DurableTaskProvisioningState(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("endpoint"u8)) + { + endpoint = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("ipAllowlist"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + ipAllowlist = array; + continue; + } + if (prop.NameEquals("sku"u8)) + { + sku = DurableTaskSchedulerSku.DeserializeDurableTaskSchedulerSku(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerProperties(provisioningState, endpoint, ipAllowlist, sku, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs new file mode 100644 index 000000000000..6f74b0ef1fd5 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerProperties.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// Details of the Scheduler. + public partial class DurableTaskSchedulerProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// or is null. + public DurableTaskSchedulerProperties(IEnumerable ipAllowlist, DurableTaskSchedulerSku sku) + { + Argument.AssertNotNull(ipAllowlist, nameof(ipAllowlist)); + Argument.AssertNotNull(sku, nameof(sku)); + + IPAllowlist = ipAllowlist.ToList(); + Sku = sku; + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// URL of the durable task scheduler. + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + /// SKU of the durable task scheduler. + /// Keeps track of any properties unknown to the library. + internal DurableTaskSchedulerProperties(DurableTaskProvisioningState? provisioningState, string endpoint, IList ipAllowlist, DurableTaskSchedulerSku sku, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + Endpoint = endpoint; + IPAllowlist = ipAllowlist; + Sku = sku; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The status of the last operation. + public DurableTaskProvisioningState? ProvisioningState { get; } + + /// URL of the durable task scheduler. + public string Endpoint { get; } + + /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. + public IList IPAllowlist { get; } + + /// SKU of the durable task scheduler. + public DurableTaskSchedulerSku Sku { get; set; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs new file mode 100644 index 000000000000..f149628d2314 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. + public partial class DurableTaskSchedulerSku : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DurableTaskSchedulerSku() + { + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && Optional.IsDefined(RedundancyState)) + { + writer.WritePropertyName("redundancyState"u8); + writer.WriteStringValue(RedundancyState.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerSku JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerSku(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerSku DeserializeDurableTaskSchedulerSku(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskSchedulerSkuName name = default; + int? capacity = default; + DurableTaskResourceRedundancyState? redundancyState = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = new DurableTaskSchedulerSkuName(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("capacity"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("redundancyState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redundancyState = new DurableTaskResourceRedundancyState(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerSku(name, capacity, redundancyState, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerSku PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSku)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs new file mode 100644 index 000000000000..0a5f5ec45dd4 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSku.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. + public partial class DurableTaskSchedulerSku + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The name of the SKU. + public DurableTaskSchedulerSku(DurableTaskSchedulerSkuName name) + { + Name = name; + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// Keeps track of any properties unknown to the library. + internal DurableTaskSchedulerSku(DurableTaskSchedulerSkuName name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary additionalBinaryDataProperties) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The name of the SKU. + public DurableTaskSchedulerSkuName Name { get; set; } + + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + public int? Capacity { get; set; } + + /// Indicates whether the current SKU configuration is zone redundant. + public DurableTaskResourceRedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuName.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuName.cs new file mode 100644 index 000000000000..687ea3bae9d7 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuName.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The name of the Stock Keeping Unit (SKU) of a Durable Task Scheduler. + public readonly partial struct DurableTaskSchedulerSkuName : IEquatable + { + private readonly string _value; + /// Dedicated SKU. + private const string DedicatedValue = "Dedicated"; + /// Consumption SKU. + private const string ConsumptionValue = "Consumption"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DurableTaskSchedulerSkuName(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Dedicated SKU. + public static DurableTaskSchedulerSkuName Dedicated { get; } = new DurableTaskSchedulerSkuName(DedicatedValue); + + /// Consumption SKU. + public static DurableTaskSchedulerSkuName Consumption { get; } = new DurableTaskSchedulerSkuName(ConsumptionValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DurableTaskSchedulerSkuName left, DurableTaskSchedulerSkuName right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DurableTaskSchedulerSkuName left, DurableTaskSchedulerSkuName right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskSchedulerSkuName(string value) => new DurableTaskSchedulerSkuName(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DurableTaskSchedulerSkuName?(string value) => value == null ? null : new DurableTaskSchedulerSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DurableTaskSchedulerSkuName other && Equals(other); + + /// + public bool Equals(DurableTaskSchedulerSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs new file mode 100644 index 000000000000..54e8e8b74a40 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.DurableTask; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) properties to be updated. + public partial class DurableTaskSchedulerSkuUpdate : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && Optional.IsDefined(RedundancyState)) + { + writer.WritePropertyName("redundancyState"u8); + writer.WriteStringValue(RedundancyState.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DurableTaskSchedulerSkuUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerSkuUpdate JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DurableTaskSchedulerSkuUpdate DeserializeDurableTaskSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DurableTaskSchedulerSkuName? name = default; + int? capacity = default; + DurableTaskResourceRedundancyState? redundancyState = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new DurableTaskSchedulerSkuName(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("capacity"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("redundancyState"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redundancyState = new DurableTaskResourceRedundancyState(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DurableTaskSchedulerSkuUpdate(name, capacity, redundancyState, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + DurableTaskSchedulerSkuUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DurableTaskSchedulerSkuUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data)) + { + return DeserializeDurableTaskSchedulerSkuUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DurableTaskSchedulerSkuUpdate)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs new file mode 100644 index 000000000000..989c913db750 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/DurableTaskSchedulerSkuUpdate.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DurableTask.Models +{ + /// The SKU (Stock Keeping Unit) properties to be updated. + public partial class DurableTaskSchedulerSkuUpdate + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DurableTaskSchedulerSkuUpdate() + { + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + /// Indicates whether the current SKU configuration is zone redundant. + /// Keeps track of any properties unknown to the library. + internal DurableTaskSchedulerSkuUpdate(DurableTaskSchedulerSkuName? name, int? capacity, DurableTaskResourceRedundancyState? redundancyState, IDictionary additionalBinaryDataProperties) + { + Name = name; + Capacity = capacity; + RedundancyState = redundancyState; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The name of the SKU. + public DurableTaskSchedulerSkuName? Name { get; set; } + + /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. + public int? Capacity { get; set; } + + /// Indicates whether the current SKU configuration is zone redundant. + public DurableTaskResourceRedundancyState? RedundancyState { get; } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index 2705a701b11f..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ProvisioningState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The status of the current operation. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string ProvisioningValue = "Provisioning"; - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string AcceptedValue = "Accepted"; - - /// Resource has been created. - public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); - /// Resource creation failed. - public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); - /// Resource creation was canceled. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); - /// The resource is being provisioned. - public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); - /// The resource is updating. - public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// The resource is being deleted. - public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); - /// The resource create request has been accepted. - public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.cs deleted file mode 100644 index 3ded0332b019..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/PurgeableOrchestrationState.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// Purgeable orchestration state to be used in retention policies. - public readonly partial struct PurgeableOrchestrationState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PurgeableOrchestrationState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CompletedValue = "Completed"; - private const string FailedValue = "Failed"; - private const string TerminatedValue = "Terminated"; - private const string CanceledValue = "Canceled"; - - /// The orchestration is completed. - public static PurgeableOrchestrationState Completed { get; } = new PurgeableOrchestrationState(CompletedValue); - /// The orchestration is failed. - public static PurgeableOrchestrationState Failed { get; } = new PurgeableOrchestrationState(FailedValue); - /// The orchestration is terminated. - public static PurgeableOrchestrationState Terminated { get; } = new PurgeableOrchestrationState(TerminatedValue); - /// The orchestration is canceled. - public static PurgeableOrchestrationState Canceled { get; } = new PurgeableOrchestrationState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(PurgeableOrchestrationState left, PurgeableOrchestrationState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PurgeableOrchestrationState left, PurgeableOrchestrationState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PurgeableOrchestrationState(string value) => new PurgeableOrchestrationState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PurgeableOrchestrationState other && Equals(other); - /// - public bool Equals(PurgeableOrchestrationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ResourceRedundancyState.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ResourceRedundancyState.cs deleted file mode 100644 index a228f45af8e2..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/ResourceRedundancyState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The state of the resource redundancy. - public readonly partial struct ResourceRedundancyState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ResourceRedundancyState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string ZoneValue = "Zone"; - - /// The resource is not redundant. - public static ResourceRedundancyState None { get; } = new ResourceRedundancyState(NoneValue); - /// The resource is zone redundant. - public static ResourceRedundancyState Zone { get; } = new ResourceRedundancyState(ZoneValue); - /// Determines if two values are the same. - public static bool operator ==(ResourceRedundancyState left, ResourceRedundancyState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ResourceRedundancyState left, ResourceRedundancyState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ResourceRedundancyState(string value) => new ResourceRedundancyState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ResourceRedundancyState other && Equals(other); - /// - public bool Equals(ResourceRedundancyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs deleted file mode 100644 index 0e8e3e1e7268..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class RetentionPolicyDetails : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("retentionPeriodInDays"u8); - writer.WriteNumberValue(RetentionPeriodInDays); - if (Optional.IsDefined(OrchestrationState)) - { - writer.WritePropertyName("orchestrationState"u8); - writer.WriteStringValue(OrchestrationState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - RetentionPolicyDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRetentionPolicyDetails(document.RootElement, options); - } - - internal static RetentionPolicyDetails DeserializeRetentionPolicyDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int retentionPeriodInDays = default; - PurgeableOrchestrationState? orchestrationState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("retentionPeriodInDays"u8)) - { - retentionPeriodInDays = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("orchestrationState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - orchestrationState = new PurgeableOrchestrationState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RetentionPolicyDetails(retentionPeriodInDays, orchestrationState, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support writing '{options.Format}' format."); - } - } - - RetentionPolicyDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRetentionPolicyDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RetentionPolicyDetails)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs deleted file mode 100644 index dde8a132bc30..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyDetails.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The properties of a retention policy. - public partial class RetentionPolicyDetails - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The retention period in days after which the orchestration will be purged automatically. - public RetentionPolicyDetails(int retentionPeriodInDays) - { - RetentionPeriodInDays = retentionPeriodInDays; - } - - /// Initializes a new instance of . - /// The retention period in days after which the orchestration will be purged automatically. - /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. - /// Keeps track of any properties unknown to the library. - internal RetentionPolicyDetails(int retentionPeriodInDays, PurgeableOrchestrationState? orchestrationState, IDictionary serializedAdditionalRawData) - { - RetentionPeriodInDays = retentionPeriodInDays; - OrchestrationState = orchestrationState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RetentionPolicyDetails() - { - } - - /// The retention period in days after which the orchestration will be purged automatically. - public int RetentionPeriodInDays { get; set; } - /// The orchestration state to which this policy applies. If omitted, the policy applies to all purgeable orchestration states. - public PurgeableOrchestrationState? OrchestrationState { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs deleted file mode 100644 index 15ce767ee69a..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - internal partial class RetentionPolicyListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - RetentionPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRetentionPolicyListResult(document.RootElement, options); - } - - internal static RetentionPolicyListResult DeserializeRetentionPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RetentionPolicyData.DeserializeRetentionPolicyData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RetentionPolicyListResult(value, nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support writing '{options.Format}' format."); - } - } - - RetentionPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRetentionPolicyListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RetentionPolicyListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs deleted file mode 100644 index f5c9bc5b5ac5..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyListResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The response of a RetentionPolicy list operation. - internal partial class RetentionPolicyListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The RetentionPolicy items on this page. - /// is null. - internal RetentionPolicyListResult(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// The RetentionPolicy items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal RetentionPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RetentionPolicyListResult() - { - } - - /// The RetentionPolicy items on this page. - public IReadOnlyList Value { get; } - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs deleted file mode 100644 index b8a6ff25947c..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.Serialization.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class RetentionPolicyProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsCollectionDefined(RetentionPolicies)) - { - writer.WritePropertyName("retentionPolicies"u8); - writer.WriteStartArray(); - foreach (var item in RetentionPolicies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - RetentionPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRetentionPolicyProperties(document.RootElement, options); - } - - internal static RetentionPolicyProperties DeserializeRetentionPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ProvisioningState? provisioningState = default; - IList retentionPolicies = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("retentionPolicies"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RetentionPolicyDetails.DeserializeRetentionPolicyDetails(item, options)); - } - retentionPolicies = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RetentionPolicyProperties(provisioningState, retentionPolicies ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support writing '{options.Format}' format."); - } - } - - RetentionPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRetentionPolicyProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RetentionPolicyProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs index 02e1b98e00d5..1887b4874b77 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.Serialization.cs @@ -9,14 +9,21 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.DurableTask; namespace Azure.ResourceManager.DurableTask.Models { - internal partial class SchedulerListResult : IUtf8JsonSerializable, IJsonModel + /// The response of a Scheduler list operation. + internal partial class SchedulerListResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal SchedulerListResult() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,15 +35,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SchedulerListResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Value) + foreach (DurableTaskSchedulerData item in Value) { writer.WriteObjectValue(item, options); } @@ -46,15 +52,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -63,64 +69,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SchedulerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SchedulerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SchedulerListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SchedulerListResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSchedulerListResult(document.RootElement, options); } - internal static SchedulerListResult DeserializeSchedulerListResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SchedulerListResult DeserializeSchedulerListResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IList value = default; Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(SchedulerData.DeserializeSchedulerData(item, options)); + array.Add(DurableTaskSchedulerData.DeserializeDurableTaskSchedulerData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) + if (prop.NameEquals("nextLink"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - nextLink = new Uri(property.Value.GetString()); + nextLink = new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerListResult(value, nextLink, serializedAdditionalRawData); + return new SchedulerListResult(value, nextLink, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - SchedulerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SchedulerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SchedulerListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSchedulerListResult(document.RootElement, options); } default: @@ -146,6 +163,15 @@ SchedulerListResult IPersistableModel.Create(BinaryData dat } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static SchedulerListResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeSchedulerListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs index 85a9ef186815..d7d0ab4ad62a 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerListResult.cs @@ -8,72 +8,37 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.ResourceManager.DurableTask; namespace Azure.ResourceManager.DurableTask.Models { /// The response of a Scheduler list operation. internal partial class SchedulerListResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// The Scheduler items on this page. - /// is null. - internal SchedulerListResult(IEnumerable value) + internal SchedulerListResult(IEnumerable value) { - Argument.AssertNotNull(value, nameof(value)); - Value = value.ToList(); } /// Initializes a new instance of . /// The Scheduler items on this page. /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal SchedulerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SchedulerListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) { Value = value; NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SchedulerListResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The Scheduler items on this page. - public IReadOnlyList Value { get; } + public IList Value { get; } + /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs deleted file mode 100644 index 74fee46924ee..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerPatch : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerPatch)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerPatch(document.RootElement, options); - } - - internal static SchedulerPatch DeserializeSchedulerPatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchedulerPatchProperties properties = default; - IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = SchedulerPatchProperties.DeserializeSchedulerPatchProperties(property.Value, options); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerPatch(properties, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerPatch)} does not support writing '{options.Format}' format."); - } - } - - SchedulerPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerPatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerPatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs deleted file mode 100644 index 2cff6c2172b3..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatch.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The update request model for the Scheduler resource. - public partial class SchedulerPatch - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SchedulerPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The resource-specific properties for this resource. - /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal SchedulerPatch(SchedulerPatchProperties properties, IDictionary tags, IDictionary serializedAdditionalRawData) - { - Properties = properties; - Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public SchedulerPatchProperties Properties { get; set; } - /// Resource tags. - public IDictionary Tags { get; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs deleted file mode 100644 index d587ea0cfb18..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.Serialization.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerPatchProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint); - } - if (Optional.IsCollectionDefined(IPAllowlist)) - { - writer.WritePropertyName("ipAllowlist"u8); - writer.WriteStartArray(); - foreach (var item in IPAllowlist) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerPatchProperties(document.RootElement, options); - } - - internal static SchedulerPatchProperties DeserializeSchedulerPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ProvisioningState? provisioningState = default; - string endpoint = default; - IList ipAllowlist = default; - SchedulerSkuUpdate sku = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpoint"u8)) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("ipAllowlist"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipAllowlist = array; - continue; - } - if (property.NameEquals("sku"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sku = SchedulerSkuUpdate.DeserializeSchedulerSkuUpdate(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerPatchProperties(provisioningState, endpoint, ipAllowlist ?? new ChangeTrackingList(), sku, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support writing '{options.Format}' format."); - } - } - - SchedulerPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerPatchProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerPatchProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs deleted file mode 100644 index e82ead0fcfed..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerPatchProperties.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The Scheduler resource properties to be updated. - public partial class SchedulerPatchProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SchedulerPatchProperties() - { - IPAllowlist = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The status of the last operation. - /// URL of the durable task scheduler. - /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. - /// SKU of the durable task scheduler. - /// Keeps track of any properties unknown to the library. - internal SchedulerPatchProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSkuUpdate sku, IDictionary serializedAdditionalRawData) - { - ProvisioningState = provisioningState; - Endpoint = endpoint; - IPAllowlist = ipAllowlist; - Sku = sku; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The status of the last operation. - public ProvisioningState? ProvisioningState { get; } - /// URL of the durable task scheduler. - public string Endpoint { get; } - /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. - public IList IPAllowlist { get; } - /// SKU of the durable task scheduler. - public SchedulerSkuUpdate Sku { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs deleted file mode 100644 index 582e1ab18dba..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint); - } - writer.WritePropertyName("ipAllowlist"u8); - writer.WriteStartArray(); - foreach (var item in IPAllowlist) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerProperties(document.RootElement, options); - } - - internal static SchedulerProperties DeserializeSchedulerProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ProvisioningState? provisioningState = default; - string endpoint = default; - IList ipAllowlist = default; - SchedulerSku sku = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpoint"u8)) - { - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("ipAllowlist"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipAllowlist = array; - continue; - } - if (property.NameEquals("sku"u8)) - { - sku = SchedulerSku.DeserializeSchedulerSku(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerProperties(provisioningState, endpoint, ipAllowlist, sku, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerProperties)} does not support writing '{options.Format}' format."); - } - } - - SchedulerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs deleted file mode 100644 index 622f09dfc0bb..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerProperties.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// Details of the Scheduler. - public partial class SchedulerProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. - /// SKU of the durable task scheduler. - /// or is null. - public SchedulerProperties(IEnumerable ipAllowlist, SchedulerSku sku) - { - Argument.AssertNotNull(ipAllowlist, nameof(ipAllowlist)); - Argument.AssertNotNull(sku, nameof(sku)); - - IPAllowlist = ipAllowlist.ToList(); - Sku = sku; - } - - /// Initializes a new instance of . - /// The status of the last operation. - /// URL of the durable task scheduler. - /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. - /// SKU of the durable task scheduler. - /// Keeps track of any properties unknown to the library. - internal SchedulerProperties(ProvisioningState? provisioningState, string endpoint, IList ipAllowlist, SchedulerSku sku, IDictionary serializedAdditionalRawData) - { - ProvisioningState = provisioningState; - Endpoint = endpoint; - IPAllowlist = ipAllowlist; - Sku = sku; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SchedulerProperties() - { - } - - /// The status of the last operation. - public ProvisioningState? ProvisioningState { get; } - /// URL of the durable task scheduler. - public string Endpoint { get; } - /// IP allow list for durable task scheduler. Values can be IPv4, IPv6 or CIDR. - public IList IPAllowlist { get; } - /// SKU of the durable task scheduler. - public SchedulerSku Sku { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs deleted file mode 100644 index f4eafffb0da5..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerSku : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name.ToString()); - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"u8); - writer.WriteNumberValue(Capacity.Value); - } - if (options.Format != "W" && Optional.IsDefined(RedundancyState)) - { - writer.WritePropertyName("redundancyState"u8); - writer.WriteStringValue(RedundancyState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerSku(document.RootElement, options); - } - - internal static SchedulerSku DeserializeSchedulerSku(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchedulerSkuName name = default; - int? capacity = default; - ResourceRedundancyState? redundancyState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = new SchedulerSkuName(property.Value.GetString()); - continue; - } - if (property.NameEquals("capacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capacity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("redundancyState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - redundancyState = new ResourceRedundancyState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerSku(name, capacity, redundancyState, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerSku)} does not support writing '{options.Format}' format."); - } - } - - SchedulerSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerSku(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerSku)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs deleted file mode 100644 index 033bfad2a051..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSku.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The SKU (Stock Keeping Unit) assigned to this durable task scheduler. - public partial class SchedulerSku - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the SKU. - public SchedulerSku(SchedulerSkuName name) - { - Name = name; - } - - /// Initializes a new instance of . - /// The name of the SKU. - /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. - /// Indicates whether the current SKU configuration is zone redundant. - /// Keeps track of any properties unknown to the library. - internal SchedulerSku(SchedulerSkuName name, int? capacity, ResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) - { - Name = name; - Capacity = capacity; - RedundancyState = redundancyState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SchedulerSku() - { - } - - /// The name of the SKU. - public SchedulerSkuName Name { get; set; } - /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. - public int? Capacity { get; set; } - /// Indicates whether the current SKU configuration is zone redundant. - public ResourceRedundancyState? RedundancyState { get; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuName.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuName.cs deleted file mode 100644 index 5d8d3b66dabf..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuName.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The name of the Stock Keeping Unit (SKU) of a Durable Task Scheduler. - public readonly partial struct SchedulerSkuName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SchedulerSkuName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DedicatedValue = "Dedicated"; - private const string ConsumptionValue = "Consumption"; - - /// Dedicated SKU. - public static SchedulerSkuName Dedicated { get; } = new SchedulerSkuName(DedicatedValue); - /// Consumption SKU. - public static SchedulerSkuName Consumption { get; } = new SchedulerSkuName(ConsumptionValue); - /// Determines if two values are the same. - public static bool operator ==(SchedulerSkuName left, SchedulerSkuName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SchedulerSkuName left, SchedulerSkuName right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SchedulerSkuName(string value) => new SchedulerSkuName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SchedulerSkuName other && Equals(other); - /// - public bool Equals(SchedulerSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs deleted file mode 100644 index 33a3c952ccbd..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerSkuUpdate : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name.Value.ToString()); - } - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"u8); - writer.WriteNumberValue(Capacity.Value); - } - if (options.Format != "W" && Optional.IsDefined(RedundancyState)) - { - writer.WritePropertyName("redundancyState"u8); - writer.WriteStringValue(RedundancyState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerSkuUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerSkuUpdate(document.RootElement, options); - } - - internal static SchedulerSkuUpdate DeserializeSchedulerSkuUpdate(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchedulerSkuName? name = default; - int? capacity = default; - ResourceRedundancyState? redundancyState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = new SchedulerSkuName(property.Value.GetString()); - continue; - } - if (property.NameEquals("capacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capacity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("redundancyState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - redundancyState = new ResourceRedundancyState(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerSkuUpdate(name, capacity, redundancyState, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support writing '{options.Format}' format."); - } - } - - SchedulerSkuUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerSkuUpdate(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerSkuUpdate)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs deleted file mode 100644 index 7bffff342761..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerSkuUpdate.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The SKU (Stock Keeping Unit) properties to be updated. - public partial class SchedulerSkuUpdate - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SchedulerSkuUpdate() - { - } - - /// Initializes a new instance of . - /// The name of the SKU. - /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. - /// Indicates whether the current SKU configuration is zone redundant. - /// Keeps track of any properties unknown to the library. - internal SchedulerSkuUpdate(SchedulerSkuName? name, int? capacity, ResourceRedundancyState? redundancyState, IDictionary serializedAdditionalRawData) - { - Name = name; - Capacity = capacity; - RedundancyState = redundancyState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the SKU. - public SchedulerSkuName? Name { get; set; } - /// The SKU capacity. This allows scale out/in for the resource and impacts zone redundancy. - public int? Capacity { get; set; } - /// Indicates whether the current SKU configuration is zone redundant. - public ResourceRedundancyState? RedundancyState { get; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs deleted file mode 100644 index aaaaa2214f59..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.Serialization.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DurableTask.Models -{ - public partial class SchedulerTaskHubProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DashboardUri)) - { - writer.WritePropertyName("dashboardUrl"u8); - writer.WriteStringValue(DashboardUri.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SchedulerTaskHubProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerTaskHubProperties(document.RootElement, options); - } - - internal static SchedulerTaskHubProperties DeserializeSchedulerTaskHubProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ProvisioningState? provisioningState = default; - Uri dashboardUrl = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("dashboardUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dashboardUrl = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerTaskHubProperties(provisioningState, dashboardUrl, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support writing '{options.Format}' format."); - } - } - - SchedulerTaskHubProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerTaskHubProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerTaskHubProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs deleted file mode 100644 index c1b638e25a16..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/SchedulerTaskHubProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DurableTask.Models -{ - /// The properties of Task Hub. - public partial class SchedulerTaskHubProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SchedulerTaskHubProperties() - { - } - - /// Initializes a new instance of . - /// The status of the last operation. - /// URL of the durable task scheduler dashboard. - /// Keeps track of any properties unknown to the library. - internal SchedulerTaskHubProperties(ProvisioningState? provisioningState, Uri dashboardUri, IDictionary serializedAdditionalRawData) - { - ProvisioningState = provisioningState; - DashboardUri = dashboardUri; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The status of the last operation. - public ProvisioningState? ProvisioningState { get; } - /// URL of the durable task scheduler dashboard. - public Uri DashboardUri { get; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs index d6df645cf30f..aacb41d78512 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.Serialization.cs @@ -9,14 +9,21 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.DurableTask; namespace Azure.ResourceManager.DurableTask.Models { - internal partial class TaskHubListResult : IUtf8JsonSerializable, IJsonModel + /// The response of a TaskHub list operation. + internal partial class TaskHubListResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal TaskHubListResult() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,15 +35,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TaskHubListResult)} does not support writing '{format}' format."); } - writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Value) + foreach (DurableTaskHubData item in Value) { writer.WriteObjectValue(item, options); } @@ -46,15 +52,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink.AbsoluteUri); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -63,64 +69,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - TaskHubListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + TaskHubListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual TaskHubListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(TaskHubListResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeTaskHubListResult(document.RootElement, options); } - internal static TaskHubListResult DeserializeTaskHubListResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TaskHubListResult DeserializeTaskHubListResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IReadOnlyList value = default; + IList value = default; Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) { - array.Add(SchedulerTaskHubData.DeserializeSchedulerTaskHubData(item, options)); + array.Add(DurableTaskHubData.DeserializeDurableTaskHubData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) + if (prop.NameEquals("nextLink"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - nextLink = new Uri(property.Value.GetString()); + nextLink = new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new TaskHubListResult(value, nextLink, serializedAdditionalRawData); + return new TaskHubListResult(value, nextLink, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - TaskHubListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + TaskHubListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual TaskHubListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeTaskHubListResult(document.RootElement, options); } default: @@ -146,6 +163,15 @@ TaskHubListResult IPersistableModel.Create(BinaryData data, M } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static TaskHubListResult FromResponse(Response result) + { + using Response response = result; + using JsonDocument document = JsonDocument.Parse(response.Content); + return DeserializeTaskHubListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs index 55f6a022eaca..18e56aab956a 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/TaskHubListResult.cs @@ -8,72 +8,37 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.ResourceManager.DurableTask; namespace Azure.ResourceManager.DurableTask.Models { /// The response of a TaskHub list operation. internal partial class TaskHubListResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// The TaskHub items on this page. - /// is null. - internal TaskHubListResult(IEnumerable value) + internal TaskHubListResult(IEnumerable value) { - Argument.AssertNotNull(value, nameof(value)); - Value = value.ToList(); } /// Initializes a new instance of . /// The TaskHub items on this page. /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal TaskHubListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal TaskHubListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) { Value = value; NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal TaskHubListResult() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The TaskHub items on this page. - public IReadOnlyList Value { get; } + public IList Value { get; } + /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs index 6cb750df8d05..5de4be32a202 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/ProviderConstants.cs @@ -9,8 +9,9 @@ namespace Azure.ResourceManager.DurableTask { - internal static class ProviderConstants + internal static partial class ProviderConstants { + /// Gets the DefaultProviderNamespace. public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs index f063d6f222c6..fe55319557c5 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/RetentionPoliciesRestOperations.cs @@ -6,583 +6,154 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DurableTask.Models; namespace Azure.ResourceManager.DurableTask { - internal partial class RetentionPoliciesRestOperations + internal partial class RetentionPolicies { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of RetentionPoliciesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// Service host. - /// The API version to use for this operation. - /// or is null. - public RetentionPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-11-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + /// Initializes a new instance of RetentionPolicies for mocking. + protected RetentionPolicies() { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/retentionPolicies/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/retentionPolicies/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + /// Initializes a new instance of RetentionPolicies. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal RetentionPolicies(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RetentionPolicyData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Get a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = RetentionPolicyData.DeserializeRetentionPolicyData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RetentionPolicyData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateCreateOrReplaceRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) + internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/retentionPolicies/default", false); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrReplaceRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) + internal HttpMessage CreateCreateOrReplaceRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/retentionPolicies/default", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Create or Update a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrReplaceAsync(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrReplaceRequest(subscriptionId, resourceGroupName, schedulerName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or Update a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrReplace(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrReplaceRequest(subscriptionId, resourceGroupName, schedulerName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/retentionPolicies/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data) + internal HttpMessage CreateUpdateRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/retentionPolicies/default", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Update a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateDeleteRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string schedulerName, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/retentionPolicies/default", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/retentionPolicies/default", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Delete a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a Retention Policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySchedulerRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/retentionPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySchedulerRequest(string subscriptionId, string resourceGroupName, string schedulerName) + internal HttpMessage CreateGetBySchedulerRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/retentionPolicies", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List Retention Policies. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySchedulerAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Retention Policies. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByScheduler(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySchedulerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) + internal HttpMessage CreateNextGetBySchedulerRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySchedulerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// List Retention Policies. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySchedulerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Retention Policies. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListBySchedulerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RetentionPolicyListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = RetentionPolicyListResult.DeserializeRetentionPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs index 5575f7d1a879..80fdeac8ef12 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/SchedulersRestOperations.cs @@ -6,717 +6,176 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DurableTask.Models; namespace Azure.ResourceManager.DurableTask { - internal partial class SchedulersRestOperations + internal partial class Schedulers { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of SchedulersRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// Service host. - /// The API version to use for this operation. - /// or is null. - public SchedulersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// Initializes a new instance of Schedulers for mocking. + protected Schedulers() { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-11-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; } - /// Get a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + /// Initializes a new instance of Schedulers. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal Schedulers(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerData.DeserializeSchedulerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SchedulerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Get a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerData.DeserializeSchedulerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SchedulerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) + internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data) + internal HttpMessage CreateCreateOrUpdateRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Create or update a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateUpdateRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContent content, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Update a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The resource properties to be updated. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string schedulerName, SchedulerPatch patch, CancellationToken cancellationToken = default) + internal HttpMessage CreateDeleteRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, schedulerName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Delete a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + internal HttpMessage CreateGetByResourceGroupRequest(Guid subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a Scheduler. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List Schedulers by resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Schedulers by resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + internal HttpMessage CreateGetBySubscriptionRequest(Guid subscriptionId, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List Schedulers by subscription. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Schedulers by subscription. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List Schedulers by resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetBySubscriptionRequest(Uri nextPage, Guid subscriptionId, RequestContext context) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Schedulers by resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// List Schedulers by subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Schedulers by subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerListResult.DeserializeSchedulerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs index a962e56343ad..b94276ae3c66 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RestOperations/TaskHubsRestOperations.cs @@ -6,146 +6,47 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.DurableTask.Models; namespace Azure.ResourceManager.DurableTask { - internal partial class TaskHubsRestOperations + internal partial class TaskHubs { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of TaskHubsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// Service host. - /// The API version to use for this operation. - /// or is null. - public TaskHubsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-11-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/taskHubs/", false); - uri.AppendPath(taskHubName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) + /// Initializes a new instance of TaskHubs for mocking. + protected TaskHubs() { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/taskHubs/", false); - uri.AppendPath(taskHubName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; } - /// Get a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) + /// Initializes a new instance of TaskHubs. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal TaskHubs(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchedulerTaskHubData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SchedulerTaskHubData.DeserializeSchedulerTaskHubData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SchedulerTaskHubData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Get a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchedulerTaskHubData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SchedulerTaskHubData.DeserializeSchedulerTaskHubData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SchedulerTaskHubData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data) + internal HttpMessage CreateGetRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); @@ -153,18 +54,20 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath("/taskHubs/", false); uri.AppendPath(taskHubName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data) + internal HttpMessage CreateCreateOrUpdateRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); @@ -172,99 +75,22 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/taskHubs/", false); uri.AppendPath(taskHubName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Create or Update a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// Resource create parameters. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or Update a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// Resource create parameters. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateDeleteRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/taskHubs/", false); - uri.AppendPath(taskHubName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); @@ -272,241 +98,43 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/taskHubs/", false); uri.AppendPath(taskHubName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Delete a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a Task Hub. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The name of the TaskHub. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, schedulerName, taskHubName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySchedulerRequestUri(string subscriptionId, string resourceGroupName, string schedulerName) + internal HttpMessage CreateGetBySchedulerRequest(Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); - uri.AppendPath(schedulerName, true); - uri.AppendPath("/taskHubs", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySchedulerRequest(string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); + uri.AppendPath(subscriptionId.ToString(), true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DurableTask/schedulers/", false); uri.AppendPath(schedulerName, true); uri.AppendPath("/taskHubs", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// List Task Hubs. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySchedulerAsync(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetBySchedulerRequest(Uri nextPage, Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - TaskHubListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Task Hubs. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByScheduler(string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerRequest(subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - TaskHubListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySchedulerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySchedulerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// List Task Hubs. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySchedulerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - TaskHubListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Task Hubs. - /// The URL to the next page of results. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Scheduler. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListBySchedulerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var message = CreateListBySchedulerNextPageRequest(nextLink, subscriptionId, resourceGroupName, schedulerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - TaskHubListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = TaskHubListResult.DeserializeTaskHubListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs deleted file mode 100644 index 1f03e2f61306..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class RetentionPolicyData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - RetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRetentionPolicyData(document.RootElement, options); - } - - internal static RetentionPolicyData DeserializeRetentionPolicyData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RetentionPolicyProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = RetentionPolicyProperties.DeserializeRetentionPolicyProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RetentionPolicyData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support writing '{options.Format}' format."); - } - } - - RetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRetentionPolicyData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RetentionPolicyData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs deleted file mode 100644 index 36aab8b38c9d..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyData.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A class representing the RetentionPolicy data model. - /// A retention policy resource belonging to the scheduler - /// - public partial class RetentionPolicyData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RetentionPolicyData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal RetentionPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RetentionPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public RetentionPolicyProperties Properties { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs deleted file mode 100644 index 98a8981eb787..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class RetentionPolicyResource : IJsonModel - { - private static RetentionPolicyData s_dataDeserializationInstance; - private static RetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - RetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - RetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs deleted file mode 100644 index f852fb6c1ae8..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/RetentionPolicyResource.cs +++ /dev/null @@ -1,438 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A Class representing a RetentionPolicy along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetRetentionPolicyResource method. - /// Otherwise you can get one from its parent resource using the GetRetentionPolicy method. - /// - public partial class RetentionPolicyResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The schedulerName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _retentionPolicyClientDiagnostics; - private readonly RetentionPoliciesRestOperations _retentionPolicyRestClient; - private readonly RetentionPolicyData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/retentionPolicies"; - - /// Initializes a new instance of the class for mocking. - protected RetentionPolicyResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal RetentionPolicyResource(ArmClient client, RetentionPolicyData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal RetentionPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _retentionPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string retentionPolicyApiVersion); - _retentionPolicyRestClient = new RetentionPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, retentionPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RetentionPolicyData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); - scope.Start(); - try - { - var response = await _retentionPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Get"); - scope.Start(); - try - { - var response = _retentionPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RetentionPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); - scope.Start(); - try - { - var response = await _retentionPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Delete"); - scope.Start(); - try - { - var response = _retentionPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Update - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); - scope.Start(); - try - { - var response = await _retentionPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_Update - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.Update"); - scope.Start(); - try - { - var response = _retentionPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or Update a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_CreateOrReplace - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resource create parameters. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _retentionPolicyRestClient.CreateOrReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or Update a Retention Policy - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/retentionPolicies/default - /// - /// - /// Operation Id - /// RetentionPolicy_CreateOrReplace - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resource create parameters. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, RetentionPolicyData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _retentionPolicyClientDiagnostics.CreateScope("RetentionPolicyResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = _retentionPolicyRestClient.CreateOrReplace(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new RetentionPolicyOperationSource(Client), _retentionPolicyClientDiagnostics, Pipeline, _retentionPolicyRestClient.CreateCreateOrReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs deleted file mode 100644 index a5f98a4d96fa..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerCollection.cs +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetSchedulers method from an instance of . - /// - public partial class SchedulerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _schedulerClientDiagnostics; - private readonly SchedulersRestOperations _schedulerRestClient; - - /// Initializes a new instance of the class for mocking. - protected SchedulerCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal SchedulerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SchedulerResource.ResourceType, out string schedulerApiVersion); - _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Create or update a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _schedulerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Scheduler. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string schedulerName, SchedulerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _schedulerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data, cancellationToken); - var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); - scope.Start(); - try - { - var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Get"); - scope.Start(); - try - { - var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Schedulers by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List Schedulers by resource group - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers - /// - /// - /// Operation Id - /// Scheduler_ListByResourceGroup - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerResource(Client, SchedulerData.DeserializeSchedulerData(e)), _schedulerClientDiagnostics, Pipeline, "SchedulerCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); - scope.Start(); - try - { - var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.Exists"); - scope.Start(); - try - { - var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Scheduler. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string schedulerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerCollection.GetIfExists"); - scope.Start(); - try - { - var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, schedulerName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs deleted file mode 100644 index 90b8b33383c0..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.Serialization.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class SchedulerData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerData(document.RootElement, options); - } - - internal static SchedulerData DeserializeSchedulerData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchedulerProperties properties = default; - IDictionary tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = SchedulerProperties.DeserializeSchedulerProperties(property.Value, options); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerData( - id, - name, - type, - systemData, - tags ?? new ChangeTrackingDictionary(), - location, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerData)} does not support writing '{options.Format}' format."); - } - } - - SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs deleted file mode 100644 index b0efc6bb0c8b..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerData.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A class representing the Scheduler data model. - /// A Durable Task Scheduler resource - /// - public partial class SchedulerData : TrackedResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The location. - public SchedulerData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal SchedulerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SchedulerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SchedulerData() - { - } - - /// The resource-specific properties for this resource. - public SchedulerProperties Properties { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs deleted file mode 100644 index 16d9ffea7d5b..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class SchedulerResource : IJsonModel - { - private static SchedulerData s_dataDeserializationInstance; - private static SchedulerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - SchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - SchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs deleted file mode 100644 index b1ab340cb3f9..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerResource.cs +++ /dev/null @@ -1,783 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A Class representing a Scheduler along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetSchedulerResource method. - /// Otherwise you can get one from its parent resource using the GetScheduler method. - /// - public partial class SchedulerResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The schedulerName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _schedulerClientDiagnostics; - private readonly SchedulersRestOperations _schedulerRestClient; - private readonly SchedulerData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers"; - - /// Initializes a new instance of the class for mocking. - protected SchedulerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal SchedulerResource(ArmClient client, SchedulerData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal SchedulerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _schedulerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string schedulerApiVersion); - _schedulerRestClient = new SchedulersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual SchedulerData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of SchedulerTaskHubResources in the Scheduler. - /// An object representing collection of SchedulerTaskHubResources and their operations over a SchedulerTaskHubResource. - public virtual SchedulerTaskHubCollection GetSchedulerTaskHubs() - { - return GetCachedClient(client => new SchedulerTaskHubCollection(client, Id)); - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetSchedulerTaskHubAsync(string taskHubName, CancellationToken cancellationToken = default) - { - return await GetSchedulerTaskHubs().GetAsync(taskHubName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetSchedulerTaskHub(string taskHubName, CancellationToken cancellationToken = default) - { - return GetSchedulerTaskHubs().Get(taskHubName, cancellationToken); - } - - /// Gets an object representing a RetentionPolicyResource along with the instance operations that can be performed on it in the Scheduler. - /// Returns a object. - public virtual RetentionPolicyResource GetRetentionPolicy() - { - return new RetentionPolicyResource(Client, Id.AppendChildResource("retentionPolicies", "default")); - } - - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); - scope.Start(); - try - { - var response = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Get"); - scope.Start(); - try - { - var response = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); - scope.Start(); - try - { - var response = await _schedulerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Delete"); - scope.Start(); - try - { - var response = _schedulerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Update - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SchedulerPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); - scope.Start(); - try - { - var response = await _schedulerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a Scheduler - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Update - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The resource properties to be updated. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SchedulerPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.Update"); - scope.Start(); - try - { - var response = _schedulerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DurableTaskArmOperation(new SchedulerOperationSource(Client), _schedulerClientDiagnostics, Pipeline, _schedulerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SchedulerPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SchedulerPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SchedulerPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SchedulerPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _schedulerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SchedulerPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName} - /// - /// - /// Operation Id - /// Scheduler_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _schedulerClientDiagnostics.CreateScope("SchedulerResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _schedulerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SchedulerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SchedulerPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs deleted file mode 100644 index 37183cef94e8..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetSchedulerTaskHubs method from an instance of . - /// - public partial class SchedulerTaskHubCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _schedulerTaskHubTaskHubsClientDiagnostics; - private readonly TaskHubsRestOperations _schedulerTaskHubTaskHubsRestClient; - - /// Initializes a new instance of the class for mocking. - protected SchedulerTaskHubCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal SchedulerTaskHubCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _schedulerTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", SchedulerTaskHubResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SchedulerTaskHubResource.ResourceType, out string schedulerTaskHubTaskHubsApiVersion); - _schedulerTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerTaskHubTaskHubsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != SchedulerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SchedulerResource.ResourceType), nameof(id)); - } - - /// - /// Create or Update a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the TaskHub. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or Update a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the TaskHub. - /// Resource create parameters. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string taskHubName, SchedulerTaskHubData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data, cancellationToken); - var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Get"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Get"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Task Hubs - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs - /// - /// - /// Operation Id - /// TaskHub_ListByScheduler - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SchedulerTaskHubResource(Client, SchedulerTaskHubData.DeserializeSchedulerTaskHubData(e)), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, "SchedulerTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List Task Hubs - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs - /// - /// - /// Operation Id - /// TaskHub_ListByScheduler - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _schedulerTaskHubTaskHubsRestClient.CreateListBySchedulerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SchedulerTaskHubResource(Client, SchedulerTaskHubData.DeserializeSchedulerTaskHubData(e)), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, "SchedulerTaskHubCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Exists"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.Exists"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the TaskHub. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string taskHubName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(taskHubName, nameof(taskHubName)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubCollection.GetIfExists"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskHubName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs deleted file mode 100644 index 807c1b002c81..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class SchedulerTaskHubData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - } - - SchedulerTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSchedulerTaskHubData(document.RootElement, options); - } - - internal static SchedulerTaskHubData DeserializeSchedulerTaskHubData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchedulerTaskHubProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = SchedulerTaskHubProperties.DeserializeSchedulerTaskHubProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDurableTaskContext.Default); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SchedulerTaskHubData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDurableTaskContext.Default); - default: - throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support writing '{options.Format}' format."); - } - } - - SchedulerTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSchedulerTaskHubData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SchedulerTaskHubData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs deleted file mode 100644 index be03218e5cb5..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubData.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.DurableTask.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A class representing the SchedulerTaskHub data model. - /// A Task Hub resource belonging to the scheduler - /// - public partial class SchedulerTaskHubData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SchedulerTaskHubData() - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource-specific properties for this resource. - /// Keeps track of any properties unknown to the library. - internal SchedulerTaskHubData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SchedulerTaskHubProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The resource-specific properties for this resource. - public SchedulerTaskHubProperties Properties { get; set; } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs deleted file mode 100644 index c053d7c70731..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.DurableTask -{ - public partial class SchedulerTaskHubResource : IJsonModel - { - private static SchedulerTaskHubData s_dataDeserializationInstance; - private static SchedulerTaskHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - SchedulerTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); - - SchedulerTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs deleted file mode 100644 index ecd957c18421..000000000000 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulerTaskHubResource.cs +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.DurableTask -{ - /// - /// A Class representing a SchedulerTaskHub along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetSchedulerTaskHubResource method. - /// Otherwise you can get one from its parent resource using the GetSchedulerTaskHub method. - /// - public partial class SchedulerTaskHubResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The schedulerName. - /// The taskHubName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string schedulerName, string taskHubName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _schedulerTaskHubTaskHubsClientDiagnostics; - private readonly TaskHubsRestOperations _schedulerTaskHubTaskHubsRestClient; - private readonly SchedulerTaskHubData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DurableTask/schedulers/taskHubs"; - - /// Initializes a new instance of the class for mocking. - protected SchedulerTaskHubResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal SchedulerTaskHubResource(ArmClient client, SchedulerTaskHubData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal SchedulerTaskHubResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _schedulerTaskHubTaskHubsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DurableTask", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string schedulerTaskHubTaskHubsApiVersion); - _schedulerTaskHubTaskHubsRestClient = new TaskHubsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, schedulerTaskHubTaskHubsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual SchedulerTaskHubData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Get"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Get - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Get"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SchedulerTaskHubResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Delete"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(_schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_Delete - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Delete"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new DurableTaskArmOperation(_schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or Update a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resource create parameters. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SchedulerTaskHubData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Update"); - scope.Start(); - try - { - var response = await _schedulerTaskHubTaskHubsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or Update a Task Hub - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName} - /// - /// - /// Operation Id - /// TaskHub_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2025-11-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Resource create parameters. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SchedulerTaskHubData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _schedulerTaskHubTaskHubsClientDiagnostics.CreateScope("SchedulerTaskHubResource.Update"); - scope.Start(); - try - { - var response = _schedulerTaskHubTaskHubsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DurableTaskArmOperation(new SchedulerTaskHubOperationSource(Client), _schedulerTaskHubTaskHubsClientDiagnostics, Pipeline, _schedulerTaskHubTaskHubsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..cd381db5954d --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly Schedulers _client; + private readonly Guid _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SchedulersGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Schedulers client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + public SchedulersGetByResourceGroupAsyncCollectionResultOfT(Schedulers client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SchedulersGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SchedulersGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SchedulerListResult result = SchedulerListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..71d3c523c627 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetByResourceGroupCollectionResultOfT.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersGetByResourceGroupCollectionResultOfT : Pageable + { + private readonly Schedulers _client; + private readonly Guid _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SchedulersGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Schedulers client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + public SchedulersGetByResourceGroupCollectionResultOfT(Schedulers client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SchedulersGetByResourceGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SchedulersGetByResourceGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SchedulerListResult result = SchedulerListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DurableTaskSchedulerCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionAsyncCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..d01f35443b16 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionAsyncCollectionResultOfT.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable + { + private readonly Schedulers _client; + private readonly Guid _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SchedulersGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Schedulers client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SchedulersGetBySubscriptionAsyncCollectionResultOfT(Schedulers client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SchedulersGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SchedulersGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SchedulerListResult result = SchedulerListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionCollectionResultOfT.cs new file mode 100644 index 000000000000..1e7912b48674 --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/SchedulersGetBySubscriptionCollectionResultOfT.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class SchedulersGetBySubscriptionCollectionResultOfT : Pageable + { + private readonly Schedulers _client; + private readonly Guid _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SchedulersGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Schedulers client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SchedulersGetBySubscriptionCollectionResultOfT(Schedulers client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SchedulersGetBySubscriptionCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SchedulersGetBySubscriptionCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SchedulerListResult result = SchedulerListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableDurableTaskSubscriptionResource.GetDurableTaskSchedulers"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerAsyncCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..49752508af3b --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerAsyncCollectionResultOfT.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class TaskHubsGetBySchedulerAsyncCollectionResultOfT : AsyncPageable + { + private readonly TaskHubs _client; + private readonly Guid _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _schedulerName; + private readonly RequestContext _context; + + /// Initializes a new instance of TaskHubsGetBySchedulerAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The TaskHubs client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public TaskHubsGetBySchedulerAsyncCollectionResultOfT(TaskHubs client, Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _schedulerName = schedulerName; + _context = context; + } + + /// Gets the pages of TaskHubsGetBySchedulerAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of TaskHubsGetBySchedulerAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + TaskHubListResult result = TaskHubListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySchedulerRequest(nextLink, _subscriptionId, _resourceGroupName, _schedulerName, _context) : _client.CreateGetBySchedulerRequest(_subscriptionId, _resourceGroupName, _schedulerName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DurableTaskHubCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerCollectionResultOfT.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerCollectionResultOfT.cs new file mode 100644 index 000000000000..f6d02200c6cb --- /dev/null +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/TaskHubsGetBySchedulerCollectionResultOfT.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DurableTask.Models; + +namespace Azure.ResourceManager.DurableTask +{ + internal partial class TaskHubsGetBySchedulerCollectionResultOfT : Pageable + { + private readonly TaskHubs _client; + private readonly Guid _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _schedulerName; + private readonly RequestContext _context; + + /// Initializes a new instance of TaskHubsGetBySchedulerCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The TaskHubs client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Scheduler. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public TaskHubsGetBySchedulerCollectionResultOfT(TaskHubs client, Guid subscriptionId, string resourceGroupName, string schedulerName, RequestContext context) : base(context?.CancellationToken ?? default) + { + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(schedulerName, nameof(schedulerName)); + + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _schedulerName = schedulerName; + _context = context; + } + + /// Gets the pages of TaskHubsGetBySchedulerCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of TaskHubsGetBySchedulerCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + TaskHubListResult result = TaskHubListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetBySchedulerRequest(nextLink, _subscriptionId, _resourceGroupName, _schedulerName, _context) : _client.CreateGetBySchedulerRequest(_subscriptionId, _resourceGroupName, _schedulerName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("DurableTaskHubCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs similarity index 61% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs index 20df49534a02..e32f9f887ed4 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubCollection.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubCollection.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.DurableTask.Samples { - public partial class Sample_SchedulerTaskHubCollection + public partial class Sample_DurableTaskHubCollection { [Test] [Ignore("Only validating compilation of examples")] @@ -28,29 +28,29 @@ public async Task CreateOrUpdate_TaskHubsCreateOrUpdate() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - // get the collection of this SchedulerTaskHubResource - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); // invoke the operation string taskHubName = "testtaskhub"; - SchedulerTaskHubData data = new SchedulerTaskHubData + DurableTaskHubData data = new DurableTaskHubData { - Properties = new SchedulerTaskHubProperties(), + Properties = new DurableTaskHubProperties(), }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); - SchedulerTaskHubResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskHubName, data); + DurableTaskHubResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = result.Data; + DurableTaskHubData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -67,24 +67,24 @@ public async Task Get_TaskHubsGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - // get the collection of this SchedulerTaskHubResource - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); // invoke the operation string taskHubName = "testtaskhub"; - SchedulerTaskHubResource result = await collection.GetAsync(taskHubName); + DurableTaskHubResource result = await collection.GetAsync(taskHubName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = result.Data; + DurableTaskHubData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -101,23 +101,23 @@ public async Task GetAll_TaskHubsListByScheduler() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - // get the collection of this SchedulerTaskHubResource - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); // invoke the operation and iterate over the result - await foreach (SchedulerTaskHubResource item in collection.GetAllAsync()) + await foreach (DurableTaskHubResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = item.Data; + DurableTaskHubData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -137,16 +137,16 @@ public async Task Exists_TaskHubsGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - // get the collection of this SchedulerTaskHubResource - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); // invoke the operation string taskHubName = "testtaskhub"; @@ -167,21 +167,21 @@ public async Task GetIfExists_TaskHubsGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); - // get the collection of this SchedulerTaskHubResource - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + // get the collection of this DurableTaskHubResource + DurableTaskHubCollection collection = durableTaskScheduler.GetDurableTaskHubs(); // invoke the operation string taskHubName = "testtaskhub"; - NullableResponse response = await collection.GetIfExistsAsync(taskHubName); - SchedulerTaskHubResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(taskHubName); + DurableTaskHubResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -191,7 +191,7 @@ public async Task GetIfExists_TaskHubsGet() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = result.Data; + DurableTaskHubData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs similarity index 64% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs index 22771c4d34db..aba09f676810 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerTaskHubResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskHubResource.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.DurableTask.Samples { - public partial class Sample_SchedulerTaskHubResource + public partial class Sample_DurableTaskHubResource { [Test] [Ignore("Only validating compilation of examples")] @@ -28,21 +28,21 @@ public async Task Get_TaskHubsGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerTaskHubResource created on azure - // for more information of creating SchedulerTaskHubResource, please refer to the document of SchedulerTaskHubResource + // this example assumes you already have this DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; string taskHubName = "testtaskhub"; - ResourceIdentifier schedulerTaskHubResourceId = SchedulerTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - SchedulerTaskHubResource schedulerTaskHub = client.GetSchedulerTaskHubResource(schedulerTaskHubResourceId); + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); // invoke the operation - SchedulerTaskHubResource result = await schedulerTaskHub.GetAsync(); + DurableTaskHubResource result = await durableTaskHub.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = result.Data; + DurableTaskHubData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -59,17 +59,17 @@ public async Task Delete_TaskHubsDelete() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerTaskHubResource created on azure - // for more information of creating SchedulerTaskHubResource, please refer to the document of SchedulerTaskHubResource + // this example assumes you already have this DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; string taskHubName = "testtaskhub"; - ResourceIdentifier schedulerTaskHubResourceId = SchedulerTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - SchedulerTaskHubResource schedulerTaskHub = client.GetSchedulerTaskHubResource(schedulerTaskHubResourceId); + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); // invoke the operation - await schedulerTaskHub.DeleteAsync(WaitUntil.Completed); + await durableTaskHub.DeleteAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } @@ -86,26 +86,26 @@ public async Task Update_TaskHubsCreateOrUpdate() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerTaskHubResource created on azure - // for more information of creating SchedulerTaskHubResource, please refer to the document of SchedulerTaskHubResource + // this example assumes you already have this DurableTaskHubResource created on azure + // for more information of creating DurableTaskHubResource, please refer to the document of DurableTaskHubResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; string taskHubName = "testtaskhub"; - ResourceIdentifier schedulerTaskHubResourceId = SchedulerTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); - SchedulerTaskHubResource schedulerTaskHub = client.GetSchedulerTaskHubResource(schedulerTaskHubResourceId); + ResourceIdentifier durableTaskHubResourceId = DurableTaskHubResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName, taskHubName); + DurableTaskHubResource durableTaskHub = client.GetDurableTaskHubResource(durableTaskHubResourceId); // invoke the operation - SchedulerTaskHubData data = new SchedulerTaskHubData + DurableTaskHubData data = new DurableTaskHubData { - Properties = new SchedulerTaskHubProperties(), + Properties = new DurableTaskHubProperties(), }; - ArmOperation lro = await schedulerTaskHub.UpdateAsync(WaitUntil.Completed, data); - SchedulerTaskHubResource result = lro.Value; + ArmOperation lro = await durableTaskHub.UpdateAsync(WaitUntil.Completed, data); + DurableTaskHubResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerTaskHubData resourceData = result.Data; + DurableTaskHubData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_RetentionPolicyResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs similarity index 57% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_RetentionPolicyResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs index 886f12bdb7f0..b40dc9a828e0 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_RetentionPolicyResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskRetentionPolicyResource.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.DurableTask.Samples { - public partial class Sample_RetentionPolicyResource + public partial class Sample_DurableTaskRetentionPolicyResource { [Test] [Ignore("Only validating compilation of examples")] @@ -28,20 +28,20 @@ public async Task Get_RetentionPoliciesGetMaximumSet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this RetentionPolicyResource created on azure - // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; string resourceGroupName = "rgdurabletask"; string schedulerName = "testscheduler"; - ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); // invoke the operation - RetentionPolicyResource result = await retentionPolicy.GetAsync(); + DurableTaskRetentionPolicyResource result = await durableTaskRetentionPolicy.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RetentionPolicyData resourceData = result.Data; + DurableTaskRetentionPolicyData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -58,16 +58,16 @@ public async Task Delete_RetentionPoliciesDeleteMaximumSet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this RetentionPolicyResource created on azure - // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; string resourceGroupName = "rgdurabletask"; string schedulerName = "testcheduler"; - ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); // invoke the operation - await retentionPolicy.DeleteAsync(WaitUntil.Completed); + await durableTaskRetentionPolicy.DeleteAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } @@ -84,34 +84,34 @@ public async Task Update_RetentionPoliciesUpdateMaximumSet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this RetentionPolicyResource created on azure - // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; string resourceGroupName = "rgdurabletask"; string schedulerName = "testscheduler"; - ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); // invoke the operation - RetentionPolicyData data = new RetentionPolicyData + DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData { - Properties = new RetentionPolicyProperties + Properties = new DurableTaskRetentionPolicyProperties { - RetentionPolicies = {new RetentionPolicyDetails(30), new RetentionPolicyDetails(10) + RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) { -OrchestrationState = PurgeableOrchestrationState.Failed, -}, new RetentionPolicyDetails(24) +OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, +}, new DurableTaskRetentionPolicyDetails(24) { -OrchestrationState = PurgeableOrchestrationState.Completed, +OrchestrationState = DurableTaskPurgeableOrchestrationState.Completed, }}, }, }; - ArmOperation lro = await retentionPolicy.UpdateAsync(WaitUntil.Completed, data); - RetentionPolicyResource result = lro.Value; + ArmOperation lro = await durableTaskRetentionPolicy.UpdateAsync(WaitUntil.Completed, data); + DurableTaskRetentionPolicyResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RetentionPolicyData resourceData = result.Data; + DurableTaskRetentionPolicyData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -128,31 +128,31 @@ public async Task CreateOrUpdate_RetentionPoliciesCreateOrReplaceMaximumSet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this RetentionPolicyResource created on azure - // for more information of creating RetentionPolicyResource, please refer to the document of RetentionPolicyResource + // this example assumes you already have this DurableTaskRetentionPolicyResource created on azure + // for more information of creating DurableTaskRetentionPolicyResource, please refer to the document of DurableTaskRetentionPolicyResource string subscriptionId = "194D3C1E-462F-4738-9025-092A628C06EB"; string resourceGroupName = "rgdurabletask"; string schedulerName = "testscheduler"; - ResourceIdentifier retentionPolicyResourceId = RetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - RetentionPolicyResource retentionPolicy = client.GetRetentionPolicyResource(retentionPolicyResourceId); + ResourceIdentifier durableTaskRetentionPolicyResourceId = DurableTaskRetentionPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskRetentionPolicyResource durableTaskRetentionPolicy = client.GetDurableTaskRetentionPolicyResource(durableTaskRetentionPolicyResourceId); // invoke the operation - RetentionPolicyData data = new RetentionPolicyData + DurableTaskRetentionPolicyData data = new DurableTaskRetentionPolicyData { - Properties = new RetentionPolicyProperties + Properties = new DurableTaskRetentionPolicyProperties { - RetentionPolicies = {new RetentionPolicyDetails(30), new RetentionPolicyDetails(10) + RetentionPolicies = {new DurableTaskRetentionPolicyDetails(30), new DurableTaskRetentionPolicyDetails(10) { -OrchestrationState = PurgeableOrchestrationState.Failed, +OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed, }}, }, }; - ArmOperation lro = await retentionPolicy.CreateOrUpdateAsync(WaitUntil.Completed, data); - RetentionPolicyResource result = lro.Value; + ArmOperation lro = await durableTaskRetentionPolicy.CreateOrUpdateAsync(WaitUntil.Completed, data); + DurableTaskRetentionPolicyResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RetentionPolicyData resourceData = result.Data; + DurableTaskRetentionPolicyData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerCollection.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs similarity index 81% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerCollection.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs index 674c29ea03c0..30cecfa8aeb1 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerCollection.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerCollection.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.DurableTask.Samples { - public partial class Sample_SchedulerCollection + public partial class Sample_DurableTaskSchedulerCollection { [Test] [Ignore("Only validating compilation of examples")] @@ -36,26 +36,26 @@ public async Task CreateOrUpdate_SchedulersCreateOrUpdate() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this SchedulerResource - SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + // get the collection of this DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); // invoke the operation string schedulerName = "testscheduler"; - SchedulerData data = new SchedulerData(new AzureLocation("northcentralus")) + DurableTaskSchedulerData data = new DurableTaskSchedulerData(new AzureLocation("northcentralus")) { - Properties = new SchedulerProperties(new string[] { "10.0.0.0/8" }, new SchedulerSku(SchedulerSkuName.Dedicated)), + Properties = new DurableTaskSchedulerProperties(new string[] { "10.0.0.0/8" }, new DurableTaskSchedulerSku(DurableTaskSchedulerSkuName.Dedicated)), Tags = { ["department"] = "research", ["development"] = "true" }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); - SchedulerResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, schedulerName, data); + DurableTaskSchedulerResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = result.Data; + DurableTaskSchedulerData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -79,16 +79,16 @@ public async Task Get_SchedulersGet() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this SchedulerResource - SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + // get the collection of this DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); // invoke the operation string schedulerName = "testscheduler"; - SchedulerResource result = await collection.GetAsync(schedulerName); + DurableTaskSchedulerResource result = await collection.GetAsync(schedulerName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = result.Data; + DurableTaskSchedulerData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -112,15 +112,15 @@ public async Task GetAll_SchedulersListByResourceGroup() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this SchedulerResource - SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + // get the collection of this DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); // invoke the operation and iterate over the result - await foreach (SchedulerResource item in collection.GetAllAsync()) + await foreach (DurableTaskSchedulerResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = item.Data; + DurableTaskSchedulerData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -147,8 +147,8 @@ public async Task Exists_SchedulersGet() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this SchedulerResource - SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + // get the collection of this DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); // invoke the operation string schedulerName = "testscheduler"; @@ -176,13 +176,13 @@ public async Task GetIfExists_SchedulersGet() ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this SchedulerResource - SchedulerCollection collection = resourceGroupResource.GetSchedulers(); + // get the collection of this DurableTaskSchedulerResource + DurableTaskSchedulerCollection collection = resourceGroupResource.GetDurableTaskSchedulers(); // invoke the operation string schedulerName = "testscheduler"; - NullableResponse response = await collection.GetIfExistsAsync(schedulerName); - SchedulerResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(schedulerName); + DurableTaskSchedulerResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -192,7 +192,7 @@ public async Task GetIfExists_SchedulersGet() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = result.Data; + DurableTaskSchedulerData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerResource.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs similarity index 62% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerResource.cs rename to sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs index fc14bf161d1f..cff98a0460c9 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SchedulerResource.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_DurableTaskSchedulerResource.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.DurableTask.Samples { - public partial class Sample_SchedulerResource + public partial class Sample_DurableTaskSchedulerResource { [Test] [Ignore("Only validating compilation of examples")] @@ -28,20 +28,20 @@ public async Task Get_SchedulersGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); // invoke the operation - SchedulerResource result = await scheduler.GetAsync(); + DurableTaskSchedulerResource result = await durableTaskScheduler.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = result.Data; + DurableTaskSchedulerData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -58,16 +58,16 @@ public async Task Delete_SchedulersDelete() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); // invoke the operation - await scheduler.DeleteAsync(WaitUntil.Completed); + await durableTaskScheduler.DeleteAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } @@ -84,23 +84,23 @@ public async Task Update_SchedulersUpdate() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SchedulerResource created on azure - // for more information of creating SchedulerResource, please refer to the document of SchedulerResource + // this example assumes you already have this DurableTaskSchedulerResource created on azure + // for more information of creating DurableTaskSchedulerResource, please refer to the document of DurableTaskSchedulerResource string subscriptionId = "EE9BD735-67CE-4A90-89C4-439D3F6A4C93"; string resourceGroupName = "rgopenapi"; string schedulerName = "testscheduler"; - ResourceIdentifier schedulerResourceId = SchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); - SchedulerResource scheduler = client.GetSchedulerResource(schedulerResourceId); + ResourceIdentifier durableTaskSchedulerResourceId = DurableTaskSchedulerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, schedulerName); + DurableTaskSchedulerResource durableTaskScheduler = client.GetDurableTaskSchedulerResource(durableTaskSchedulerResourceId); // invoke the operation - SchedulerPatch patch = new SchedulerPatch + DurableTaskSchedulerPatch patch = new DurableTaskSchedulerPatch { - Properties = new SchedulerPatchProperties + Properties = new DurableTaskSchedulerPatchProperties { IPAllowlist = { "10.0.0.0/8" }, - Sku = new SchedulerSkuUpdate + Sku = new DurableTaskSchedulerSkuUpdate { - Name = SchedulerSkuName.Dedicated, + Name = DurableTaskSchedulerSkuName.Dedicated, Capacity = 3, }, }, @@ -109,12 +109,12 @@ public async Task Update_SchedulersUpdate() ["hello"] = "world" }, }; - ArmOperation lro = await scheduler.UpdateAsync(WaitUntil.Completed, patch); - SchedulerResource result = lro.Value; + ArmOperation lro = await durableTaskScheduler.UpdateAsync(WaitUntil.Completed, patch); + DurableTaskSchedulerResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = result.Data; + DurableTaskSchedulerData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index d27629198b74..6810cd8ad043 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -18,7 +18,7 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSchedulers_SchedulersListBySubscription() + public async Task GetDurableTaskSchedulers_SchedulersListBySubscription() { // Generated from example definition: 2025-11-01/Schedulers_ListBySubscription.json // this example is just showing the usage of "Scheduler_ListBySubscription" operation, for the dependent resources, they will have to be created separately. @@ -35,11 +35,11 @@ public async Task GetSchedulers_SchedulersListBySubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (SchedulerResource item in subscriptionResource.GetSchedulersAsync()) + await foreach (DurableTaskSchedulerResource item in subscriptionResource.GetDurableTaskSchedulersAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SchedulerData resourceData = item.Data; + DurableTaskSchedulerData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs index a87cc9bd4c3f..cd54abfa594f 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/RetentionPolicyTests.cs @@ -30,42 +30,42 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new SchedulerProperties( + Properties = new DurableTaskSchedulerProperties( ipAllowlist: ["0.0.0.0/0"], // all IPs allowed to access the endpoint - sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new DurableTaskSchedulerSku() { Name = DurableTaskSchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); - SchedulerResource scheduler = longRunningOperation.Value; + ArmOperation longRunningOperation = + await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); + DurableTaskSchedulerResource scheduler = longRunningOperation.Value; // This is a singleton resource, but it does not yet exist until we create it - RetentionPolicyResource singletonRetentionPolicy = scheduler.GetRetentionPolicy(); + DurableTaskRetentionPolicyResource singletonRetentionPolicy = scheduler.GetDurableTaskRetentionPolicy(); // Construct the retention policy with multiple rules - RetentionPolicyProperties retentionPolicyProperties = new RetentionPolicyProperties(); + DurableTaskRetentionPolicyProperties retentionPolicyProperties = new DurableTaskRetentionPolicyProperties(); retentionPolicyProperties.RetentionPolicies.Add( - new RetentionPolicyDetails() + new DurableTaskRetentionPolicyDetails() { RetentionPeriodInDays = 3, - OrchestrationState = PurgeableOrchestrationState.Completed + OrchestrationState = DurableTaskPurgeableOrchestrationState.Completed }); retentionPolicyProperties.RetentionPolicies.Add( - new RetentionPolicyDetails() + new DurableTaskRetentionPolicyDetails() { RetentionPeriodInDays = 30, - OrchestrationState = PurgeableOrchestrationState.Failed + OrchestrationState = DurableTaskPurgeableOrchestrationState.Failed }); retentionPolicyProperties.RetentionPolicies.Add( - new RetentionPolicyDetails() + new DurableTaskRetentionPolicyDetails() { RetentionPeriodInDays = 30, // without OrchestrationState, this policy applies to all states not explicitly mentioned in other policies }); - RetentionPolicyData payload = new RetentionPolicyData() + DurableTaskRetentionPolicyData payload = new DurableTaskRetentionPolicyData() { Properties = retentionPolicyProperties }; @@ -77,8 +77,8 @@ await TestContext.Error.WriteLineAsync( Assert.AreEqual(3, singletonRetentionPolicy.Data.Properties.RetentionPolicies.Count); // Assert the specific policy for Completed orchestrations has the expected retention period - RetentionPolicyDetails completedPolicy = singletonRetentionPolicy.Data.Properties.RetentionPolicies - .SingleOrDefault(p => p.OrchestrationState == PurgeableOrchestrationState.Completed); + DurableTaskRetentionPolicyDetails completedPolicy = singletonRetentionPolicy.Data.Properties.RetentionPolicies + .SingleOrDefault(p => p.OrchestrationState == DurableTaskPurgeableOrchestrationState.Completed); Assert.NotNull(completedPolicy, "Expected a retention policy with OrchestrationState=Completed."); Assert.AreEqual(3, completedPolicy.RetentionPeriodInDays, "Unexpected retention days for Completed state."); diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs index 61082c111e8b..65fd7dcf0a88 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/SchedulerTests.cs @@ -46,65 +46,65 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new SchedulerProperties( + Properties = new DurableTaskSchedulerProperties( ipAllowlist: [IpRange1, IpRange2, IpRange3], - sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new DurableTaskSchedulerSku() { Name = DurableTaskSchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, createSchedulerData); + ArmOperation longRunningOperation = + await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, createSchedulerData); // While provisioning is in progress the resource is in first in accepted, then provisioning state - SchedulerResource resource = await rg.GetSchedulerAsync(resourceName); + DurableTaskSchedulerResource resource = await rg.GetDurableTaskSchedulerAsync(resourceName); Assert.NotNull(resource); - Assert.Contains(resource.Data.Properties.ProvisioningState, new[] { ProvisioningState.Provisioning, ProvisioningState.Accepted }); + Assert.Contains(resource.Data.Properties.ProvisioningState, new[] { DurableTaskProvisioningState.Provisioning, DurableTaskProvisioningState.Accepted }); // Keep track of the resource id to delete it later string resourceId = resource.Id; resource = await longRunningOperation.WaitForCompletionAsync(); Assert.AreEqual(resourceName, resource.Data.Name); - Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); - Assert.AreEqual(ResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); + Assert.AreEqual(DurableTaskSchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); + Assert.AreEqual(DurableTaskResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); Assert.Contains(IpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); - Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Get Scheduler - resource = await rg.GetSchedulerAsync(resourceName); + resource = await rg.GetDurableTaskSchedulerAsync(resourceName); Assert.NotNull(resource); Assert.AreEqual(resourceName, resource.Data.Name); - Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); - Assert.AreEqual(ResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); + Assert.AreEqual(DurableTaskSchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); + Assert.AreEqual(DurableTaskResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); Assert.Contains(IpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); - Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); - SchedulerData updateSchedulerData = new(AzureLocation.NorthCentralUS) + DurableTaskSchedulerData updateSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new SchedulerProperties( + Properties = new DurableTaskSchedulerProperties( ipAllowlist: [UpdatedIpRange1, UpdatedIpRange2, IpRange3], - sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new DurableTaskSchedulerSku() { Name = DurableTaskSchedulerSkuName.Dedicated, Capacity = 1 } ), Tags = { { TagKeyOrg, TagValueOrg }, { TagKeyEnv, TagValueEnv } } }; longRunningOperation = - await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, updateSchedulerData); + await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Started, resourceName, updateSchedulerData); // While the update is in progress the resource is in updating state - resource = await rg.GetSchedulerAsync(resourceName); - Assert.AreEqual(ProvisioningState.Updating, resource.Data.Properties.ProvisioningState); + resource = await rg.GetDurableTaskSchedulerAsync(resourceName); + Assert.AreEqual(DurableTaskProvisioningState.Updating, resource.Data.Properties.ProvisioningState); // Wait for the update to complete resource = await longRunningOperation.WaitForCompletionAsync(); Assert.AreEqual(resourceName, resource.Data.Name); - Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); - Assert.AreEqual(ResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); + Assert.AreEqual(DurableTaskSchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); + Assert.AreEqual(DurableTaskResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); Assert.Contains(UpdatedIpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(UpdatedIpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); @@ -113,16 +113,16 @@ await TestContext.Error.WriteLineAsync( Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueOrg, resource.Data.Tags[TagKeyOrg]); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // List all schedulers and verify the updated scheduler is present - List schedulers = await rg.GetSchedulers().GetAllAsync().ToEnumerableAsync(); + List schedulers = await rg.GetDurableTaskSchedulers().GetAllAsync().ToEnumerableAsync(); // Look for the scheduler with the ARM resource ID matching our resource resource = schedulers.FirstOrDefault(s => s.Data.Id == resourceId); Assert.NotNull(resource); Assert.AreEqual(resourceName, resource.Data.Name); - Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); - Assert.AreEqual(ResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); + Assert.AreEqual(DurableTaskSchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); + Assert.AreEqual(DurableTaskResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); Assert.Contains(UpdatedIpRange1, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(UpdatedIpRange2, resource.Data.Properties.IPAllowlist as IList); Assert.Contains(IpRange3, resource.Data.Properties.IPAllowlist as IList); @@ -131,15 +131,15 @@ await TestContext.Error.WriteLineAsync( Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueOrg, resource.Data.Tags[TagKeyOrg]); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Update select Scheduler properties (Patch) - SchedulerPatch patchSchedulerData = new() + DurableTaskSchedulerPatch patchSchedulerData = new() { - Properties = new SchedulerPatchProperties + Properties = new DurableTaskSchedulerPatchProperties { IPAllowlist = { PatchIpRange }, - Sku = new SchedulerSkuUpdate + Sku = new DurableTaskSchedulerSkuUpdate { Capacity = 1 } @@ -152,14 +152,14 @@ await TestContext.Error.WriteLineAsync( resource = longRunningOperation.Value; Assert.AreEqual(resourceName, resource.Data.Name); - Assert.AreEqual(SchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); - Assert.AreEqual(ResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); + Assert.AreEqual(DurableTaskSchedulerSkuName.Dedicated, resource.Data.Properties.Sku.Name); + Assert.AreEqual(DurableTaskResourceRedundancyState.None, resource.Data.Properties.Sku.RedundancyState); Assert.AreEqual(1, resource.Data.Properties.IPAllowlist.Count); Assert.Contains(PatchIpRange, resource.Data.Properties.IPAllowlist as IList); Assert.AreEqual(1, resource.Data.Tags.Count); Assert.That(resource.Data.Tags.Keys, Does.Contain(TagKeyEnv)); Assert.AreEqual(TagValueEnv, resource.Data.Tags[TagKeyEnv]); - Assert.AreEqual(ProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); + Assert.AreEqual(DurableTaskProvisioningState.Succeeded, resource.Data.Properties.ProvisioningState); // Delete Scheduler await resource.DeleteAsync(WaitUntil.Completed); @@ -167,7 +167,7 @@ await TestContext.Error.WriteLineAsync( // Verify the scheduler is deleted try { - await rg.GetSchedulerAsync(resourceName); + await rg.GetDurableTaskSchedulerAsync(resourceName); } catch (RequestFailedException ex) when (ex.Status == StatusCodes.Status404NotFound) { diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs index 0d8818211d2f..21904ebc4fe7 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tests/Scenario/TaskHubTests.cs @@ -29,27 +29,27 @@ await TestContext.Error.WriteLineAsync( string resourceName = Recording.GenerateAssetName("resource"); // Create Scheduler - SchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) + DurableTaskSchedulerData createSchedulerData = new(AzureLocation.NorthCentralUS) { - Properties = new SchedulerProperties( + Properties = new DurableTaskSchedulerProperties( ipAllowlist: ["0.0.0.0/0"], // all IPs allowed to access the endpoint - sku: new SchedulerSku() { Name = SchedulerSkuName.Dedicated, Capacity = 1 } + sku: new DurableTaskSchedulerSku() { Name = DurableTaskSchedulerSkuName.Dedicated, Capacity = 1 } ) }; - ArmOperation longRunningOperation = - await rg.GetSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); - SchedulerResource scheduler = longRunningOperation.Value; - SchedulerTaskHubCollection collection = scheduler.GetSchedulerTaskHubs(); + ArmOperation longRunningOperation = + await rg.GetDurableTaskSchedulers().CreateOrUpdateAsync(WaitUntil.Completed, resourceName, createSchedulerData); + DurableTaskSchedulerResource scheduler = longRunningOperation.Value; + DurableTaskHubCollection collection = scheduler.GetDurableTaskHubs(); - await collection.CreateOrUpdateAsync(WaitUntil.Completed, "MyHub", new SchedulerTaskHubData()); + await collection.CreateOrUpdateAsync(WaitUntil.Completed, "MyHub", new DurableTaskHubData()); - SchedulerTaskHubResource hub = await scheduler.GetSchedulerTaskHubAsync("MyHub"); + DurableTaskHubResource hub = await scheduler.GetDurableTaskHubAsync("MyHub"); Assert.True(hub.HasData); Assert.True(hub.Data.Properties.DashboardUri.Host.ToLower().Contains("durabletask.io")); Assert.AreEqual("MyHub", hub.Data.Name); // The list endpoint should also return the newly created hub - SchedulerTaskHubResource listHub = await collection.GetAllAsync().FirstOrDefaultAsync(t => t.Data.Name == "MyHub"); + DurableTaskHubResource listHub = await collection.GetAllAsync().FirstOrDefaultAsync(t => t.Data.Name == "MyHub"); Assert.NotNull(listHub); Assert.AreEqual(hub.Data.Name, listHub.Data.Name); @@ -57,7 +57,7 @@ await TestContext.Error.WriteLineAsync( try { - await scheduler.GetSchedulerTaskHubAsync("MyHub"); + await scheduler.GetDurableTaskHubAsync("MyHub"); } catch (RequestFailedException ex) when (ex.Status == StatusCodes.Status404NotFound) { diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml index 8220862d94df..98ecc6f7e093 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/durabletask/DurableTask.Management -commit: c918b5a1177038636095dfb92ae8cace737b60d6 -repo: berndverst/azure-rest-api-specs +commit: 38ff6d42ea00d97b4bbc7e109f66b3b7b8171517 +repo: Azure/azure-rest-api-specs +emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" \ No newline at end of file diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/ApiCompatBaseline.txt b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/ApiCompatBaseline.txt index 28a3396540fe..d9f871974df7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/ApiCompatBaseline.txt +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/ApiCompatBaseline.txt @@ -1,2 +1,4 @@ # This attribute is now generated in each library. There should be no impact to end users. CannotRemoveAttribute : Attribute 'Azure.Core.CodeGenSerializationAttribute' exists on 'Azure.Messaging.EventGrid.Namespaces.ReceiveDetails' in the contract but not the implementation. +CannotChangeAttribute : Attribute 'Azure.Messaging.EventGrid.Namespaces.CodeGenSuppressAttribute' on 'Azure.Messaging.EventGrid.Namespaces.EventGridSenderClient' changed from '[CodeGenSuppressAttribute("EventGridSenderClient", new Type[]{ typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridSenderClientOptions)})]' in the contract to '[CodeGenSuppressAttribute("EventGridSenderClient", new Type[]{ typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridNamespacesClientOptions)})]' in the implementation. +CannotChangeAttribute : Attribute 'Azure.Messaging.EventGrid.Namespaces.CodeGenSuppressAttribute' on 'Azure.Messaging.EventGrid.Namespaces.EventGridReceiverClient' changed from '[CodeGenSuppressAttribute("EventGridReceiverClient", new Type[]{ typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridReceiverClientOptions)})]' in the contract to '[CodeGenSuppressAttribute("EventGridReceiverClient", new Type[]{ typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridNamespacesClientOptions)})]' in the implementation. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacsClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacsClientOptions.cs new file mode 100644 index 000000000000..b4e550a01559 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridNamespacsClientOptions.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class EventGridNamespacesClientOptions + { + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClient.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClient.cs index a80fe26c6eb1..7a386d0a143e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClient.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClient.cs @@ -13,8 +13,8 @@ namespace Azure.Messaging.EventGrid.Namespaces { [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(AzureKeyCredential))] [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(TokenCredential))] - [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridReceiverClientOptions))] - [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(TokenCredential), typeof(EventGridReceiverClientOptions))] + [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridNamespacesClientOptions))] + [CodeGenSuppress("EventGridReceiverClient", typeof(Uri), typeof(TokenCredential), typeof(EventGridNamespacesClientOptions))] public partial class EventGridReceiverClient { private readonly string _topicName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridReceiverClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClientOptions.cs similarity index 93% rename from sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridReceiverClientOptions.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClientOptions.cs index 234a56aa0f52..c43f105e6306 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridReceiverClientOptions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridReceiverClientOptions.cs @@ -1,8 +1,6 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClient.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClient.cs index 0e7af6705c6c..4608e1887963 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClient.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClient.cs @@ -13,8 +13,8 @@ namespace Azure.Messaging.EventGrid.Namespaces { [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(AzureKeyCredential))] [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(TokenCredential))] - [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridSenderClientOptions))] - [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(TokenCredential), typeof(EventGridSenderClientOptions))] + [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(AzureKeyCredential), typeof(EventGridNamespacesClientOptions))] + [CodeGenSuppress("EventGridSenderClient", typeof(Uri), typeof(TokenCredential), typeof(EventGridNamespacesClientOptions))] public partial class EventGridSenderClient { private readonly string _topicName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridSenderClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClientOptions.cs similarity index 93% rename from sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridSenderClientOptions.cs rename to sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClientOptions.cs index a0dcdfbc6ffd..4493c7287258 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridSenderClientOptions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Customization/EventGridSenderClientOptions.cs @@ -1,8 +1,6 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeRequest.Serialization.cs index e616f326e2fc..78392244aeb0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeRequest.Serialization.cs @@ -150,7 +150,7 @@ protected virtual AcknowledgeRequest PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcknowledgeRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeResult.Serialization.cs index d3ea637474e9..717ccdb75c45 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/AcknowledgeResult.Serialization.cs @@ -169,7 +169,7 @@ protected virtual AcknowledgeResult PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcknowledgeResult(document.RootElement, options); } @@ -184,7 +184,7 @@ protected virtual AcknowledgeResult PersistableModelCreateCore(BinaryData data, /// The to deserialize the from. public static explicit operator AcknowledgeResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAcknowledgeResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/BrokerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/BrokerProperties.Serialization.cs index 9a6ee13c1d8c..64823c15b226 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/BrokerProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/BrokerProperties.Serialization.cs @@ -135,7 +135,7 @@ protected virtual BrokerProperties PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBrokerProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/CloudEventInternal.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/CloudEventInternal.Serialization.cs index 7ade1cf9431a..eacce2f34eaa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/CloudEventInternal.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/CloudEventInternal.Serialization.cs @@ -247,7 +247,7 @@ protected virtual CloudEventInternal PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCloudEventInternal(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridNamespacesClientOptions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridNamespacesClientOptions.cs new file mode 100644 index 000000000000..f655a026d102 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/EventGridNamespacesClientOptions.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.Namespaces +{ + internal partial class EventGridNamespacesClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_06_01; + + /// Initializes a new instance of EventGridSenderClientOptions. + /// The service version. + public EventGridNamespacesClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_11_01 => "2023-11-01", + ServiceVersion.V2024_06_01 => "2024-06-01", + _ => throw new NotSupportedException() + }; + } + + /// Gets the Version. + internal string Version { get; } + + internal enum ServiceVersion + { + /// V2023_11_01. + V2023_11_01 = 1, + /// V2024_06_01. + V2024_06_01 = 2 + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/FailedLockToken.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/FailedLockToken.Serialization.cs index cb290505ce60..3eb050047d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/FailedLockToken.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/FailedLockToken.Serialization.cs @@ -137,7 +137,7 @@ protected virtual FailedLockToken PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFailedLockToken(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/CodeGenSerializationAttribute.cs index 351b13a684e5..0a9ec09718ec 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/PublishResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/PublishResult.Serialization.cs index 9b11cdbefd4f..06427da2fd7d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/PublishResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/PublishResult.Serialization.cs @@ -114,7 +114,7 @@ protected virtual PublishResult PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePublishResult(document.RootElement, options); } @@ -129,7 +129,7 @@ protected virtual PublishResult PersistableModelCreateCore(BinaryData data, Mode /// The to deserialize the from. public static explicit operator PublishResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePublishResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveDetails.Serialization.cs index 6a2f10189713..f0ac1b565f72 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveDetails.Serialization.cs @@ -136,7 +136,7 @@ protected virtual ReceiveDetails PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReceiveDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveResult.Serialization.cs index 3545fb548270..fe985e2458e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReceiveResult.Serialization.cs @@ -136,7 +136,7 @@ protected virtual ReceiveResult PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReceiveResult(document.RootElement, options); } @@ -151,7 +151,7 @@ protected virtual ReceiveResult PersistableModelCreateCore(BinaryData data, Mode /// The to deserialize the from. public static explicit operator ReceiveResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeReceiveResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectRequest.Serialization.cs index 6c857782d32d..3514d609fe40 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectRequest.Serialization.cs @@ -150,7 +150,7 @@ protected virtual RejectRequest PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRejectRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectResult.Serialization.cs index 89644b5de327..f0b822a3411b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RejectResult.Serialization.cs @@ -169,7 +169,7 @@ protected virtual RejectResult PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRejectResult(document.RootElement, options); } @@ -184,7 +184,7 @@ protected virtual RejectResult PersistableModelCreateCore(BinaryData data, Model /// The to deserialize the from. public static explicit operator RejectResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRejectResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseRequest.Serialization.cs index 5547f1d6c17c..96ac718d74d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseRequest.Serialization.cs @@ -150,7 +150,7 @@ protected virtual ReleaseRequest PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReleaseRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseResult.Serialization.cs index b5dd6748eca1..44608197a2f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/ReleaseResult.Serialization.cs @@ -169,7 +169,7 @@ protected virtual ReleaseResult PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReleaseResult(document.RootElement, options); } @@ -184,7 +184,7 @@ protected virtual ReleaseResult PersistableModelCreateCore(BinaryData data, Mode /// The to deserialize the from. public static explicit operator ReleaseResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeReleaseResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksRequest.Serialization.cs index 997ee0657448..badbba8f7f16 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksRequest.Serialization.cs @@ -150,7 +150,7 @@ protected virtual RenewLocksRequest PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRenewLocksRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksResult.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksResult.Serialization.cs index 9150d998e02c..e1eb5d75b1f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksResult.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/RenewLocksResult.Serialization.cs @@ -169,7 +169,7 @@ protected virtual RenewLocksResult PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRenewLocksResult(document.RootElement, options); } @@ -184,7 +184,7 @@ protected virtual RenewLocksResult PersistableModelCreateCore(BinaryData data, M /// The to deserialize the from. public static explicit operator RenewLocksResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRenewLocksResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs index ba46e8a97da0..cc5175458343 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs @@ -155,7 +155,7 @@ protected virtual AcsCallEndReasonProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallEndReasonProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs index a76325ed1f7f..0d96d6485be8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs @@ -150,7 +150,7 @@ protected virtual AcsCallEndedByProperties PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallEndedByProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs index c6a25392d106..45ba905c7b2d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs @@ -221,7 +221,7 @@ protected override AcsCallingEventProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallEndedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs index 8063effbb88f..db805a063442 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs @@ -125,7 +125,7 @@ protected virtual AcsCallGroupProperties PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallGroupProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs index 6e222aa27755..278d4951b4e4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected override AcsCallingEventProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallParticipantAddedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventData.Serialization.cs index 09bea4ae3690..c5a91ec78134 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventData.Serialization.cs @@ -225,7 +225,7 @@ protected override AcsCallingEventProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallParticipantEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs index bcef549c5835..9368811ef1dc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs @@ -144,7 +144,7 @@ protected virtual AcsCallParticipantProperties PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallParticipantProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs index d3e8fbdd40a9..067f228ace48 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected override AcsCallingEventProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallParticipantRemovedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs index d3e44eb3d955..a77c8535c8e2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs @@ -125,7 +125,7 @@ protected virtual AcsCallRoomProperties PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallRoomProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs index e06ca5895860..3607942c2a4c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs @@ -173,7 +173,7 @@ protected override AcsCallingEventProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs index 0de8b197c621..2b87fa0aec4b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs @@ -211,7 +211,7 @@ protected virtual AcsCallingEventProperties PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsCallingEventProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs index 19508882136b..cdecb0bf533f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs @@ -220,7 +220,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs index 0d4e203c07b0..d6e1d9f38676 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs @@ -146,7 +146,7 @@ protected virtual AcsChatEventBaseProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatEventBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs index 0e3b8a8a6acd..ad8673582682 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs @@ -138,7 +138,7 @@ protected virtual AcsChatEventInThreadBaseProperties PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatEventInThreadBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs index 4ce861039060..607f73e5f071 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.Serialization.cs @@ -195,7 +195,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs index 7d3d36b76b54..51f9b8d5fd68 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -188,7 +188,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageDeletedInThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs index deca99c510e7..7b5902586916 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs @@ -243,7 +243,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageEditedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs index 5197321b5c84..9f6cbc34b1ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -236,7 +236,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageEditedInThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs index a5073d61c2ce..55a34258b6d5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs @@ -198,7 +198,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageEventBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index d3461e1ec430..8398510b5ad9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -191,7 +191,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageEventInThreadBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs index 3229dd32a01d..0e880e774776 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs @@ -227,7 +227,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 6ab358c0cfe1..5ba01db57498 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -220,7 +220,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatMessageReceivedInThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs index d6846be80f8d..2bb7386eda3d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -172,7 +172,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatParticipantAddedToThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index b2a9bcbc1ef8..ddc63ed539c6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -185,7 +185,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatParticipantAddedToThreadWithUserEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index 8b7a0c0fb389..e238facf84e4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -172,7 +172,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatParticipantRemovedFromThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index d31516efe8d8..7448cd71bdf5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -185,7 +185,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatParticipantRemovedFromThreadWithUserEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs index 91b0c128186b..a13aa8615962 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs @@ -246,7 +246,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs index 5c3fafe1f5d8..79927594f5b8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -253,7 +253,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadCreatedWithUserEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs index 78ab6ce9d638..88a3eb9bbda4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.Serialization.cs @@ -169,7 +169,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs index eec8c161b58e..ea9c027652be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.Serialization.cs @@ -159,7 +159,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadEventBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs index 1ca21ebb524d..7de8c806b08a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.Serialization.cs @@ -147,7 +147,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadEventInThreadBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs index b98078762489..e53e87d7cd69 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs @@ -176,7 +176,7 @@ protected virtual AcsChatThreadParticipantProperties PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadParticipantProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 639093ea8e19..3832f69ab91e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -236,7 +236,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadPropertiesUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 84c93bcb9ee6..1cfa5738c3f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -247,7 +247,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadPropertiesUpdatedPerUserEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs index 8c27dcb9cf44..83b91355c68d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -176,7 +176,7 @@ protected override AcsChatEventBaseProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatThreadWithUserDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs index 67bd88283ec0..2d5a11d9c144 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs @@ -220,7 +220,7 @@ protected override AcsChatEventInThreadBaseProperties PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 52360e0993b8..cdb2044afdd9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -202,7 +202,7 @@ protected virtual AcsEmailDeliveryReportReceivedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsEmailDeliveryReportReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs index cb0992722e64..2643c4b17bb8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailDeliveryReportStatusDetails.Serialization.cs @@ -136,7 +136,7 @@ protected virtual AcsEmailDeliveryReportStatusDetails PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsEmailDeliveryReportStatusDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs index e6fd6d3712e0..390537f1a0de 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs @@ -209,7 +209,7 @@ protected virtual AcsEmailEngagementTrackingReportReceivedEventData PersistableM switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsEmailEngagementTrackingReportReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs index 2730a81b4c5f..5a8afd3b0974 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallCustomContext.Serialization.cs @@ -182,7 +182,7 @@ protected virtual AcsIncomingCallCustomContext PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsIncomingCallCustomContext(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs index a59b8313b30e..70f0a405a29b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsIncomingCallEventData.Serialization.cs @@ -213,7 +213,7 @@ protected virtual AcsIncomingCallEventData PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsIncomingCallEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs index 311bcac3f945..5f2f4bc442a6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageButtonContent.Serialization.cs @@ -136,7 +136,7 @@ protected virtual AcsMessageButtonContent PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageButtonContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs index 292c3b20d842..0ce9538a68e8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageChannelEventError.Serialization.cs @@ -135,7 +135,7 @@ protected virtual AcsMessageChannelEventError PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageChannelEventError(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs index f8e936216310..cb36cfe77c69 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageContext.Serialization.cs @@ -136,7 +136,7 @@ protected virtual AcsMessageContext PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageContext(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs index a5a0a4455fd6..6cb27f838303 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageDeliveryStatusUpdatedEventData.Serialization.cs @@ -188,7 +188,7 @@ protected override AcsMessageEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageDeliveryStatusUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs index 1e4d26b5a795..fefbb509f684 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageEventData.Serialization.cs @@ -167,7 +167,7 @@ protected virtual AcsMessageEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs index 1ef6350b31c7..a7a38f8a45a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveButtonReplyContent.Serialization.cs @@ -136,7 +136,7 @@ protected virtual AcsMessageInteractiveButtonReplyContent PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageInteractiveButtonReplyContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs index ee08522a5fe1..9524e27f38ac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveContent.Serialization.cs @@ -159,7 +159,7 @@ protected virtual AcsMessageInteractiveContent PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageInteractiveContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs index 6de13728401e..494d42264fe7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageInteractiveListReplyContent.Serialization.cs @@ -147,7 +147,7 @@ protected virtual AcsMessageInteractiveListReplyContent PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageInteractiveListReplyContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs index 3f763dd143bf..cbde6e4008f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageMediaContent.Serialization.cs @@ -178,7 +178,7 @@ protected virtual AcsMessageMediaContent PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageMediaContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReactionContent.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReactionContent.Serialization.cs index aee955afd2bb..e431cf55489b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReactionContent.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReactionContent.Serialization.cs @@ -138,7 +138,7 @@ protected virtual AcsMessageReactionContent PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageReactionContent(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs index 5489506f67f1..645415f1e7e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMessageReceivedEventData.Serialization.cs @@ -273,7 +273,7 @@ protected override AcsMessageEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMessageReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMicrosoftTeamsAppIdentifier.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMicrosoftTeamsAppIdentifier.Serialization.cs index 316bd95c81c0..9aefb559f69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMicrosoftTeamsAppIdentifier.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsMicrosoftTeamsAppIdentifier.Serialization.cs @@ -142,7 +142,7 @@ protected virtual AcsMicrosoftTeamsAppIdentifier PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsMicrosoftTeamsAppIdentifier(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs index ba7e735ebabe..28f73732b00e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingChunkInfoProperties.Serialization.cs @@ -191,7 +191,7 @@ protected virtual AcsRecordingChunkInfoProperties PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRecordingChunkInfoProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index 2d9c0df27a35..8ebff125a7d5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -223,7 +223,7 @@ protected virtual AcsRecordingFileStatusUpdatedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRecordingFileStatusUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs index 5c1996a14625..fb3b68b95e6b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs @@ -135,7 +135,7 @@ protected virtual AcsRecordingStorageInfoProperties PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRecordingStorageInfoProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs index 43497e4229b6..90e8dae5beaa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterChannelConfiguration.Serialization.cs @@ -155,7 +155,7 @@ protected virtual AcsRouterChannelConfiguration PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterChannelConfiguration(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs index 5acf3411d818..18c90fa3fc11 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs @@ -186,7 +186,7 @@ protected virtual AcsRouterCommunicationError PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterCommunicationError(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs index 4fcf608bf653..e08b9d0de51b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterEventData.Serialization.cs @@ -149,7 +149,7 @@ protected virtual AcsRouterEventData PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs index 03bbf0eb5b9c..7855e19dc26b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCancelledEventData.Serialization.cs @@ -193,7 +193,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobCancelledEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs index 38b5169ad869..8942d2b30c7c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -203,7 +203,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobClassificationFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs index ddd2e8f27499..4f3c8906aa8c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs @@ -233,7 +233,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobClassifiedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs index 2a3ff7850649..f36c73a50740 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClosedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobClosedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs index 643e076c3374..bdb50178cb78 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobCompletedEventData.Serialization.cs @@ -193,7 +193,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs index d1e49ecf2b63..8d004ab7714f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobDeletedEventData.Serialization.cs @@ -169,7 +169,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs index 4c61475951dd..9beb6baf8e08 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobEventData.Serialization.cs @@ -206,7 +206,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index a683d686376b..6ed8f8f29805 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -193,7 +193,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobExceptionTriggeredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs index 732c83ca0c35..d26e82e5b11b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs @@ -229,7 +229,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobQueuedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs index e40a2e8c0f5c..28c6e4afae1d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs @@ -265,7 +265,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs index b3eca73a29c8..6cac37fcfa05 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -257,7 +257,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobSchedulingFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs index a5fa109a42d1..c09e6bf12553 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobUnassignedEventData.Serialization.cs @@ -193,7 +193,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobUnassignedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs index 9b06d9030228..e61a99ef7924 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -259,7 +259,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobWaitingForActivationEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 01dadfcc3771..4e37dc1689aa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -213,7 +213,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterJobWorkerSelectorsExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs index 1d7175c187d1..bb2c9bdf7dac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterQueueDetails.Serialization.cs @@ -170,7 +170,7 @@ protected virtual AcsRouterQueueDetails PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterQueueDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs index fd4a221d6108..f37ba1aac60d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeletedEventData.Serialization.cs @@ -126,7 +126,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs index 6b6de1030c77..6e2369a4d3a9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerDeregisteredEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual AcsRouterWorkerDeregisteredEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerDeregisteredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs index 44966f4f42d1..14cfd99d1da6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerEventData.Serialization.cs @@ -131,7 +131,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs index 9084921d3bd8..db9840bcc1d9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferAcceptedEventData.Serialization.cs @@ -323,7 +323,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerOfferAcceptedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs index 0367b1431cf8..9102c5661a6d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferDeclinedEventData.Serialization.cs @@ -155,7 +155,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerOfferDeclinedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs index e1cb5298fa84..6d19929b0a89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferExpiredEventData.Serialization.cs @@ -155,7 +155,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerOfferExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs index 8773e20fa70a..49102fe1b211 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferIssuedEventData.Serialization.cs @@ -343,7 +343,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerOfferIssuedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs index 50a659f0e64a..f56c5ad65a24 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerOfferRevokedEventData.Serialization.cs @@ -155,7 +155,7 @@ protected override AcsRouterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerOfferRevokedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs index c3c04bdce78e..be00eea93c0c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -259,7 +259,7 @@ protected virtual AcsRouterWorkerRegisteredEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerRegisteredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs index e9f11065cfbc..32f080b4f2cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerSelector.Serialization.cs @@ -198,7 +198,7 @@ protected virtual AcsRouterWorkerSelector PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerSelector(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs index 5e4233984c05..39b8f79d1e63 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs @@ -281,7 +281,7 @@ protected virtual AcsRouterWorkerUpdatedEventData PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsRouterWorkerUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs index 9a1808933371..5a6ea174a5e2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryAttemptProperties.Serialization.cs @@ -159,7 +159,7 @@ protected virtual AcsSmsDeliveryAttemptProperties PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsSmsDeliveryAttemptProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 3ae840c7209f..7dd83bef7195 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -197,7 +197,7 @@ protected override AcsSmsEventBaseProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsSmsDeliveryReportReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs index 15627fa01723..ca72db0666c4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs @@ -143,7 +143,7 @@ protected virtual AcsSmsEventBaseProperties PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsSmsEventBaseProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs index f213c24ced1f..c6cb7d27e30a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs @@ -163,7 +163,7 @@ protected override AcsSmsEventBaseProperties PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsSmsReceivedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs index d711d3c7c20a..ecddb88e2997 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsUserDisconnectedEventData.Serialization.cs @@ -129,7 +129,7 @@ protected virtual AcsUserDisconnectedEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAcsUserDisconnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs index ed051d360cf9..d6829da09ba9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionAddedEventData.Serialization.cs @@ -155,7 +155,7 @@ protected virtual ApiCenterApiDefinitionAddedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiCenterApiDefinitionAddedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs index 4cfad08a7e6d..9bb232c3cccb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiDefinitionUpdatedEventData.Serialization.cs @@ -155,7 +155,7 @@ protected virtual ApiCenterApiDefinitionUpdatedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiCenterApiDefinitionUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs index 676408f55fcd..4c8324005eea 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiCenterApiSpecification.Serialization.cs @@ -138,7 +138,7 @@ protected virtual ApiCenterApiSpecification PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiCenterApiSpecification(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs index d0a28d18dde9..962b4f276cf6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiCreatedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs index d0fe2db1c63c..27c48f114bd8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiDeletedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs index 403055b9c935..975bd81234aa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiReleaseCreatedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiReleaseCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs index 4c8925fcf347..a15a8811d2d1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiReleaseDeletedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiReleaseDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs index 887dcc24cede..988e8061fb0f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiReleaseUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiReleaseUpdatedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiReleaseUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs index 127d016845df..c1de339db088 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementApiUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementApiUpdatedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementApiUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs index f12028a03186..192387f1ec0f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ApiManagementCircuitBreakerClosedEventData PersistableModelCre switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs index 80632b4db5cb..07d7f752b826 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ApiManagementCircuitBreakerOpenedEventData PersistableModelCre switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs index 562f67d8e6a7..b6873e161d89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -150,7 +150,7 @@ protected virtual ApiManagementCircuitBreakerProperties PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs index ffe057306261..6ef0fef6f2f2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -129,7 +129,7 @@ protected virtual ApiManagementExpiredGatewayTokenProperties PersistableModelCre switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs index cf6ccb07fa16..a75009dac207 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiAddedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayApiAddedEventData PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayApiAddedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs index 2f0f469d2e20..a3757da26e41 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayApiRemovedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayApiRemovedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayApiRemovedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs index dc6d5333c123..e369d2b49215 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayCertificateAuthorityCreatedEventData Persi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayCertificateAuthorityCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs index 85a528896821..7c812dea65c9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayCertificateAuthorityDeletedEventData Persi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayCertificateAuthorityDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs index 2613439f4525..03e7cf2714b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCertificateAuthorityUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayCertificateAuthorityUpdatedEventData Persi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayCertificateAuthorityUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs index e41aa6576264..a1e9a90b34d7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayCreatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs index 32c3dd02d4a7..10af101ab78e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayDeletedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs index 2dd2c21692af..a1a89bad9c4e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayHostnameConfigurationCreatedEventData Pers switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayHostnameConfigurationCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs index b8be25ceb7c5..36b0e873fa55 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayHostnameConfigurationDeletedEventData Pers switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayHostnameConfigurationDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs index a534f45c1290..6f12cd504183 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayHostnameConfigurationUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayHostnameConfigurationUpdatedEventData Pers switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayHostnameConfigurationUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs index bd038e239644..20cf221ec728 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs @@ -135,7 +135,7 @@ protected virtual ApiManagementGatewayProperties PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs index fda9ccbd5a5e..be93ce8a6570 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ApiManagementGatewayTokenExpiredEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs index da19d7da06e2..4ab3a48a1e18 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ApiManagementGatewayTokenNearExpiryEventData PersistableModelC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs index 1d94f4bd831c..b77c0336e8d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -129,7 +129,7 @@ protected virtual ApiManagementGatewayTokenNearExpiryProperties PersistableModel switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs index 6f8214efd254..322893058584 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementGatewayUpdatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementGatewayUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs index cf91826120fc..25e75dfbda2c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementProductCreatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementProductCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs index 427e6ab47d3c..d8890057bfde 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementProductDeletedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementProductDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs index 102ffac3311a..907312b9b7b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementProductUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementProductUpdatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementProductUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs index 30b5c52f6d0e..fbf6709c97f0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementSubscriptionCreatedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementSubscriptionCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs index a99f0f71c47a..ba01649f37af 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementSubscriptionDeletedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementSubscriptionDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs index fd5bafeadeda..9beb2b259cd1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementSubscriptionUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementSubscriptionUpdatedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementSubscriptionUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs index 8a1b971c6f18..0e2fee660de0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserCreatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementUserCreatedEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementUserCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs index f2fba53cfcef..f6f28498b690 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserDeletedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementUserDeletedEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementUserDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs index 691e74da9514..27a44fb6165f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementUserUpdatedEventData.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ApiManagementUserUpdatedEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeApiManagementUserUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index c32a5b7a773a..66a5f96daf01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -153,7 +153,7 @@ protected virtual AppConfigurationKeyValueDeletedEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppConfigurationKeyValueDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index b2c1503ba92f..be8ebab22383 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -165,7 +165,7 @@ protected virtual AppConfigurationKeyValueModifiedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppConfigurationKeyValueModifiedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs index aeb80426cfea..1ebfa0fa6790 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override AppConfigurationSnapshotEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppConfigurationSnapshotCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index c92d864c4d16..21e220562917 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -145,7 +145,7 @@ protected virtual AppConfigurationSnapshotEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppConfigurationSnapshotEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs index 50a9c7bcfe18..eb63ce86e129 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override AppConfigurationSnapshotEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppConfigurationSnapshotModifiedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs index ab5ffec4dede..48be92d357d5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppEventTypeDetail.Serialization.cs @@ -129,7 +129,7 @@ protected virtual AppEventTypeDetail PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppEventTypeDetail(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs index e115f9e45e71..0916a2bec881 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppServicePlanEventTypeDetail.Serialization.cs @@ -159,7 +159,7 @@ protected virtual AppServicePlanEventTypeDetail PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAppServicePlanEventTypeDetail(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs index e816ffc730ff..e66cd0b7ef21 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterCreatedEventData.Serialization.cs @@ -179,7 +179,7 @@ protected override AvsClusterEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs index e0d4f8db66bc..cca6fdd5efc4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterDeletedEventData.Serialization.cs @@ -179,7 +179,7 @@ protected override AvsClusterEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs index 71491c0ac344..c2f6dbd4c75c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs @@ -240,7 +240,7 @@ protected virtual AvsClusterEventData PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs index 5a44d12ea40d..dcf2977d6590 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterFailedEventData.Serialization.cs @@ -196,7 +196,7 @@ protected override AvsClusterEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs index 7a69793d6793..9b457613f2c4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatedEventData.Serialization.cs @@ -179,7 +179,7 @@ protected override AvsClusterEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs index 3a31625fd02e..26cfab3e7ebb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterUpdatingEventData.Serialization.cs @@ -179,7 +179,7 @@ protected override AvsClusterEventData PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsClusterUpdatingEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs index 1409727843d8..50585ff68711 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudEventData.Serialization.cs @@ -129,7 +129,7 @@ protected virtual AvsPrivateCloudEventData PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsPrivateCloudEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs index e2e12a21d1a2..cb04157510cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudFailedEventData.Serialization.cs @@ -124,7 +124,7 @@ protected override AvsPrivateCloudEventData PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsPrivateCloudFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs index 6b9b957acb5a..7ccf4fd08bf6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatedEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override AvsPrivateCloudEventData PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsPrivateCloudUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs index e72734d3b2bc..a9484e0c0ba9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsPrivateCloudUpdatingEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override AvsPrivateCloudEventData PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsPrivateCloudUpdatingEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs index 061e8947e9e9..cef2e067febc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionCancelledEventData.Serialization.cs @@ -141,7 +141,7 @@ protected override AvsScriptExecutionEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsScriptExecutionCancelledEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs index e37083322786..091a90621f3e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs @@ -174,7 +174,7 @@ protected virtual AvsScriptExecutionEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsScriptExecutionEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs index 3f1f06e0a6ed..d99c007c32b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFailedEventData.Serialization.cs @@ -152,7 +152,7 @@ protected override AvsScriptExecutionEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsScriptExecutionFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs index 5aa3c921b435..ae7939d663e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionFinishedEventData.Serialization.cs @@ -175,7 +175,7 @@ protected override AvsScriptExecutionEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsScriptExecutionFinishedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs index 37460a4126df..be651370dc20 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionStartedEventData.Serialization.cs @@ -141,7 +141,7 @@ protected override AvsScriptExecutionEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeAvsScriptExecutionStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs index 2ab7c7b34948..30051b505448 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs @@ -202,7 +202,7 @@ protected virtual CommunicationIdentifierModel PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCommunicationIdentifierModel(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs index 3e24a70a7e5d..032f5ae13910 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationUserIdentifierModel.Serialization.cs @@ -127,7 +127,7 @@ protected virtual CommunicationUserIdentifierModel PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCommunicationUserIdentifierModel(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs index 655368542a5f..d1e628101e0d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventData.Serialization.cs @@ -190,7 +190,7 @@ protected virtual ContainerRegistryArtifactEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryArtifactEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs index f9b4820e550a..ee1f5269eb23 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryArtifactEventTarget.Serialization.cs @@ -202,7 +202,7 @@ protected virtual ContainerRegistryArtifactEventTarget PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryArtifactEventTarget(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs index 4d127e79f796..8add4d38c87b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartDeletedEventData.Serialization.cs @@ -158,7 +158,7 @@ protected override ContainerRegistryArtifactEventData PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryChartDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs index 4fbedbb89a40..5f6d63c1d6d1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryChartPushedEventData.Serialization.cs @@ -158,7 +158,7 @@ protected override ContainerRegistryArtifactEventData PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryChartPushedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs index 412241106c65..7771e25c3ff7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventActor.Serialization.cs @@ -125,7 +125,7 @@ protected virtual ContainerRegistryEventActor PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventActor(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs index af65d1f9e5e8..cfb8187d6a78 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventConnectedRegistry.Serialization.cs @@ -127,7 +127,7 @@ protected virtual ContainerRegistryEventConnectedRegistry PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventConnectedRegistry(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs index dd4215662539..92a93eb974d6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventData.Serialization.cs @@ -238,7 +238,7 @@ protected virtual ContainerRegistryEventData PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs index d264a3e2417a..19cb6f571af1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventRequest.Serialization.cs @@ -171,7 +171,7 @@ protected virtual ContainerRegistryEventRequest PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs index 79bda1c8e6f5..9a1dbd98a353 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventSource.Serialization.cs @@ -136,7 +136,7 @@ protected virtual ContainerRegistryEventSource PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventSource(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs index bd3a74524556..b24cb4c41441 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryEventTarget.Serialization.cs @@ -206,7 +206,7 @@ protected virtual ContainerRegistryEventTarget PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryEventTarget(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs index 3271d66063c2..a235c5adc673 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImageDeletedEventData.Serialization.cs @@ -191,7 +191,7 @@ protected override ContainerRegistryEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryImageDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs index 9125013dade1..44dccad4da13 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerRegistryImagePushedEventData.Serialization.cs @@ -191,7 +191,7 @@ protected override ContainerRegistryEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerRegistryImagePushedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs index f0529f3f3162..629a8bca1ba4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override ContainerServiceClusterSupportEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceClusterSupportEndedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs index d96a9bcfc468..14ad81ec0228 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override ContainerServiceClusterSupportEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceClusterSupportEndingEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index 2497b96be8f0..81ff173ac819 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -129,7 +129,7 @@ protected virtual ContainerServiceClusterSupportEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceClusterSupportEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index b03a99d68cc9..ac9f9cbda5ab 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -156,7 +156,7 @@ protected virtual ContainerServiceNewKubernetesVersionAvailableEventData Persist switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceNewKubernetesVersionAvailableEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index 5939b82bffd9..750e128d5c01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -129,7 +129,7 @@ protected virtual ContainerServiceNodePoolRollingEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceNodePoolRollingEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs index 7623500c8006..7bdef297cb49 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override ContainerServiceNodePoolRollingEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceNodePoolRollingFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs index e17e54c68570..00a1708daff8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override ContainerServiceNodePoolRollingEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceNodePoolRollingStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs index d4c41f2f1def..eb475e8704d1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.Serialization.cs @@ -113,7 +113,7 @@ protected override ContainerServiceNodePoolRollingEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeContainerServiceNodePoolRollingSucceededEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs index 7a8e7aab60e4..92cc95f060c2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyCompletedEventData.Serialization.cs @@ -159,7 +159,7 @@ protected virtual DataBoxCopyCompletedEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDataBoxCopyCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs index 7363053a1466..03a45d0eaaca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxCopyStartedEventData.Serialization.cs @@ -159,7 +159,7 @@ protected virtual DataBoxCopyStartedEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDataBoxCopyStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs index da4c44796112..f6ea10f98582 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DataBoxOrderCompletedEventData.Serialization.cs @@ -159,7 +159,7 @@ protected virtual DataBoxOrderCompletedEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDataBoxOrderCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs index c8edf2419943..848bccebb701 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventInfo.Serialization.cs @@ -127,7 +127,7 @@ protected virtual DeviceConnectionStateEventInfo PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceConnectionStateEventInfo(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs index af3b5f172cbd..7f839c281864 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceConnectionStateEventProperties.Serialization.cs @@ -154,7 +154,7 @@ protected virtual DeviceConnectionStateEventProperties PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceConnectionStateEventProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs index ea890910e472..446d59ea1ff8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceLifeCycleEventProperties.Serialization.cs @@ -143,7 +143,7 @@ protected virtual DeviceLifeCycleEventProperties PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceLifeCycleEventProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs index 5ac57dd60f69..e082bef4b4c0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTelemetryEventProperties.Serialization.cs @@ -195,7 +195,7 @@ protected virtual DeviceTelemetryEventProperties PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTelemetryEventProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs index e2185d2dd2ef..bb7a0041eb16 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfo.Serialization.cs @@ -233,7 +233,7 @@ protected virtual DeviceTwinInfo PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTwinInfo(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs index 10e828dbf0d6..b2ecdb2fa86a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoProperties.Serialization.cs @@ -135,7 +135,7 @@ protected virtual DeviceTwinInfoProperties PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTwinInfoProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs index 6d172302d41b..d5e4769391fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinInfoX509Thumbprint.Serialization.cs @@ -135,7 +135,7 @@ protected virtual DeviceTwinInfoX509Thumbprint PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTwinInfoX509Thumbprint(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs index 51e44653d4b2..1f86750073fd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinMetadata.Serialization.cs @@ -127,7 +127,7 @@ protected virtual DeviceTwinMetadata PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTwinMetadata(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs index 46f7872de3a2..85e36666ed71 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/DeviceTwinProperties.Serialization.cs @@ -142,7 +142,7 @@ protected virtual DeviceTwinProperties PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeviceTwinProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs index f2e3e63caf6d..bb9a2ed485b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -185,7 +185,7 @@ protected virtual EdgeSolutionVersionPublishedEventData PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs index 881cadd4f459..7cba02497a67 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientCreatedOrUpdatedEventData.Serialization.cs @@ -212,7 +212,7 @@ protected override EventGridMqttClientEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventGridMqttClientCreatedOrUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs index de96840c38ca..0679003ef6be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientDeletedEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override EventGridMqttClientEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventGridMqttClientDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs index 79f3a1a396e5..127a25ab2e59 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientEventData.Serialization.cs @@ -148,7 +148,7 @@ protected virtual EventGridMqttClientEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventGridMqttClientEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs index a8e2ffa3f46a..566775c0c17f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionConnectedEventData.Serialization.cs @@ -154,7 +154,7 @@ protected override EventGridMqttClientEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventGridMqttClientSessionConnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs index 658bfd26a5f6..430992935f2e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridMqttClientSessionDisconnectedEventData.Serialization.cs @@ -170,7 +170,7 @@ protected override EventGridMqttClientEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventGridMqttClientSessionDisconnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 2f4ce6990159..ec623675adce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -245,7 +245,7 @@ protected virtual EventHubCaptureFileCreatedEventData PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeEventHubCaptureFileCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs index 14b9deb406c1..231116552774 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageCreatedEventData.Serialization.cs @@ -183,7 +183,7 @@ protected virtual HealthcareDicomImageCreatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareDicomImageCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs index bc06662b530b..df39f9a1a844 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageDeletedEventData.Serialization.cs @@ -183,7 +183,7 @@ protected virtual HealthcareDicomImageDeletedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareDicomImageDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs index 74909c315f06..89f94a68dae4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareDicomImageUpdatedEventData.Serialization.cs @@ -183,7 +183,7 @@ protected virtual HealthcareDicomImageUpdatedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareDicomImageUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs index 4eea8ac3841a..cc890c5edb1e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceCreatedEventData.Serialization.cs @@ -167,7 +167,7 @@ protected virtual HealthcareFhirResourceCreatedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareFhirResourceCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs index 208d64798455..03c6614e62e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceDeletedEventData.Serialization.cs @@ -167,7 +167,7 @@ protected virtual HealthcareFhirResourceDeletedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareFhirResourceDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs index f05cb5937fd8..f62b0d73ef2a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/HealthcareFhirResourceUpdatedEventData.Serialization.cs @@ -167,7 +167,7 @@ protected virtual HealthcareFhirResourceUpdatedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeHealthcareFhirResourceUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/Internal/CodeGenSerializationAttribute.cs index 3b75b8f69e7f..0f372105349c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs index c39ed3293c6e..dd3de0aa4714 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceConnectedEventData.Serialization.cs @@ -131,7 +131,7 @@ protected override DeviceConnectionStateEventProperties PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIotHubDeviceConnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs index a7c6f46323ae..c20ff6a94af4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceCreatedEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override DeviceLifeCycleEventProperties PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIotHubDeviceCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs index ab886b7eb594..0d08e777f6c3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDeletedEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override DeviceLifeCycleEventProperties PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIotHubDeviceDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs index 1f9d75ca83ea..68d3128fa5a9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceDisconnectedEventData.Serialization.cs @@ -131,7 +131,7 @@ protected override DeviceConnectionStateEventProperties PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIotHubDeviceDisconnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs index 9498e605b4db..036a845c7889 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/IotHubDeviceTelemetryEventData.Serialization.cs @@ -149,7 +149,7 @@ protected override DeviceTelemetryEventProperties PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeIotHubDeviceTelemetryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs index c14eca48b2fe..0a57f551faa5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultAccessPolicyChangedEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultAccessPolicyChangedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultAccessPolicyChangedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs index 4f3757ef13d7..53ec990e794a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateExpiredEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultCertificateExpiredEventData PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultCertificateExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs index 06d152a1b341..1aa0db2e85c9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNearExpiryEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultCertificateNearExpiryEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultCertificateNearExpiryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs index c1785bf21773..1a35d732e800 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultCertificateNewVersionCreatedEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultCertificateNewVersionCreatedEventData PersistableModel switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultCertificateNewVersionCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs index 1bcd25409889..641df34593c1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyExpiredEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultKeyExpiredEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultKeyExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs index 72f3717c8eb4..24a676b48394 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNearExpiryEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultKeyNearExpiryEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultKeyNearExpiryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs index d2f8fea1993d..6ac362e82ba8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultKeyNewVersionCreatedEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultKeyNewVersionCreatedEventData PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultKeyNewVersionCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs index 1cb80dadcab8..d6884c323c79 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretExpiredEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultSecretExpiredEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultSecretExpiredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs index 3ba9efd6e86d..13d3d71e6dd7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNearExpiryEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultSecretNearExpiryEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultSecretNearExpiryEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs index f3e46cf88175..381768a51399 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/KeyVaultSecretNewVersionCreatedEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual KeyVaultSecretNewVersionCreatedEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultSecretNewVersionCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index e294998192ad..48424b61e2da 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -217,7 +217,7 @@ protected virtual MachineLearningServicesDatasetDriftDetectedEventData Persistab switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMachineLearningServicesDatasetDriftDetectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index 2b6ceca34675..ff4a384f6925 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -181,7 +181,7 @@ protected virtual MachineLearningServicesModelDeployedEventData PersistableModel switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMachineLearningServicesModelDeployedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 89f32338fc2c..40db79e9009f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -167,7 +167,7 @@ protected virtual MachineLearningServicesModelRegisteredEventData PersistableMod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMachineLearningServicesModelRegisteredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index aba9e0deb0ea..e87fe6630e43 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -190,7 +190,7 @@ protected virtual MachineLearningServicesRunCompletedEventData PersistableModelC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMachineLearningServicesRunCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index b0112d911037..b99ebe6db703 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -199,7 +199,7 @@ protected virtual MachineLearningServicesRunStatusChangedEventData PersistableMo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMachineLearningServicesRunStatusChangedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs index 56c4f61fbbbd..419b2c6dc8e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.Serialization.cs @@ -159,7 +159,7 @@ protected override MapsGeofenceEventProperties PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMapsGeofenceEnteredEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs index 783f91301e6c..a326d60538e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs @@ -216,7 +216,7 @@ protected virtual MapsGeofenceEventProperties PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMapsGeofenceEventProperties(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs index b7f2730cdd6a..ad0d8d8c10fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.Serialization.cs @@ -159,7 +159,7 @@ protected override MapsGeofenceEventProperties PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMapsGeofenceExitedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs index f1c9222a4c84..47832ae59667 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceGeometry.Serialization.cs @@ -198,7 +198,7 @@ protected virtual MapsGeofenceGeometry PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMapsGeofenceGeometry(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs index d598a13a5f65..948310fd2347 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.Serialization.cs @@ -159,7 +159,7 @@ protected override MapsGeofenceEventProperties PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMapsGeofenceResultEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs index a94b874c7a68..06706c8bf606 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MicrosoftTeamsUserIdentifierModel.Serialization.cs @@ -157,7 +157,7 @@ protected virtual MicrosoftTeamsUserIdentifierModel PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMicrosoftTeamsUserIdentifierModel(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs index 43f1b2f1aab4..ed6741c786ca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PhoneNumberIdentifierModel.Serialization.cs @@ -127,7 +127,7 @@ protected virtual PhoneNumberIdentifierModel PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePhoneNumberIdentifierModel(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs index d6da6f1c393d..5ca6d5cd366a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateChangedEventData.Serialization.cs @@ -192,7 +192,7 @@ protected virtual PolicyInsightsPolicyStateChangedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePolicyInsightsPolicyStateChangedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs index 9b260c3f24c9..4a1bfdd34a58 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateCreatedEventData.Serialization.cs @@ -192,7 +192,7 @@ protected virtual PolicyInsightsPolicyStateCreatedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePolicyInsightsPolicyStateCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs index 362fb10bb754..942c98d6c136 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/PolicyInsightsPolicyStateDeletedEventData.Serialization.cs @@ -192,7 +192,7 @@ protected virtual PolicyInsightsPolicyStateDeletedEventData PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePolicyInsightsPolicyStateDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs index db1a45731f43..b1e4394eece3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisExportRdbCompletedEventData.Serialization.cs @@ -153,7 +153,7 @@ protected virtual RedisExportRdbCompletedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRedisExportRdbCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs index 72b6951fd72a..3a7b9f24925a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisImportRdbCompletedEventData.Serialization.cs @@ -153,7 +153,7 @@ protected virtual RedisImportRdbCompletedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRedisImportRdbCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs index 414b6369f250..75234eb4f4f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisPatchingCompletedEventData.Serialization.cs @@ -153,7 +153,7 @@ protected virtual RedisPatchingCompletedEventData PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRedisPatchingCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs index 4594264bab71..e0198a2b64da 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/RedisScalingCompletedEventData.Serialization.cs @@ -153,7 +153,7 @@ protected virtual RedisScalingCompletedEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRedisScalingCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs index eaf2b196a84e..ec785ae70e29 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionCancelEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceActionCancelEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceActionCancelEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs index ef87ceb492a9..0c418ef23d71 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionFailureEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceActionFailureEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceActionFailureEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs index 39519f09dd1a..bf99fc2f1a20 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceActionSuccessEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceActionSuccessEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceActionSuccessEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs index 16787e70cac2..78d22e686313 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceAuthorization.Serialization.cs @@ -170,7 +170,7 @@ protected virtual ResourceAuthorization PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceAuthorization(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs index 5a29a43add80..46d8268a5986 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteCancelEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceDeleteCancelEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceDeleteCancelEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs index 32f4f29a707b..188a09fbaafd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteFailureEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceDeleteFailureEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceDeleteFailureEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs index 167eaa825742..56003815116e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceDeleteSuccessEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceDeleteSuccessEventData PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceDeleteSuccessEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs index 953d2af955ce..7c27f1314f2c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceHttpRequest.Serialization.cs @@ -158,7 +158,7 @@ protected virtual ResourceHttpRequest PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceHttpRequest(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs index e513e32a66dd..a5a120cc8aa6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.Serialization.cs @@ -125,7 +125,7 @@ protected override ResourceNotificationsResourceUpdatedEventData PersistableMode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsContainerServiceEventResourcesScheduledEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs index 27c7717f00ba..fc38b51c4772 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAnnotatedEventData.Serialization.cs @@ -128,7 +128,7 @@ protected override ResourceNotificationsResourceUpdatedEventData PersistableMode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsHealthResourcesAnnotatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs index 8dc57d3e97a6..644f692e257d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData.Serialization.cs @@ -129,7 +129,7 @@ protected override ResourceNotificationsResourceUpdatedEventData PersistableMode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs index b3076d32b6f6..c4a1a039faf9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsOperationalDetails.Serialization.cs @@ -129,7 +129,7 @@ protected virtual ResourceNotificationsOperationalDetails PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsOperationalDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs index 12d7f341dc53..8081c1feb791 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedDetails.Serialization.cs @@ -147,7 +147,7 @@ protected virtual ResourceNotificationsResourceDeletedDetails PersistableModelCr switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceDeletedDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs index 077361abef38..626f4fa3b8ab 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceDeletedEventData.Serialization.cs @@ -140,7 +140,7 @@ protected virtual ResourceNotificationsResourceDeletedEventData PersistableModel switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs index 3dc7d3db106c..b5de0aedb6d8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementCreatedOrUpdatedEventData.Serialization.cs @@ -128,7 +128,7 @@ protected override ResourceNotificationsResourceUpdatedEventData PersistableMode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceManagementCreatedOrUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs index 348497ecd5fd..a5b939ecb2bf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceManagementDeletedEventData.Serialization.cs @@ -122,7 +122,7 @@ protected override ResourceNotificationsResourceDeletedEventData PersistableMode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceManagementDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs index 2fc7ab3a5def..b8b41cd24fe4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedDetails.Serialization.cs @@ -240,7 +240,7 @@ protected virtual ResourceNotificationsResourceUpdatedDetails PersistableModelCr switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceUpdatedDetails(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs index 8c8b1a134af3..b566fee8d945 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsResourceUpdatedEventData.Serialization.cs @@ -145,7 +145,7 @@ protected virtual ResourceNotificationsResourceUpdatedEventData PersistableModel switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceNotificationsResourceUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs index 02b037903436..153108deafb4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteCancelEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceWriteCancelEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceWriteCancelEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs index 782b3612b929..a4c0447b75bc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteFailureEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceWriteFailureEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceWriteFailureEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs index 702cf6b8cb1b..6c850c037adf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceWriteSuccessEventData.Serialization.cs @@ -248,7 +248,7 @@ protected virtual ResourceWriteSuccessEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceWriteSuccessEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs index f079df5e318b..ec9f88eec44d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData.Serialization.cs @@ -212,7 +212,7 @@ protected virtual ServiceBusActiveMessagesAvailablePeriodicNotificationsEventDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeServiceBusActiveMessagesAvailablePeriodicNotificationsEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs index fc502ef34ef8..4dff3cb767e0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusActiveMessagesAvailableWithNoListenersEventData.Serialization.cs @@ -212,7 +212,7 @@ protected virtual ServiceBusActiveMessagesAvailableWithNoListenersEventData Pers switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeServiceBusActiveMessagesAvailableWithNoListenersEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs index 75adfe78363a..d2d93e209d36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData.Serialization.cs @@ -212,7 +212,7 @@ protected virtual ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEven switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs index 0bdff8d11765..d9f4b73cdf81 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ServiceBusDeadletterMessagesAvailableWithNoListenersEventData.Serialization.cs @@ -212,7 +212,7 @@ protected virtual ServiceBusDeadletterMessagesAvailableWithNoListenersEventData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeServiceBusDeadletterMessagesAvailableWithNoListenersEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs index 2da8d8f41cc6..9dba45af1138 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionConnectedEventData.Serialization.cs @@ -163,7 +163,7 @@ protected virtual SignalRServiceClientConnectionConnectedEventData PersistableMo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSignalRServiceClientConnectionConnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs index 3375bbbd1a8d..7279d026f3e8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs @@ -180,7 +180,7 @@ protected virtual SignalRServiceClientConnectionDisconnectedEventData Persistabl switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSignalRServiceClientConnectionDisconnectedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs index 7837888d490c..b39bef81a915 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageAsyncOperationInitiatedEventData.Serialization.cs @@ -243,7 +243,7 @@ protected virtual StorageAsyncOperationInitiatedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageAsyncOperationInitiatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs index 1166c6af1f5f..000b795087db 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobCreatedEventData.Serialization.cs @@ -280,7 +280,7 @@ protected virtual StorageBlobCreatedEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageBlobCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs index ae91b50bb9e1..1a0c3592c054 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobDeletedEventData.Serialization.cs @@ -227,7 +227,7 @@ protected virtual StorageBlobDeletedEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageBlobDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs index a07366734f68..9c4d67379792 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobInventoryPolicyCompletedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual StorageBlobInventoryPolicyCompletedEventData PersistableModelC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageBlobInventoryPolicyCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs index 464929bccc0a..df09a3f275fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobRenamedEventData.Serialization.cs @@ -215,7 +215,7 @@ protected virtual StorageBlobRenamedEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageBlobRenamedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs index 418737a70b50..f7f1beb7f008 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageBlobTierChangedEventData.Serialization.cs @@ -261,7 +261,7 @@ protected virtual StorageBlobTierChangedEventData PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageBlobTierChangedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs index 995704fc18e7..06fe4a12bf34 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryCreatedEventData.Serialization.cs @@ -215,7 +215,7 @@ protected virtual StorageDirectoryCreatedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageDirectoryCreatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs index a26fffb69af0..c768927d3c09 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryDeletedEventData.Serialization.cs @@ -215,7 +215,7 @@ protected virtual StorageDirectoryDeletedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageDirectoryDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs index 6e0f28bf0c16..6e0261f8b93c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageDirectoryRenamedEventData.Serialization.cs @@ -215,7 +215,7 @@ protected virtual StorageDirectoryRenamedEventData PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageDirectoryRenamedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs index 55271ee6b6b6..82f94e86e238 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyActionSummaryDetail.Serialization.cs @@ -155,7 +155,7 @@ protected virtual StorageLifecyclePolicyActionSummaryDetail PersistableModelCrea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageLifecyclePolicyActionSummaryDetail(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs index 259571a0249a..10b2e9fb8cb0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyCompletedEventData.Serialization.cs @@ -179,7 +179,7 @@ protected virtual StorageLifecyclePolicyCompletedEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageLifecyclePolicyCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyRunSummary.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyRunSummary.Serialization.cs index 9f36cbf7a744..7e465351c4f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyRunSummary.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageLifecyclePolicyRunSummary.Serialization.cs @@ -127,7 +127,7 @@ protected virtual StorageLifecyclePolicyRunSummary PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageLifecyclePolicyRunSummary(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs index 4109fb335a56..30b61349c319 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentCompletedEventData.Serialization.cs @@ -187,7 +187,7 @@ protected virtual StorageTaskAssignmentCompletedEventData PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageTaskAssignmentCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs index 459963e74335..87c646a2ab54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskAssignmentQueuedEventData.Serialization.cs @@ -142,7 +142,7 @@ protected virtual StorageTaskAssignmentQueuedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageTaskAssignmentQueuedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs index 210c2b608f39..308ec977440a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskCompletedEventData.Serialization.cs @@ -187,7 +187,7 @@ protected virtual StorageTaskCompletedEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageTaskCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs index 99812c387f56..ed6516662aff 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/StorageTaskQueuedEventData.Serialization.cs @@ -142,7 +142,7 @@ protected virtual StorageTaskQueuedEventData PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStorageTaskQueuedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs index 845f13ee1d58..b2062a69344d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionDeletedEventData.Serialization.cs @@ -132,7 +132,7 @@ protected virtual SubscriptionDeletedEventData PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSubscriptionDeletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs index 00e8ca86f53b..48188f594024 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationEventData.Serialization.cs @@ -137,7 +137,7 @@ protected virtual SubscriptionValidationEventData PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSubscriptionValidationEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs index 8c6c572041e8..9b279c76327b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/SubscriptionValidationResponse.Serialization.cs @@ -129,7 +129,7 @@ protected virtual SubscriptionValidationResponse PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSubscriptionValidationResponse(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs index 9590bf82cb38..4f638a200d2b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventData.Serialization.cs @@ -221,7 +221,7 @@ protected virtual WebAppServicePlanUpdatedEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebAppServicePlanUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs index 97ead36cd844..8cf6d214c9a2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppServicePlanUpdatedEventDataSku.Serialization.cs @@ -175,7 +175,7 @@ protected virtual WebAppServicePlanUpdatedEventDataSku PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebAppServicePlanUpdatedEventDataSku(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs index 9f5d4845511d..b6f386feff10 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebAppUpdatedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebAppUpdatedEventData PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebAppUpdatedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs index 9ab04f309993..83c542af5271 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationCompletedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebBackupOperationCompletedEventData PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebBackupOperationCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs index bac1898a7e76..9a7ad19edd78 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationFailedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebBackupOperationFailedEventData PersistableModelCreateCore(B switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebBackupOperationFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs index 0313261a8fb5..ba4332b9d9eb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebBackupOperationStartedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebBackupOperationStartedEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebBackupOperationStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs index b3a004787da1..051a5b1d33b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationCompletedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebRestoreOperationCompletedEventData PersistableModelCreateCo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebRestoreOperationCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs index 0495484c67f1..0977a68fbc9a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationFailedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebRestoreOperationFailedEventData PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebRestoreOperationFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs index 63286d65f51f..95794f2400c7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebRestoreOperationStartedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebRestoreOperationStartedEventData PersistableModelCreateCore switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebRestoreOperationStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs index 1b3afdbe2db0..1a6cde8a202b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapCompletedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebSlotSwapCompletedEventData PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebSlotSwapCompletedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs index 8ef49785f6c8..e769710a82ff 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapFailedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebSlotSwapFailedEventData PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebSlotSwapFailedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs index 53f51bb920de..33118f8c29a2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapStartedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebSlotSwapStartedEventData PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebSlotSwapStartedEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs index 2049f18a3ef2..f76c265988bc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewCancelledEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebSlotSwapWithPreviewCancelledEventData PersistableModelCreat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebSlotSwapWithPreviewCancelledEventData(document.RootElement, options); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs index bb5606d73e68..1253c70b433e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/WebSlotSwapWithPreviewStartedEventData.Serialization.cs @@ -205,7 +205,7 @@ protected virtual WebSlotSwapWithPreviewStartedEventData PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeWebSlotSwapWithPreviewStartedEventData(document.RootElement, options); } diff --git a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs index 19c1bc24e907..e3b0d6fa622d 100644 --- a/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs +++ b/sdk/extensions/Microsoft.Extensions.Azure/src/Internal/ClientFactory.cs @@ -178,7 +178,7 @@ internal static TokenCredential CreateCredential(IConfiguration configuration) return new WorkloadIdentityCredential(workloadIdentityOptions); } - throw new ArgumentException("For workload identity, 'tenantId', 'clientId', and 'tokenFilePath' must be specified via environment variables or the configuration."); + throw new ArgumentException("For workload identity, 'tenantId', 'clientId', and 'tokenFilePath' must be specified via the configuration."); } if (string.Equals(credentialType, "managedidentityasfederatedidentity", StringComparison.OrdinalIgnoreCase)) @@ -189,7 +189,7 @@ internal static TokenCredential CreateCredential(IConfiguration configuration) string.IsNullOrWhiteSpace(clientId) || string.IsNullOrWhiteSpace(azureCloud)) { - throw new ArgumentException("For managed identity as a federated identity credential, 'tenantId', 'clientId', 'azureCloud', and one of ['managedIdentityClientId', 'resourceId', 'objectId'] must be specified via environment variables or the configuration."); + throw new ArgumentException("For managed identity as a federated identity credential, 'tenantId', 'clientId', 'azureCloud', and one of ['managedIdentityClientId', 'managedIdentityResourceId', 'managedIdentityObjectId'] must be specified via the configuration."); } if (!string.IsNullOrWhiteSpace(resourceId)) @@ -413,8 +413,8 @@ private static void AssertSingleManagedIdentityIdentifier(string clientId, strin idCount += string.IsNullOrWhiteSpace(objectId) ? 0 : 1; var validIdentifiers = isFederated - ? "'clientId', 'managedIdentityClientId', 'managedIdentityResourceId', or 'managedIdentityObjectId'" - : "'managedIdentityClientId', 'managedIdentityResourceId', or 'managedIdentityObjectId'"; + ? "'managedIdentityClientId', 'managedIdentityResourceId', or 'managedIdentityObjectId'" + : "'clientId', 'managedIdentityClientId', 'managedIdentityResourceId', or 'managedIdentityObjectId'"; if (idCount > 1) { @@ -423,7 +423,7 @@ private static void AssertSingleManagedIdentityIdentifier(string clientId, strin if (isFederated && idCount < 1) { - throw new ArgumentException($"At least one of [{validIdentifiers}] must be specified for managed identity."); + throw new ArgumentException($"A clientId and exactly one of [{validIdentifiers}] must be specified for federated managed identity."); } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs index 444c6a022aff..1f1cb4d2cd08 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs @@ -173,7 +173,7 @@ protected virtual DeidentificationContent PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationContent(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs index c016ad044710..0706cda43a21 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationCustomizationOptions.Serialization.cs @@ -147,7 +147,7 @@ protected virtual DeidentificationCustomizationOptions PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationCustomizationOptions(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentDetails.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentDetails.Serialization.cs index 1c88bf48a38e..697692152157 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentDetails.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentDetails.Serialization.cs @@ -184,7 +184,7 @@ protected virtual DeidentificationDocumentDetails PersistableModelCreateCore(Bin switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationDocumentDetails(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentLocation.Serialization.cs index b5d0964663e7..fa3983316bd3 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationDocumentLocation.Serialization.cs @@ -139,7 +139,7 @@ protected virtual DeidentificationDocumentLocation PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationDocumentLocation(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs index d484d8deeb36..ac3ce136f10a 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs @@ -269,7 +269,7 @@ protected virtual DeidentificationJob PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationJob(document.RootElement, options); } @@ -296,7 +296,7 @@ public static implicit operator RequestContent(DeidentificationJob deidentificat /// The to deserialize the from. public static explicit operator DeidentificationJob(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDeidentificationJob(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs index 994c63e4aba0..833296b5ab70 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobCustomizationOptions.Serialization.cs @@ -147,7 +147,7 @@ protected virtual DeidentificationJobCustomizationOptions PersistableModelCreate switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationJobCustomizationOptions(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobSummary.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobSummary.Serialization.cs index e4d8beb2dc9a..4ed101fa8efb 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobSummary.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJobSummary.Serialization.cs @@ -165,7 +165,7 @@ protected virtual DeidentificationJobSummary PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationJobSummary(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs index 2cf1d2493771..bb6cc0aeac45 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs @@ -141,7 +141,7 @@ protected virtual DeidentificationResult PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDeidentificationResult(document.RootElement, options); } @@ -156,7 +156,7 @@ protected virtual DeidentificationResult PersistableModelCreateCore(BinaryData d /// The to deserialize the from. public static explicit operator DeidentificationResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeDeidentificationResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Internal/CodeGenSerializationAttribute.cs index bfe22efc7c2b..da0d61404d42 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs index df833165ab25..6dd980d89b72 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/Models/AzureHealthDeidentificationContext.cs @@ -26,12 +26,12 @@ namespace Azure.Health.Deidentification [ModelReaderWriterBuildable(typeof(PagedDeidentificationJob))] [ModelReaderWriterBuildable(typeof(PhiEntity))] [ModelReaderWriterBuildable(typeof(PhiTaggerResult))] - [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SimplePhiEntity))] [ModelReaderWriterBuildable(typeof(SourceStorageLocation))] [ModelReaderWriterBuildable(typeof(StringIndex))] [ModelReaderWriterBuildable(typeof(TaggedPhiEntities))] [ModelReaderWriterBuildable(typeof(TargetStorageLocation))] + [ModelReaderWriterBuildable(typeof(ResponseError))] public partial class AzureHealthDeidentificationContext : ModelReaderWriterContext { } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationDocumentDetails.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationDocumentDetails.Serialization.cs index 4c3176f5db18..98ee099a25a1 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationDocumentDetails.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationDocumentDetails.Serialization.cs @@ -154,7 +154,7 @@ protected virtual PagedDeidentificationDocumentDetails PersistableModelCreateCor switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedDeidentificationDocumentDetails(document.RootElement, options); } @@ -169,7 +169,7 @@ protected virtual PagedDeidentificationDocumentDetails PersistableModelCreateCor /// The to deserialize the from. public static explicit operator PagedDeidentificationDocumentDetails(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedDeidentificationDocumentDetails(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationJob.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationJob.Serialization.cs index 29e5cc79522e..bcd81fe174fa 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationJob.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PagedDeidentificationJob.Serialization.cs @@ -154,7 +154,7 @@ protected virtual PagedDeidentificationJob PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePagedDeidentificationJob(document.RootElement, options); } @@ -169,7 +169,7 @@ protected virtual PagedDeidentificationJob PersistableModelCreateCore(BinaryData /// The to deserialize the from. public static explicit operator PagedDeidentificationJob(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializePagedDeidentificationJob(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs index f8849c64370c..97e60a78e7e9 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs @@ -175,7 +175,7 @@ protected virtual PhiEntity PersistableModelCreateCore(BinaryData data, ModelRea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePhiEntity(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs index 9fdba57a9124..c465c5028d12 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs @@ -137,7 +137,7 @@ protected virtual PhiTaggerResult PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePhiTaggerResult(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs index 8efb9ac34efa..2cb5bbef2fd5 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SimplePhiEntity.Serialization.cs @@ -154,7 +154,7 @@ protected virtual SimplePhiEntity PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSimplePhiEntity(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs index aa6931bf3e21..56a5c6d1a17a 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs @@ -172,7 +172,7 @@ protected virtual SourceStorageLocation PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSourceStorageLocation(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs index b66b3ec81027..cd1b778f0a57 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs @@ -143,7 +143,7 @@ protected virtual StringIndex PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeStringIndex(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs index d9f2947768c1..1ae6400e52cb 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TaggedPhiEntities.Serialization.cs @@ -145,7 +145,7 @@ protected virtual TaggedPhiEntities PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeTaggedPhiEntities(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs index 8d58654fe5dc..56d6b8209a58 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs @@ -150,7 +150,7 @@ protected virtual TargetStorageLocation PersistableModelCreateCore(BinaryData da switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeTargetStorageLocation(document.RootElement, options); } diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/ArmHealthDataAIServicesModelFactory.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/ArmHealthDataAIServicesModelFactory.cs index 3c947f08b40d..67456184adff 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/ArmHealthDataAIServicesModelFactory.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/ArmHealthDataAIServicesModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.HealthDataAIServices; using Azure.ResourceManager.Models; diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs index f0c9f7a301d6..c35fb0175319 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// DeidServices_Create. /// /// /// Default Api Version. @@ -126,7 +126,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Operation Id. - /// Create. + /// DeidServices_Create. /// /// /// Default Api Version. @@ -184,7 +184,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -233,7 +233,7 @@ public virtual async Task> GetAsync(string deidSer /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -306,7 +306,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string deidServiceName, Ca /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -420,7 +420,7 @@ public virtual Response Exists(string deidServiceName, CancellationToken c /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -481,7 +481,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs index d17b20b16e00..c6dc8f99fe89 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -154,7 +154,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Operation Id. - /// Get. + /// DeidServices_Get. /// /// /// Default Api Version. @@ -193,7 +193,27 @@ public virtual Response Get(CancellationToken cancellationT } } - /// Update a DeidService. + /// + /// Update a DeidService + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}. + /// + /// + /// Operation Id. + /// DeidServices_Update. + /// + /// + /// Default Api Version. + /// 2024-09-20. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -232,7 +252,27 @@ public virtual async Task> UpdateAsync(WaitUnt } } - /// Update a DeidService. + /// + /// Update a DeidService + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}. + /// + /// + /// Operation Id. + /// DeidServices_Update. + /// + /// + /// Default Api Version. + /// 2024-09-20. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -280,7 +320,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Dei /// /// /// Operation Id. - /// Delete. + /// DeidServices_Delete. /// /// /// Default Api Version. @@ -329,7 +369,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// DeidServices_Delete. /// /// /// Default Api Version. diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs index 3d26b08cfeda..0c2908df801f 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Extensions/MockableHealthDataAIServicesResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual DeidServiceCollection GetDeidServices() return GetCachedClient(client => new DeidServiceCollection(client, Id)); } - /// Get a DeidService. + /// + /// Get a DeidService + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}. + /// + /// + /// Operation Id. + /// DeidServices_Get. + /// + /// + /// Default Api Version. + /// 2024-09-20. + /// + /// + /// /// The name of the deid service. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetDeidServiceAsync(str return await GetDeidServices().GetAsync(deidServiceName, cancellationToken).ConfigureAwait(false); } - /// Get a DeidService. + /// + /// Get a DeidService + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}. + /// + /// + /// Operation Id. + /// DeidServices_Get. + /// + /// + /// Default Api Version. + /// 2024-09-20. + /// + /// + /// /// The name of the deid service. /// The cancellation token to use. /// is null. diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs index 4ae23cf52833..a45c72cbc178 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -148,7 +148,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -196,7 +196,7 @@ public virtual Response G /// /// /// Operation Id. - /// Delete. + /// PrivateEndpointConnections_Delete. /// /// /// Default Api Version. @@ -245,7 +245,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// PrivateEndpointConnections_Delete. /// /// /// Default Api Version. @@ -294,7 +294,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// Create. + /// PrivateEndpointConnections_Create. /// /// /// Default Api Version. @@ -353,7 +353,7 @@ public virtual async Task /// /// Operation Id. - /// Create. + /// PrivateEndpointConnections_Create. /// /// /// Default Api Version. diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs index 920ea3f0b1c4..8d276501d00e 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResourceCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// PrivateEndpointConnections_Create. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task /// /// Operation Id. - /// Create. + /// PrivateEndpointConnections_Create. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable G /// /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// PrivateEndpointConnections_Get. /// /// /// Default Api Version. diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/AzureResourceManagerHealthDataAIServicesContext.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/AzureResourceManagerHealthDataAIServicesContext.cs index d32f0c4607bb..1c016d38890e 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/AzureResourceManagerHealthDataAIServicesContext.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/AzureResourceManagerHealthDataAIServicesContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.HealthDataAIServices.Models; using Azure.ResourceManager.Models; @@ -32,6 +33,7 @@ namespace Azure.ResourceManager.HealthDataAIServices [ModelReaderWriterBuildable(typeof(PrivateEndpoint))] [ModelReaderWriterBuildable(typeof(PrivateEndpointConnectionProperties))] [ModelReaderWriterBuildable(typeof(PrivateEndpointConnectionResourceListResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerHealthDataAIServicesContext : ModelReaderWriterContext diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs index ebb39474145c..2a05cba9024f 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/Models/DeidServicePatch.Serialization.cs @@ -193,15 +193,15 @@ protected virtual DeidServicePatch PersistableModelCreateCore(BinaryData data, M /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(DeidServicePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(DeidServicePatch deidServicePatch) { - if (patch == null) + if (deidServicePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(deidServicePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ArmKubernetesModelFactory.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ArmKubernetesModelFactory.cs index 4e3903196f18..5487b6ea7a28 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ArmKubernetesModelFactory.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ArmKubernetesModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Kubernetes; using Azure.ResourceManager.Models; diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterCollection.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterCollection.cs index 7fbce0fdca3b..250b357bc113 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterCollection.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrReplace. + /// ConnectedClusters_CreateOrReplace. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Operation Id. - /// CreateOrReplace. + /// ConnectedClusters_CreateOrReplace. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string cl /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIfExist /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.cs index 07295fc8f4ac..4599c46b4c30 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Operation Id. - /// Get. + /// ConnectedClusters_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cancella } } - /// API to update certain properties of the connected cluster resource. + /// + /// API to update certain properties of the connected cluster resource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}. + /// + /// + /// Operation Id. + /// ConnectedClusters_Update. + /// + /// + /// Default Api Version. + /// 2025-12-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// Parameters supplied to update Connected Cluster. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsync(Connec } } - /// API to update certain properties of the connected cluster resource. + /// + /// API to update certain properties of the connected cluster resource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}. + /// + /// + /// Operation Id. + /// ConnectedClusters_Update. + /// + /// + /// Default Api Version. + /// 2025-12-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// Parameters supplied to update Connected Cluster. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(ConnectedClusterPatch p /// /// /// Operation Id. - /// Delete. + /// ConnectedClusters_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// ConnectedClusters_Delete. /// /// /// Default Api Version. @@ -360,7 +400,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// GetClusterUserCredential. + /// ConnectedClusters_ListClusterUserCredential. /// /// /// Default Api Version. @@ -412,7 +452,7 @@ public virtual async Task> GetClusterUserCredentialA /// /// /// Operation Id. - /// GetClusterUserCredential. + /// ConnectedClusters_ListClusterUserCredential. /// /// /// Default Api Version. diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Extensions/MockableKubernetesResourceGroupResource.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Extensions/MockableKubernetesResourceGroupResource.cs index 65526a987c6a..85d220f23993 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Extensions/MockableKubernetesResourceGroupResource.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Extensions/MockableKubernetesResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual ConnectedClusterCollection GetConnectedClusters() return GetCachedClient(client => new ConnectedClusterCollection(client, Id)); } - /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}. + /// + /// + /// Operation Id. + /// ConnectedClusters_Get. + /// + /// + /// Default Api Version. + /// 2025-12-01-preview. + /// + /// + /// /// The name of the Kubernetes cluster on which get is called. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetConnectedCluste return await GetConnectedClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false); } - /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + /// + /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}. + /// + /// + /// Operation Id. + /// ConnectedClusters_Get. + /// + /// + /// Default Api Version. + /// 2025-12-01-preview. + /// + /// + /// /// The name of the Kubernetes cluster on which get is called. /// The cancellation token to use. /// is null. diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/AzureResourceManagerKubernetesContext.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/AzureResourceManagerKubernetesContext.cs index 353434302cd1..3d32245815e2 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/AzureResourceManagerKubernetesContext.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/AzureResourceManagerKubernetesContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Kubernetes.Models; using Azure.ResourceManager.Models; @@ -32,6 +33,7 @@ namespace Azure.ResourceManager.Kubernetes [ModelReaderWriterBuildable(typeof(ListClusterUserCredentialProperties))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(OidcIssuerProfile))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SecurityProfile))] [ModelReaderWriterBuildable(typeof(SecurityProfileWorkloadIdentity))] [ModelReaderWriterBuildable(typeof(SystemComponent))] diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/ConnectedClusterPatch.Serialization.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/ConnectedClusterPatch.Serialization.cs index 9f643b98c5c1..bf3c2cf5f342 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/ConnectedClusterPatch.Serialization.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/Models/ConnectedClusterPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual ConnectedClusterPatch PersistableModelCreateCore(BinaryData da /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(ConnectedClusterPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(ConnectedClusterPatch connectedClusterPatch) { - if (patch == null) + if (connectedClusterPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(connectedClusterPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/ArmInformaticaDataManagementModelFactory.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/ArmInformaticaDataManagementModelFactory.cs index 33f207bc0a8a..f7924ce38b58 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/ArmInformaticaDataManagementModelFactory.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/ArmInformaticaDataManagementModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.InformaticaDataManagement; using Azure.ResourceManager.Models; diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs index dad28d6c7f7e..f9a3769a9747 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Extensions/MockableInformaticaDataManagementResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual InformaticaOrganizationCollection GetInformaticaOrganizations() return GetCachedClient(client => new InformaticaOrganizationCollection(client, Id)); } - /// Get a InformaticaOrganizationResource. + /// + /// Get a InformaticaOrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// /// Name of the Organizations resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetInformat return await GetInformaticaOrganizations().GetAsync(organizationName, cancellationToken).ConfigureAwait(false); } - /// Get a InformaticaOrganizationResource. + /// + /// Get a InformaticaOrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// /// Name of the Organizations resource. /// The cancellation token to use. /// is null. diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs index 97654bb25791..cf36842006a3 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateO /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(st /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string organizationName, C /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string organizationName, CancellationToken /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> Get /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs index b8462264fe47..4a24aaab32d3 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken c } } - /// Update a InformaticaOrganizationResource. + /// + /// Update a InformaticaOrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsync } } - /// Update a InformaticaOrganizationResource. + /// + /// Update a InformaticaOrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(InformaticaOrgan /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. @@ -360,7 +400,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// GetServerlessMetadata. + /// Organizations_GetServerlessMetadata. /// /// /// Default Api Version. @@ -408,7 +448,7 @@ public virtual async Task> GetServerlessMet /// /// /// Operation Id. - /// GetServerlessMetadata. + /// Organizations_GetServerlessMetadata. /// /// /// Default Api Version. @@ -456,7 +496,7 @@ public virtual Response GetServerlessMetadata(Cancel /// /// /// Operation Id. - /// GetAllServerlessRuntimes. + /// Organizations_GetAllServerlessRuntimes. /// /// /// Default Api Version. @@ -504,7 +544,7 @@ public virtual async Task> Ge /// /// /// Operation Id. - /// GetAllServerlessRuntimes. + /// Organizations_GetAllServerlessRuntimes. /// /// /// Default Api Version. diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs index 4e37e7d3b9af..40fa91b3503e 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// ServerlessRuntimes_CreateOrUpdate. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task> Cr /// /// /// Operation Id. - /// CreateOrUpdate. + /// ServerlessRuntimes_CreateOrUpdate. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string serverlessRuntimeNa /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string serverlessRuntimeName, CancellationT /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs index 21ee6b62423d..f455e2d39cff 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -149,7 +149,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// ServerlessRuntimes_Get. /// /// /// Default Api Version. @@ -197,7 +197,7 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id. - /// Delete. + /// ServerlessRuntimes_Delete. /// /// /// Default Api Version. @@ -246,7 +246,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// ServerlessRuntimes_Delete. /// /// /// Default Api Version. @@ -286,7 +286,27 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } } - /// Update a InformaticaServerlessRuntimeResource. + /// + /// Update a InformaticaServerlessRuntimeResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}/serverlessRuntimes/{serverlessRuntimeName}. + /// + /// + /// Operation Id. + /// ServerlessRuntimes_Update. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -318,7 +338,27 @@ public virtual async Task> Update } } - /// Update a InformaticaServerlessRuntimeResource. + /// + /// Update a InformaticaServerlessRuntimeResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations/{organizationName}/serverlessRuntimes/{serverlessRuntimeName}. + /// + /// + /// Operation Id. + /// ServerlessRuntimes_Update. + /// + /// + /// Default Api Version. + /// 2024-05-08. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -359,7 +399,7 @@ public virtual Response Update(Informatica /// /// /// Operation Id. - /// CheckDependencies. + /// ServerlessRuntimes_CheckDependencies. /// /// /// Default Api Version. @@ -407,7 +447,7 @@ public virtual async Task> CheckDependenciesAs /// /// /// Operation Id. - /// CheckDependencies. + /// ServerlessRuntimes_CheckDependencies. /// /// /// Default Api Version. @@ -455,7 +495,7 @@ public virtual Response CheckDependencies(CancellationT /// /// /// Operation Id. - /// StartFailedServerlessRuntime. + /// ServerlessRuntimes_StartFailedServerlessRuntime. /// /// /// Default Api Version. @@ -498,7 +538,7 @@ public virtual async Task StartFailedServerlessRuntimeAsync(Cancellati /// /// /// Operation Id. - /// StartFailedServerlessRuntime. + /// ServerlessRuntimes_StartFailedServerlessRuntime. /// /// /// Default Api Version. @@ -541,7 +581,7 @@ public virtual Response StartFailedServerlessRuntime(CancellationToken cancellat /// /// /// Operation Id. - /// GetServerlessResourceById. + /// ServerlessRuntimes_ServerlessResourceById. /// /// /// Default Api Version. @@ -589,7 +629,7 @@ public virtual async Task> GetSer /// /// /// Operation Id. - /// GetServerlessResourceById. + /// ServerlessRuntimes_ServerlessResourceById. /// /// /// Default Api Version. diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AzureResourceManagerInformaticaDataManagementContext.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AzureResourceManagerInformaticaDataManagementContext.cs index c2e1924d25b7..f60c829ead80 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AzureResourceManagerInformaticaDataManagementContext.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/AzureResourceManagerInformaticaDataManagementContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.InformaticaDataManagement.Models; using Azure.ResourceManager.Models; @@ -48,6 +49,7 @@ namespace Azure.ResourceManager.InformaticaDataManagement [ModelReaderWriterBuildable(typeof(InformaticaUserDetails))] [ModelReaderWriterBuildable(typeof(InformaticaUserDetailsUpdate))] [ModelReaderWriterBuildable(typeof(LinkOrganization))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(ServerlessConfigProperties))] [ModelReaderWriterBuildable(typeof(ServerlessMetadataResponse))] [ModelReaderWriterBuildable(typeof(ServerlessRuntimeConfigProperties))] diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs index 5cdf3bed8236..0778572b98bf 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaOrganizationPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual InformaticaOrganizationPatch PersistableModelCreateCore(Binary /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(InformaticaOrganizationPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(InformaticaOrganizationPatch informaticaOrganizationPatch) { - if (patch == null) + if (informaticaOrganizationPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(informaticaOrganizationPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs index d36afdb7c205..f50cde5ef1be 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/Models/InformaticaServerlessRuntimePatch.Serialization.cs @@ -143,15 +143,15 @@ protected virtual InformaticaServerlessRuntimePatch PersistableModelCreateCore(B /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(InformaticaServerlessRuntimePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(InformaticaServerlessRuntimePatch informaticaServerlessRuntimePatch) { - if (patch == null) + if (informaticaServerlessRuntimePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(informaticaServerlessRuntimePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/CodeGenSerializationAttribute.cs index e5bf80ecb38b..deb8c9b25dd9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultAdministrationClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultAdministrationClientOptions.cs index 2162c19e0438..9a4536aa7fb2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultAdministrationClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultAdministrationClientOptions.cs @@ -9,7 +9,7 @@ namespace Azure.Security.KeyVault.Administration { - /// Client options for . + /// Client options for clients in this library. public partial class KeyVaultAdministrationClientOptions : ClientOptions { private const ServiceVersion LatestVersion = ServiceVersion.V2025_07_01; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClient.cs index 1c612cb6337a..34e7b2117f60 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClient.cs @@ -28,25 +28,6 @@ protected KeyVaultRestClient() { } - /// Initializes a new instance of KeyVaultRestClient. - /// Service endpoint. - /// A credential used to authenticate to the service. - /// The options for configuring the client. - /// or is null. - public KeyVaultRestClient(Uri endpoint, TokenCredential credential, KeyVaultRestClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNull(credential, nameof(credential)); - - options ??= new KeyVaultRestClientOptions(); - - _endpoint = endpoint; - _tokenCredential = credential; - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }); - _apiVersion = options.Version; - ClientDiagnostics = new ClientDiagnostics(options, true); - } - /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs deleted file mode 100644 index 1f7116b5c899..000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/KeyVaultRestClientOptions.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration -{ - /// Client options for . - internal partial class KeyVaultRestClientOptions : ClientOptions - { - private const ServiceVersion LatestVersion = ServiceVersion.V2025_07_01; - - /// Initializes a new instance of KeyVaultRestClientOptions. - /// The service version. - public KeyVaultRestClientOptions(ServiceVersion version = LatestVersion) - { - Version = version switch - { - ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_2 => "7.6-preview.2", - ServiceVersion.V7_6 => "7.6", - ServiceVersion.V2025_07_01 => "2025-07-01", - _ => throw new NotSupportedException() - }; - } - - /// Gets the Version. - internal string Version { get; } - - internal enum ServiceVersion - { - /// The 7.5 API version. - V7_5 = 1, - /// The 7.6-preview.2 API version. - V7_6_Preview_2 = 2, - /// The 7.6 API version. - V7_6 = 3, - /// The 2025-07-01 API version. - V2025_07_01 = 4 - } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/AzureSecurityKeyVaultAdministrationContext.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/AzureSecurityKeyVaultAdministrationContext.cs index ea7ae907cd56..b7e5f3a5831d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/AzureSecurityKeyVaultAdministrationContext.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/AzureSecurityKeyVaultAdministrationContext.cs @@ -14,14 +14,14 @@ namespace Azure.Security.KeyVault.Administration /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information /// - [ModelReaderWriterBuildable(typeof(FullBackupDetailsInternal))] [ModelReaderWriterBuildable(typeof(GetSettingsResult))] [ModelReaderWriterBuildable(typeof(KeyVaultPermission))] [ModelReaderWriterBuildable(typeof(KeyVaultRoleAssignment))] [ModelReaderWriterBuildable(typeof(KeyVaultRoleAssignmentProperties))] [ModelReaderWriterBuildable(typeof(KeyVaultRoleDefinition))] - [ModelReaderWriterBuildable(typeof(KeyVaultServiceError))] [ModelReaderWriterBuildable(typeof(KeyVaultSetting))] + [ModelReaderWriterBuildable(typeof(FullBackupDetailsInternal))] + [ModelReaderWriterBuildable(typeof(KeyVaultServiceError))] [ModelReaderWriterBuildable(typeof(PreBackupOperationParameters))] [ModelReaderWriterBuildable(typeof(PreRestoreOperationParameters))] [ModelReaderWriterBuildable(typeof(RestoreDetailsInternal))] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/FullBackupDetailsInternal.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/FullBackupDetailsInternal.Serialization.cs index bbc049b1df3e..697c7a3f6b4c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/FullBackupDetailsInternal.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/FullBackupDetailsInternal.Serialization.cs @@ -218,7 +218,7 @@ protected virtual FullBackupDetailsInternal PersistableModelCreateCore(BinaryDat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeFullBackupDetailsInternal(document.RootElement, options); } @@ -233,7 +233,7 @@ protected virtual FullBackupDetailsInternal PersistableModelCreateCore(BinaryDat /// The to deserialize the from. public static explicit operator FullBackupDetailsInternal(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeFullBackupDetailsInternal(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/GetSettingsResult.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/GetSettingsResult.Serialization.cs index 847e441e999c..c1bc076c5fdb 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/GetSettingsResult.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/GetSettingsResult.Serialization.cs @@ -140,7 +140,7 @@ protected virtual GetSettingsResult PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeGetSettingsResult(document.RootElement, options); } @@ -155,7 +155,7 @@ protected virtual GetSettingsResult PersistableModelCreateCore(BinaryData data, /// The to deserialize the from. public static explicit operator GetSettingsResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeGetSettingsResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs index 20a81e42d56c..624105210ad1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs @@ -238,7 +238,7 @@ protected virtual KeyVaultPermission PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultPermission(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs index 67300e341097..52a41f1d01a8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs @@ -163,7 +163,7 @@ protected virtual KeyVaultRoleAssignment PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultRoleAssignment(document.RootElement, options); } @@ -178,7 +178,7 @@ protected virtual KeyVaultRoleAssignment PersistableModelCreateCore(BinaryData d /// The to deserialize the from. public static explicit operator KeyVaultRoleAssignment(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeKeyVaultRoleAssignment(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs index 950bbca976ab..8cb38519a1b5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs @@ -151,7 +151,7 @@ protected virtual KeyVaultRoleAssignmentProperties PersistableModelCreateCore(Bi switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultRoleAssignmentProperties(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs index 6c1c2420148a..08170da9acf3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs @@ -168,7 +168,7 @@ protected virtual KeyVaultRoleDefinition PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultRoleDefinition(document.RootElement, options); } @@ -183,7 +183,7 @@ protected virtual KeyVaultRoleDefinition PersistableModelCreateCore(BinaryData d /// The to deserialize the from. public static explicit operator KeyVaultRoleDefinition(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeKeyVaultRoleDefinition(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs index 19c271b2e3d7..190d59a7071e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs @@ -152,7 +152,7 @@ protected virtual KeyVaultServiceError PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultServiceError(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultSetting.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultSetting.Serialization.cs index cf5fa05de54f..ba86a78ecee2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultSetting.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultSetting.Serialization.cs @@ -151,7 +151,7 @@ protected virtual KeyVaultSetting PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeKeyVaultSetting(document.RootElement, options); } @@ -166,7 +166,7 @@ protected virtual KeyVaultSetting PersistableModelCreateCore(BinaryData data, Mo /// The to deserialize the from. public static explicit operator KeyVaultSetting(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeKeyVaultSetting(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs index 95f990e9410c..4813846548c6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs @@ -152,7 +152,7 @@ protected virtual PreBackupOperationParameters PersistableModelCreateCore(Binary switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePreBackupOperationParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs index 69cf095fe16a..a7061cae2d97 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs @@ -141,7 +141,7 @@ protected virtual PreRestoreOperationParameters PersistableModelCreateCore(Binar switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePreRestoreOperationParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.Serialization.cs index 148f575b4fb7..41bd880bad97 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.Serialization.cs @@ -206,7 +206,7 @@ protected virtual RestoreDetailsInternal PersistableModelCreateCore(BinaryData d switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRestoreDetailsInternal(document.RootElement, options); } @@ -221,7 +221,7 @@ protected virtual RestoreDetailsInternal PersistableModelCreateCore(BinaryData d /// The to deserialize the from. public static explicit operator RestoreDetailsInternal(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRestoreDetailsInternal(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreOperationParameters.Serialization.cs index 52aa3a03b85f..090452585c04 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreOperationParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreOperationParameters.Serialization.cs @@ -136,7 +136,7 @@ protected virtual RestoreOperationParameters PersistableModelCreateCore(BinaryDa switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRestoreOperationParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.Serialization.cs index 5be39007f270..1ba1cf6a1627 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.Serialization.cs @@ -128,7 +128,7 @@ protected virtual RoleAssignmentCreateParameters PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleAssignmentCreateParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs index df81e72b2885..6b687ae88f52 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs @@ -151,7 +151,7 @@ protected virtual RoleAssignmentListResult PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleAssignmentListResult(document.RootElement, options); } @@ -166,7 +166,7 @@ protected virtual RoleAssignmentListResult PersistableModelCreateCore(BinaryData /// The to deserialize the from. public static explicit operator RoleAssignmentListResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRoleAssignmentListResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs index 594e6b5a10cc..ba1febcff3a0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs @@ -135,7 +135,7 @@ protected virtual RoleAssignmentProperties PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleAssignmentProperties(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionCreateParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionCreateParameters.Serialization.cs index e5d98f9eaa50..1209cec8f2c3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionCreateParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionCreateParameters.Serialization.cs @@ -128,7 +128,7 @@ protected virtual RoleDefinitionCreateParameters PersistableModelCreateCore(Bina switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleDefinitionCreateParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs index 1a52a7e8757a..df4ee1c2b22f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs @@ -151,7 +151,7 @@ protected virtual RoleDefinitionListResult PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleDefinitionListResult(document.RootElement, options); } @@ -166,7 +166,7 @@ protected virtual RoleDefinitionListResult PersistableModelCreateCore(BinaryData /// The to deserialize the from. public static explicit operator RoleDefinitionListResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeRoleDefinitionListResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionProperties.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionProperties.Serialization.cs index 7aac3c0a4a03..99bfb44500d3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionProperties.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionProperties.Serialization.cs @@ -207,7 +207,7 @@ protected virtual RoleDefinitionProperties PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeRoleDefinitionProperties(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SASTokenParameter.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SASTokenParameter.Serialization.cs index 593d2e838d6a..2ef1f625fd55 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SASTokenParameter.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SASTokenParameter.Serialization.cs @@ -154,7 +154,7 @@ protected virtual SASTokenParameter PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSASTokenParameter(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs index 250a1031a957..a583dd80e4d3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs @@ -206,7 +206,7 @@ protected virtual SelectiveKeyRestoreDetailsInternal PersistableModelCreateCore( switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSelectiveKeyRestoreDetailsInternal(document.RootElement, options); } @@ -221,7 +221,7 @@ protected virtual SelectiveKeyRestoreDetailsInternal PersistableModelCreateCore( /// The to deserialize the from. public static explicit operator SelectiveKeyRestoreDetailsInternal(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSelectiveKeyRestoreDetailsInternal(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreOperationParameters.Serialization.cs index 68e06d9bdc79..e51e37240c6d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreOperationParameters.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreOperationParameters.Serialization.cs @@ -136,7 +136,7 @@ protected virtual SelectiveKeyRestoreOperationParameters PersistableModelCreateC switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSelectiveKeyRestoreOperationParameters(document.RootElement, options); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/UpdateSettingRequest.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/UpdateSettingRequest.Serialization.cs index 149752febe8a..45b564deb8d9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/UpdateSettingRequest.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/UpdateSettingRequest.Serialization.cs @@ -127,7 +127,7 @@ protected virtual UpdateSettingRequest PersistableModelCreateCore(BinaryData dat switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeUpdateSettingRequest(document.RootElement, options); } diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/ArmLambdaTestHyperExecuteModelFactory.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/ArmLambdaTestHyperExecuteModelFactory.cs index afd08004ff87..e7bc20dc78db 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/ArmLambdaTestHyperExecuteModelFactory.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/ArmLambdaTestHyperExecuteModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.LambdaTestHyperExecute; using Azure.ResourceManager.Models; diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Extensions/MockableLambdaTestHyperExecuteResourceGroupResource.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Extensions/MockableLambdaTestHyperExecuteResourceGroupResource.cs index e711a4e62286..d2d0ce7c6f37 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Extensions/MockableLambdaTestHyperExecuteResourceGroupResource.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Extensions/MockableLambdaTestHyperExecuteResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual LambdaTestHyperExecuteOrganizationCollection GetLambdaTestHyperEx return GetCachedClient(client => new LambdaTestHyperExecuteOrganizationCollection(client, Id)); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-02-01. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> return await GetLambdaTestHyperExecuteOrganizations().GetAsync(organizationname, cancellationToken).ConfigureAwait(false); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-02-01. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationCollection.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationCollection.cs index b6b3a420e056..f38528d2d672 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationCollection.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOr /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Cance /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string organizationname, C /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string organizationname, CancellationToken /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.cs index 8983b3f738e0..afa1bbd8bfab 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(Cancella } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-02-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/LambdaTest.HyperExecute/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-02-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(Lambd /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/AzureResourceManagerLambdaTestHyperExecuteContext.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/AzureResourceManagerLambdaTestHyperExecuteContext.cs index 62fa0fe1ac97..1f2155373113 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/AzureResourceManagerLambdaTestHyperExecuteContext.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/AzureResourceManagerLambdaTestHyperExecuteContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.LambdaTestHyperExecute.Models; using Azure.ResourceManager.Models; @@ -26,6 +27,7 @@ namespace Azure.ResourceManager.LambdaTestHyperExecute [ModelReaderWriterBuildable(typeof(LambdaTestHyperExecuteUserDetails))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(OrganizationResourceListResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerLambdaTestHyperExecuteContext : ModelReaderWriterContext diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/LambdaTestHyperExecuteOrganizationPatch.Serialization.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/LambdaTestHyperExecuteOrganizationPatch.Serialization.cs index f0b06d6ee374..62bb1cd2c7cc 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/LambdaTestHyperExecuteOrganizationPatch.Serialization.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/Models/LambdaTestHyperExecuteOrganizationPatch.Serialization.cs @@ -183,15 +183,15 @@ protected virtual LambdaTestHyperExecuteOrganizationPatch PersistableModelCreate /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(LambdaTestHyperExecuteOrganizationPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(LambdaTestHyperExecuteOrganizationPatch lambdaTestHyperExecuteOrganizationPatch) { - if (patch == null) + if (lambdaTestHyperExecuteOrganizationPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(lambdaTestHyperExecuteOrganizationPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Internal/CodeGenSerializationAttribute.cs index b04575cf516c..2b9ebb42993c 100644 --- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Internal/CodeGenSerializationAttribute.cs index 5ad2104aba00..578f0d410632 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryRequest.Serialization.cs index 1bda3b4b9e9b..276fdbf69705 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryRequest.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryRequest.Serialization.cs @@ -204,7 +204,7 @@ protected virtual BatchQueryRequest PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBatchQueryRequest(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryResponse.Serialization.cs index d8396fd441fb..f53d717dd9f1 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryResponse.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchQueryResponse.Serialization.cs @@ -194,7 +194,7 @@ protected virtual BatchQueryResponse PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBatchQueryResponse(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchRequest.Serialization.cs index 5e7f2dcde9f1..2ee3e6f042c6 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchRequest.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchRequest.Serialization.cs @@ -139,7 +139,7 @@ protected virtual BatchRequest PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBatchRequest(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchResponse.Serialization.cs index 79d04c91a192..888a1127a19e 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchResponse.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/BatchResponse.Serialization.cs @@ -141,7 +141,7 @@ protected virtual BatchResponse PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeBatchResponse(document.RootElement, options); } @@ -156,7 +156,7 @@ protected virtual BatchResponse PersistableModelCreateCore(BinaryData data, Mode /// The to deserialize the from. public static explicit operator BatchResponse(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeBatchResponse(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsBatchQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsBatchQueryResult.Serialization.cs index d04e60290491..b97d09323edd 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsBatchQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsBatchQueryResult.Serialization.cs @@ -253,7 +253,7 @@ protected override LogsQueryResult PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLogsBatchQueryResult(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsQueryResult.Serialization.cs index eac31f5046d9..4c75ff08de2e 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsQueryResult.Serialization.cs @@ -172,7 +172,7 @@ protected virtual LogsQueryResult PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLogsQueryResult(document.RootElement, options); } @@ -187,7 +187,7 @@ protected virtual LogsQueryResult PersistableModelCreateCore(BinaryData data, Mo /// The to deserialize the from. public static explicit operator LogsQueryResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeLogsQueryResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTable.Serialization.cs index e1d547cf5885..df77f2c5b163 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTable.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTable.Serialization.cs @@ -154,7 +154,7 @@ protected virtual LogsTable PersistableModelCreateCore(BinaryData data, ModelRea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLogsTable(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTableColumn.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTableColumn.Serialization.cs index dd204898b3fd..d12e5562b8ef 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTableColumn.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/LogsTableColumn.Serialization.cs @@ -136,7 +136,7 @@ protected virtual LogsTableColumn PersistableModelCreateCore(BinaryData data, Mo switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLogsTableColumn(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/QueryBody.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/QueryBody.Serialization.cs index cf4047570ded..594b05b51c65 100644 --- a/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/QueryBody.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Logs/src/Generated/Models/QueryBody.Serialization.cs @@ -176,7 +176,7 @@ protected virtual QueryBody PersistableModelCreateCore(BinaryData data, ModelRea switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeQueryBody(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Internal/CodeGenSerializationAttribute.cs index b30546d28a85..8a85df9b01aa 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/LocalizableString.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/LocalizableString.Serialization.cs index fbf6f525008b..fde2ce874f8a 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/LocalizableString.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/LocalizableString.Serialization.cs @@ -139,7 +139,7 @@ protected virtual LocalizableString PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeLocalizableString(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetadataValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetadataValue.Serialization.cs index 531a536eb939..4cf778be48fa 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetadataValue.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetadataValue.Serialization.cs @@ -141,7 +141,7 @@ protected virtual MetadataValue PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetadataValue(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricResult.Serialization.cs index 74bf1aacada3..a39a61750eb6 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricResult.Serialization.cs @@ -212,7 +212,7 @@ protected virtual MetricResult PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetricResult(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricTimeSeriesElement.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricTimeSeriesElement.Serialization.cs index 4be5b233dc5d..05293567986e 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricTimeSeriesElement.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricTimeSeriesElement.Serialization.cs @@ -168,7 +168,7 @@ protected virtual MetricTimeSeriesElement PersistableModelCreateCore(BinaryData switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetricTimeSeriesElement(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricValue.Serialization.cs index 42ae2e23809c..e94f2b59434d 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricValue.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricValue.Serialization.cs @@ -210,7 +210,7 @@ protected virtual MetricValue PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetricValue(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResourcesResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResourcesResult.Serialization.cs index 11c9c3a8d2f5..92aaf51ac30a 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResourcesResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResourcesResult.Serialization.cs @@ -141,7 +141,7 @@ protected virtual MetricsQueryResourcesResult PersistableModelCreateCore(BinaryD switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetricsQueryResourcesResult(document.RootElement, options); } @@ -156,7 +156,7 @@ protected virtual MetricsQueryResourcesResult PersistableModelCreateCore(BinaryD /// The to deserialize the from. public static explicit operator MetricsQueryResourcesResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeMetricsQueryResourcesResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResult.Serialization.cs index 4ac10bd0d4eb..be225c981d7e 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/MetricsQueryResult.Serialization.cs @@ -206,7 +206,7 @@ protected virtual MetricsQueryResult PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeMetricsQueryResult(document.RootElement, options); } diff --git a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/ResourceIdList.Serialization.cs b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/ResourceIdList.Serialization.cs index ecf913c5fa16..35d984c4ffae 100644 --- a/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/ResourceIdList.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query.Metrics/src/Generated/Models/ResourceIdList.Serialization.cs @@ -152,7 +152,7 @@ protected virtual ResourceIdList PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeResourceIdList(document.RootElement, options); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md index 5aa663990431..4f2fcb83a9b5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.3.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.2.0 (2025-10-31) + +### Features Added + +- Upgaded api-version to 2024-12-30. + ## 1.1.2 (2025-08-11) ### Features Added diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs index 8e62a1bcd520..4c09e0d3d3bf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.net8.0.cs @@ -885,12 +885,11 @@ public static partial class FlexibleServersExtensions public static System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public static Azure.Response GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public static System.Threading.Tasks.Task> GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MySqlFlexibleServerAadAdministratorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1140,6 +1139,8 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? ReplicaCapacity { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } + public System.DateTimeOffset? RestorePointInOn { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList ServerPrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku Sku { get { throw null; } set { } } @@ -1353,9 +1354,6 @@ protected MySqlFlexibleServerResource() { } public virtual Azure.Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { throw null; } - public virtual Azure.Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ResetGtid(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1446,9 +1444,9 @@ protected MySqlFlexibleServersPrivateEndpointConnectionCollection() { } public partial class MySqlFlexibleServersPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServersPrivateEndpointConnectionData() { } - public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1476,49 +1474,6 @@ protected MySqlFlexibleServersPrivateEndpointConnectionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MySqlFlexibleServersPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MySqlFlexibleServersPrivateLinkResource() { } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MySqlFlexibleServersPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected MySqlFlexibleServersPrivateLinkResourceCollection() { } - public virtual Azure.Response Exists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class MySqlFlexibleServersPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MySqlFlexibleServersPrivateLinkResourceData() { } - public string GroupId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } - public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } } namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking { @@ -1536,7 +1491,6 @@ protected MockableMySqlFlexibleServersArmClient() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerResource GetMySqlFlexibleServerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableMySqlFlexibleServersResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -1562,10 +1516,10 @@ protected MockableMySqlFlexibleServersSubscriptionResource() { } public virtual Azure.Response GetMySqlFlexibleServersCapability(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public virtual Azure.Response GetOperationResult(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public virtual System.Threading.Tasks.Task> GetOperationResultAsync(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableMySqlFlexibleServersTenantResource : Azure.ResourceManager.ArmResource @@ -1648,8 +1602,8 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData AdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = default(int?), string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType? administratorType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType?), string login = null, string sid = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier identityResourceId = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, Azure.ResponseError error) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupType = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties MySqlFlexibleServerBackupProperties(int? backupRetentionDays = default(int?), int? backupIntervalHours = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? geoRedundantBackup = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? backupFormat = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat?)) { throw null; } @@ -1660,7 +1614,7 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null, System.Uri nextLink = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version, string availabilityZone, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode, Azure.Core.ResourceIdentifier sourceServerResourceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state, string fullyQualifiedDomainName, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string charset = null, string collation = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } @@ -1678,8 +1632,7 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreInMB = default(long?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable groupIds, Azure.Core.ResourceIdentifier privateEndpointId, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? storageRedundancy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = default(long?), long? maxStorageSize = default(long?), long? minBackupRetentionDays = default(long?), long? maxBackupRetentionDays = default(long?), long? minBackupIntervalHours = default(long?), long? maxBackupIntervalHours = default(long?)) { throw null; } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs index 8e62a1bcd520..4c09e0d3d3bf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs @@ -885,12 +885,11 @@ public static partial class FlexibleServersExtensions public static System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public static Azure.Response GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public static System.Threading.Tasks.Task> GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MySqlFlexibleServerAadAdministratorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -1140,6 +1139,8 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? ReplicaCapacity { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? ReplicationRole { get { throw null; } set { } } + public System.DateTimeOffset? RestorePointInOn { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.DateTimeOffset? RestorePointInTime { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList ServerPrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku Sku { get { throw null; } set { } } @@ -1353,9 +1354,6 @@ protected MySqlFlexibleServerResource() { } public virtual Azure.Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { throw null; } - public virtual Azure.Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ResetGtid(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1446,9 +1444,9 @@ protected MySqlFlexibleServersPrivateEndpointConnectionCollection() { } public partial class MySqlFlexibleServersPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MySqlFlexibleServersPrivateEndpointConnectionData() { } - public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } + public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1476,49 +1474,6 @@ protected MySqlFlexibleServersPrivateEndpointConnectionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MySqlFlexibleServersPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MySqlFlexibleServersPrivateLinkResource() { } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MySqlFlexibleServersPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected MySqlFlexibleServersPrivateLinkResourceCollection() { } - public virtual Azure.Response Exists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class MySqlFlexibleServersPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MySqlFlexibleServersPrivateLinkResourceData() { } - public string GroupId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } - public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } } namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking { @@ -1536,7 +1491,6 @@ protected MockableMySqlFlexibleServersArmClient() { } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerResource GetMySqlFlexibleServerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableMySqlFlexibleServersResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -1562,10 +1516,10 @@ protected MockableMySqlFlexibleServersSubscriptionResource() { } public virtual Azure.Response GetMySqlFlexibleServersCapability(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMySqlFlexibleServersCapabilityAsync(Azure.Core.AzureLocation locationName, string capabilitySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public virtual Azure.Response GetOperationResult(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("This method is obsolete and will be removed in a future release", false)] + [System.ObsoleteAttribute("This method is deprecated.")] public virtual System.Threading.Tasks.Task> GetOperationResultAsync(Azure.Core.AzureLocation locationName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableMySqlFlexibleServersTenantResource : Azure.ResourceManager.ArmResource @@ -1648,8 +1602,8 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData AdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState?), Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = default(int?), string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType? administratorType = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerAdministratorType?), string login = null, string sid = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier identityResourceId = null) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, Azure.ResponseError error) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, long? datasourceSizeInBytes = default(long?), long? dataTransferredInBytes = default(long?), string backupMetadata = null, Azure.ResponseError error = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? status = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupType = null, System.DateTimeOffset? completedOn = default(System.DateTimeOffset?), string source = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties MySqlFlexibleServerBackupProperties(int? backupRetentionDays = default(int?), int? backupIntervalHours = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? geoRedundantBackup = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? backupFormat = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat?)) { throw null; } @@ -1660,7 +1614,7 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(System.Collections.Generic.IEnumerable values = null, System.Uri nextLink = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version, string availabilityZone, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode, Azure.Core.ResourceIdentifier sourceServerResourceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state, string fullyQualifiedDomainName, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData MySqlFlexibleServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string administratorLogin = null, string administratorLoginPassword = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? version = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion?), string fullVersion = null, string availabilityZone = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode? createMode = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCreateMode?), Azure.Core.ResourceIdentifier sourceServerResourceId = null, System.DateTimeOffset? restorePointInOn = default(System.DateTimeOffset?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole? replicationRole = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerReplicationRole?), int? replicaCapacity = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption dataEncryption = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? state = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState?), string fullyQualifiedDomainName = null, int? databasePort = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage storage = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties backup = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability highAvailability = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork network = null, System.Collections.Generic.IEnumerable serverPrivateEndpointConnections = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatchStrategy?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties importSourceProperties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku sku = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData MySqlFlexibleServerDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string charset = null, string collation = null) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = default(long?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, System.Collections.Generic.IEnumerable supportedStorageEditions = null, System.Collections.Generic.IEnumerable supportedServerVersions = null) { throw null; } @@ -1678,8 +1632,7 @@ public static partial class ArmMySqlFlexibleServersModelFactory public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = default(long?), long? supportedIops = default(long?), long? supportedMemoryPerVCoreInMB = default(long?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection MySqlFlexibleServersPrivateEndpointConnection(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable groupIds, Azure.Core.ResourceIdentifier privateEndpointId, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB, int? iops, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk, string storageSku, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage MySqlFlexibleServerStorage(int? storageSizeInGB = default(int?), int? iops = default(int?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoGrow = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? logOnDisk = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), string storageSku = null, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? autoIoScaling = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum?), Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType? storageRedundancy = default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageRedundancyType?)) { throw null; } public static Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = default(long?), long? maxStorageSize = default(long?), long? minBackupRetentionDays = default(long?), long? maxBackupRetentionDays = default(long?), long? minBackupIntervalHours = default(long?), long? maxBackupIntervalHours = default(long?)) { throw null; } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/assets.json b/sdk/mysql/Azure.ResourceManager.MySql/assets.json index 380121741484..939eb06a61cf 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/assets.json +++ b/sdk/mysql/Azure.ResourceManager.MySql/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/mysql/Azure.ResourceManager.MySql", - "Tag": "net/mysql/Azure.ResourceManager.MySql_be60e3e226" + "Tag": "net/mysql/Azure.ResourceManager.MySql_2ca2020852" } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj index f9437ae15a0a..21ba5463c207 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj @@ -1,8 +1,8 @@ - 1.2.0-beta.1 + 1.3.0-beta.1 - 1.1.2 + 1.2.0 Azure.ResourceManager.MySql Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.DBforMySQL. azure;management;arm;resource manager;mysql diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs index 1efec0775a02..d8cabfe4f511 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/ArmMySqlFlexibleServersModelFactory.cs @@ -61,7 +61,7 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier modelGroupIds.Add(gid); } model.PrivateEndpoint = item.PrivateEndpoint; - model.ConnectionState = item.ConnectionState; + model.PrivateLinkServiceConnectionState = item.ConnectionState; list.Add(model); } } @@ -73,8 +73,6 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier systemData, tags, location, - identity, - sku, administratorLogin, administratorLoginPassword, version, @@ -97,7 +95,9 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier null, maintenanceWindow, importSourceProperties, - serializedAdditionalRawData: null); + identity, + sku, + null); } /// Initializes a new instance of . diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs index c83664eff81b..b7f7db3e95b5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/FlexibleServersExtensions.cs @@ -36,7 +36,7 @@ public static partial class FlexibleServersExtensions /// is an empty string, and was expected to be non-empty. /// or is null. [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("This method is obsolete and will be removed in a future release", false)] + [Obsolete("This method is deprecated.")] public static Task> GetOperationResultAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) { throw new NotSupportedException("This method is deprecated."); @@ -62,7 +62,7 @@ public static Task> GetOperationResultAs /// is an empty string, and was expected to be non-empty. /// or is null. [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("This method is obsolete and will be removed in a future release", false)] + [Obsolete("This method is deprecated.")] public static Response GetOperationResult(this SubscriptionResource subscriptionResource, AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) { throw new NotSupportedException("This method is deprecated."); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs index 500c173f1cbd..98199b762701 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs @@ -34,7 +34,7 @@ public partial class MockableMySqlFlexibleServersSubscriptionResource : ArmResou /// is an empty string, and was expected to be non-empty. /// is null. [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("This method is obsolete and will be removed in a future release", false)] + [Obsolete("This method is deprecated.")] public virtual Task> GetOperationResultAsync(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) { throw new NotSupportedException(); @@ -59,7 +59,7 @@ public virtual Task> GetOperationResultA /// is an empty string, and was expected to be non-empty. /// is null. [EditorBrowsable(EditorBrowsableState.Never)] - [Obsolete("This method is obsolete and will be removed in a future release", false)] + [Obsolete("This method is deprecated.")] public virtual Response GetOperationResult(AzureLocation locationName, string operationId, CancellationToken cancellationToken = default) { throw new NotSupportedException(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupAndExportResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupAndExportResult.cs new file mode 100644 index 000000000000..77fa8eb2c765 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupAndExportResult.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// Represents BackupAndExportAPI Response. + [CodeGenModel(Usage = new[] { "input" })] + public partial class MySqlFlexibleServerBackupAndExportResult : ResourceData + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupStoreDetails.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupStoreDetails.cs new file mode 100644 index 000000000000..be7fecd6eeac --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerBackupStoreDetails.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// + /// Details about the target where the backup content will be stored. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + [CodeGenModel("BackupStoreDetails")] + public abstract partial class MySqlFlexibleServerBackupStoreDetails + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerConfigurations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerConfigurations.cs new file mode 100644 index 000000000000..14ac99072998 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerConfigurations.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MySql.FlexibleServers.Models +{ + /// The response of a Configuration list operation. + public partial class MySqlFlexibleServerConfigurations + { + /// The Configuration items on this page. + [CodeGenMember("Value")] + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerLogFile.cs similarity index 51% rename from sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerLogFile.cs index 44d4bbb133d4..11b766374b9d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/Models/MySqlFlexibleServerLogFile.cs @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable -using System; -using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// The current status of an async operation. - public partial class OperationStatusResult + /// Represents a logFile. + [CodeGenModel(Usage = new[] { "input" })] + public partial class MySqlFlexibleServerLogFile : ResourceData { } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ArmMySqlModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/ArmMySqlModelFactory.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ArmMySqlModelFactory.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/ArmMySqlModelFactory.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlArmClient.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlArmClient.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlArmClient.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlArmClient.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlResourceGroupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlResourceGroupResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlResourceGroupResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlResourceGroupResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlSubscriptionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MockableMySqlSubscriptionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MockableMySqlSubscriptionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MySqlExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MySqlExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Extensions/MySqlExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Extensions/MySqlExtensions.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Argument.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Argument.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Argument.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Argument.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingDictionary.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ChangeTrackingDictionary.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingDictionary.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ChangeTrackingDictionary.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingList.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ChangeTrackingList.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ChangeTrackingList.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ChangeTrackingList.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ModelSerializationExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ModelSerializationExtensions.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/ModelSerializationExtensions.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/ModelSerializationExtensions.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Optional.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Optional.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Optional.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Optional.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Utf8JsonRequestContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Utf8JsonRequestContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Internal/Utf8JsonRequestContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Internal/Utf8JsonRequestContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperation.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlArmOperation.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperation.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlArmOperation.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperationOfT.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlArmOperationOfT.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlArmOperationOfT.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlArmOperationOfT.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlConfigurationOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlConfigurationOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationsOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlConfigurationsOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlConfigurationsOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlConfigurationsOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlDatabaseOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlDatabaseOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlDatabaseOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlDatabaseOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlFirewallRuleOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlFirewallRuleOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlFirewallRuleOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlFirewallRuleOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlPrivateEndpointConnectionOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlPrivateEndpointConnectionOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlPrivateEndpointConnectionOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlPrivateEndpointConnectionOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerAdministratorOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerAdministratorOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerAdministratorOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerAdministratorOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerKeyOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerKeyOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerKeyOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerKeyOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlServerSecurityAlertPolicyOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlVirtualNetworkRuleOperationSource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlVirtualNetworkRuleOperationSource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/LongRunningOperation/MySqlVirtualNetworkRuleOperationSource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/LongRunningOperation/MySqlVirtualNetworkRuleOperationSource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/AzureResourceManagerMySqlContext.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/AzureResourceManagerMySqlContext.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/AzureResourceManagerMySqlContext.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/AzureResourceManagerMySqlContext.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdministratorType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdministratorType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdministratorType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdministratorType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdvisorListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdvisorListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdvisorListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlAdvisorListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlAdvisorListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlConfigurations.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlConfigurations.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlConfigurations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlConfigurations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlConfigurations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlCreateMode.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlCreateMode.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlCreateMode.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlCreateMode.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlDatabaseListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlDatabaseListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlDatabaseListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlDatabaseListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlDatabaseListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlFirewallRuleListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlFirewallRuleListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlFirewallRuleListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlFirewallRuleListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlFirewallRuleListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlGeoRedundantBackup.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlGeoRedundantBackup.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlGeoRedundantBackup.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlGeoRedundantBackup.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlInfrastructureEncryption.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlInfrastructureEncryption.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlInfrastructureEncryption.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlInfrastructureEncryption.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFile.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFile.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFile.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFile.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFile.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFileListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFileListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFileListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlLogFileListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlLogFileListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlMinimalTlsVersionEnum.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlMinimalTlsVersionEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlMinimalTlsVersionEnum.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlNameAvailabilityResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlNameAvailabilityResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTier.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTier.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTier.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTier.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTier.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierServiceLevelObjectives.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPerformanceTierServiceLevelObjectives.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPerformanceTierServiceLevelObjectives.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionPatch.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointConnectionPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointConnectionPatch.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointProvisioningState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateEndpointProvisioningState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateEndpointProvisioningState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceProperties.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceProperties.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceProperties.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkResourceProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkResourceProperties.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateProperty.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateRequiredAction.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPrivateLinkServiceConnectionStateStatus.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPublicNetworkAccessEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPublicNetworkAccessEnum.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlPublicNetworkAccessEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlPublicNetworkAccessEnum.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResultState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResultState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryPerformanceInsightResetDataResultState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryPerformanceInsightResetDataResultState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryTextListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryTextListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryTextListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlQueryTextListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlQueryTextListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecommendationActionListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecommendationActionListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecommendationActionListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecommendationActionListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecommendationActionListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecoverableServerResourceData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecoverableServerResourceData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecoverableServerResourceData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlRecoverableServerResourceData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlRecoverableServerResourceData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSecurityAlertPolicyName.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSecurityAlertPolicyName.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSecurityAlertPolicyName.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSecurityAlertPolicyName.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerAdministratorListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerAdministratorListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerAdministratorListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerAdministratorListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerAdministratorListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerCreateOrUpdateContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerCreateOrUpdateContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerCreateOrUpdateContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerCreateOrUpdateContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerCreateOrUpdateContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyType.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerKeyType.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerKeyType.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPatch.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPatch.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPatch.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPatch.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPatch.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnection.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnection.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnectionProperties.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateEndpointConnectionProperties.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateEndpointConnectionProperties.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForCreate.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForCreate.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForCreate.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForCreate.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForDefaultCreate.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForDefaultCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForDefaultCreate.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForGeoRestore.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForGeoRestore.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForGeoRestore.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForReplica.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForReplica.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForReplica.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForReplica.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForReplica.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForRestore.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForRestore.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForRestore.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerPropertiesForRestore.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerPropertiesForRestore.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyState.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerSecurityAlertPolicyState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerSecurityAlertPolicyState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerUpgradeContent.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerUpgradeContent.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerUpgradeContent.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerUpgradeContent.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerUpgradeContent.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerVersion.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlServerVersion.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlServerVersion.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSku.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSku.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSku.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSku.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSku.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSkuTier.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSkuTier.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSkuTier.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSkuTier.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSslEnforcementEnum.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSslEnforcementEnum.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSslEnforcementEnum.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlSslEnforcementEnum.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlSslEnforcementEnum.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageAutogrow.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageAutogrow.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageAutogrow.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageAutogrow.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageProfile.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageProfile.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageProfile.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlStorageProfile.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlStorageProfile.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsInput.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsInput.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsInput.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsInput.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsInput.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlTopQueryStatisticsListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlTopQueryStatisticsListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleState.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlVirtualNetworkRuleState.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlVirtualNetworkRuleState.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsInput.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsInput.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsInput.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsInput.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsInput.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsListResult.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsListResult.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsListResult.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/MySqlWaitStatisticsListResult.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/MySqlWaitStatisticsListResult.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/UnknownServerPropertiesForCreate.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/UnknownServerPropertiesForCreate.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/UnknownServerPropertiesForCreate.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/Models/UnknownServerPropertiesForCreate.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/Models/UnknownServerPropertiesForCreate.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlAdvisorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlAdvisorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlConfigurationResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlConfigurationResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlDatabaseResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlDatabaseResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlFirewallRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlFirewallRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateEndpointConnectionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateEndpointConnectionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlPrivateLinkResourceData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlPrivateLinkResourceData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlQueryTextResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlQueryTextResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlRecommendationActionResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlRecommendationActionResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerAdministratorResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerAdministratorResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerKeyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerKeyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlServerSecurityAlertPolicyResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlServerSecurityAlertPolicyResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlVirtualNetworkRuleResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlVirtualNetworkRuleResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticCollection.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticCollection.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticCollection.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticData.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticData.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticData.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticData.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticData.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticResource.Serialization.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.Serialization.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticResource.Serialization.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticResource.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/MySqlWaitStatisticResource.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/MySqlWaitStatisticResource.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ProviderConstants.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/ProviderConstants.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/ProviderConstants.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/ProviderConstants.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/AdvisorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/AdvisorsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/AdvisorsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/AdvisorsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/CheckNameAvailabilityRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/CheckNameAvailabilityRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/CheckNameAvailabilityRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ConfigurationsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ConfigurationsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ConfigurationsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ConfigurationsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/DatabasesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/DatabasesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/DatabasesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/DatabasesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/FirewallRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/FirewallRulesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/FirewallRulesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/FirewallRulesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LocationBasedPerformanceTierRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/LocationBasedPerformanceTierRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LocationBasedPerformanceTierRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/LocationBasedPerformanceTierRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LogFilesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/LogFilesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/LogFilesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/LogFilesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySQLManagementRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/MySQLManagementRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySQLManagementRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/MySQLManagementRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySqlServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/MySqlServersRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/MySqlServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/MySqlServersRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/PrivateEndpointConnectionsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateEndpointConnectionsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/PrivateEndpointConnectionsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/PrivateLinkResourcesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/PrivateLinkResourcesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/PrivateLinkResourcesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/QueryTextsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/QueryTextsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/QueryTextsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/QueryTextsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecommendedActionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/RecommendedActionsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecommendedActionsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/RecommendedActionsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecoverableServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/RecoverableServersRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/RecoverableServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/RecoverableServersRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ReplicasRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ReplicasRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ReplicasRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ReplicasRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerAdministratorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerAdministratorsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerAdministratorsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerAdministratorsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerBasedPerformanceTierRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerBasedPerformanceTierRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerBasedPerformanceTierRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerBasedPerformanceTierRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerKeysRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerKeysRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerKeysRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerKeysRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerParametersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerParametersRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerParametersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerParametersRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServersRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/ServersRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/ServersRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/TopQueryStatisticsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/TopQueryStatisticsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/TopQueryStatisticsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/TopQueryStatisticsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/VirtualNetworkRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/VirtualNetworkRulesRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/VirtualNetworkRulesRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/VirtualNetworkRulesRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/WaitStatisticsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/WaitStatisticsRestOperations.cs similarity index 100% rename from sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Custom/RestOperations/WaitStatisticsRestOperations.cs rename to sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySql/RestOperations/WaitStatisticsRestOperations.cs diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerBackupData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerBackupData.cs new file mode 100644 index 000000000000..7943669305ea --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerBackupData.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServerBackup data model. + /// Server backup properties + /// + [CodeGenModel(Usage = new[] { "input" })] + public partial class MySqlFlexibleServerBackupData : ResourceData + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs index 479c78feeab9..668b880d7ff4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerData.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.ComponentModel; using Azure.ResourceManager.Models; @@ -16,6 +17,10 @@ namespace Azure.ResourceManager.MySql.FlexibleServers /// public partial class MySqlFlexibleServerData : TrackedResourceData { + /// Restore point creation time (ISO8601 format), specifying the time to restore from. + [EditorBrowsable(EditorBrowsableState.Never)] + public DateTimeOffset? RestorePointInTime { get => RestorePointInOn; set => RestorePointInOn = value; } + /// PrivateEndpointConnections related properties of a server. [EditorBrowsable(EditorBrowsableState.Never)] public IReadOnlyList PrivateEndpointConnections @@ -34,7 +39,7 @@ public IReadOnlyList PrivateEndpo modelGroupIds.Add(gid); } model.PrivateEndpoint = item.PrivateEndpoint; - model.ConnectionState = item.ConnectionState; + model.ConnectionState = item.PrivateLinkServiceConnectionState; list.Add(model); } return list; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerMaintenanceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerMaintenanceData.cs new file mode 100644 index 000000000000..7e2a626dcfe3 --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServerMaintenanceData.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServerMaintenance data model. + /// Represents a maintenance. + /// + [CodeGenModel(Usage = new[] { "input" })] + public partial class MySqlFlexibleServerMaintenanceData : ResourceData + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServersCapabilityData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServersCapabilityData.cs new file mode 100644 index 000000000000..45bce6a0031e --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Custom/MySqlFlexibleServersCapabilityData.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MySql.FlexibleServers +{ + /// + /// A class representing the MySqlFlexibleServersCapability data model. + /// Represents a location capability set. + /// + [CodeGenModel(Usage = new[] { "input" })] + public partial class MySqlFlexibleServersCapabilityData : ResourceData + { + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs index 142db5180e24..f402db6da957 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_UpdatePut + /// AdvancedThreatProtection_UpdatePut /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -108,11 +108,11 @@ public virtual async Task> Create /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_UpdatePut + /// AdvancedThreatProtection_UpdatePut /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -155,11 +155,11 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -196,11 +196,11 @@ public virtual async Task> GetAsync(A /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -237,11 +237,11 @@ public virtual Response Get(AdvancedThreatProt /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_List + /// AdvancedThreatProtection_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -267,11 +267,11 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_List + /// AdvancedThreatProtection_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -297,11 +297,11 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -336,11 +336,11 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -375,11 +375,11 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -416,11 +416,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs index bbe30f865ca4..b3734343175f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/AdvancedThreatProtectionResource.cs @@ -98,11 +98,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -138,11 +138,11 @@ public virtual async Task> GetAsync(C /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Get + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -178,11 +178,11 @@ public virtual Response Get(CancellationToken /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Update + /// AdvancedThreatProtection_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -224,11 +224,11 @@ public virtual async Task> Update /// /// /// Operation Id - /// AdvancedThreatProtectionSettings_Update + /// AdvancedThreatProtection_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs index 3e40a5637388..336eda330ac4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/ArmMySqlFlexibleServersModelFactory.cs @@ -17,31 +17,30 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models /// Model factory for models. public static partial class ArmMySqlFlexibleServersModelFactory { - /// Initializes a new instance of . - /// Represents the private DNS zone suffix. - /// A new instance for mocking. - public static MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) - { - return new MySqlFlexibleServerPrivateDnsZoneSuffixResponse(privateDnsZoneSuffix, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Resource name to verify. - /// Resource type used for verification. - /// A new instance for mocking. - public static MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, ResourceType? resourceType = null) - { - return new MySqlFlexibleServerNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Error Message. - /// Indicates whether the resource name is available. - /// Reason for name being unavailable. - /// A new instance for mocking. - public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = null, string reason = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of the sever administrator. + /// Login name of the server administrator. + /// SID (object ID) of the server administrator. + /// Tenant ID of the administrator. + /// The resource id of the identity used for AAD Authentication. + /// A new instance for mocking. + public static MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MySqlFlexibleServerAdministratorType? administratorType = null, string login = null, string sid = null, Guid? tenantId = null, ResourceIdentifier identityResourceId = null) { - return new MySqlFlexibleServerNameAvailabilityResult(message, isNameAvailable, reason, serializedAdditionalRawData: null); + return new MySqlFlexibleServerAadAdministratorData( + id, + name, + resourceType, + systemData, + administratorType, + login, + sid, + tenantId, + identityResourceId, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -51,8 +50,6 @@ public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameA /// The systemData. /// The tags. /// The location. - /// The cmk identity for the server. Current supported identity types: UserAssigned. - /// The SKU (pricing tier) of the server. /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). /// The password of the administrator login (required for server creation). /// Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. @@ -60,7 +57,7 @@ public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameA /// availability Zone information of the server. /// The mode to create a new MySQL server. /// The source MySQL server id. - /// Restore point creation time (ISO8601 format), specifying the time to restore from. + /// Restore point creation time (ISO8601 format), specifying the time to restore from. /// The replication role. /// The maximum number of replicas that a primary server can have. /// The Data Encryption for CMK. @@ -75,8 +72,10 @@ public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameA /// Maintenance policy of a server. /// Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. /// Source properties for import from storage. + /// The cmk identity for the server. Current supported identity types: UserAssigned. + /// The SKU (pricing tier) of the server. /// A new instance for mocking. - public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MySqlFlexibleServerSku sku = null, string administratorLogin = null, string administratorLoginPassword = null, MySqlFlexibleServerVersion? version = null, string fullVersion = null, string availabilityZone = null, MySqlFlexibleServerCreateMode? createMode = null, ResourceIdentifier sourceServerResourceId = null, DateTimeOffset? restorePointInTime = null, MySqlFlexibleServerReplicationRole? replicationRole = null, int? replicaCapacity = null, MySqlFlexibleServerDataEncryption dataEncryption = null, MySqlFlexibleServerState? state = null, string fullyQualifiedDomainName = null, int? databasePort = null, MySqlFlexibleServerStorage storage = null, MySqlFlexibleServerBackupProperties backup = null, MySqlFlexibleServerHighAvailability highAvailability = null, MySqlFlexibleServerNetwork network = null, IEnumerable serverPrivateEndpointConnections = null, MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = null, MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, ImportSourceProperties importSourceProperties = null) + public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string administratorLogin = null, string administratorLoginPassword = null, MySqlFlexibleServerVersion? version = null, string fullVersion = null, string availabilityZone = null, MySqlFlexibleServerCreateMode? createMode = null, ResourceIdentifier sourceServerResourceId = null, DateTimeOffset? restorePointInOn = null, MySqlFlexibleServerReplicationRole? replicationRole = null, int? replicaCapacity = null, MySqlFlexibleServerDataEncryption dataEncryption = null, MySqlFlexibleServerState? state = null, string fullyQualifiedDomainName = null, int? databasePort = null, MySqlFlexibleServerStorage storage = null, MySqlFlexibleServerBackupProperties backup = null, MySqlFlexibleServerHighAvailability highAvailability = null, MySqlFlexibleServerNetwork network = null, IEnumerable serverPrivateEndpointConnections = null, MySqlFlexibleServerPatchStrategy? maintenancePatchStrategy = null, MySqlFlexibleServerMaintenanceWindow maintenanceWindow = null, ImportSourceProperties importSourceProperties = null, ManagedServiceIdentity identity = null, MySqlFlexibleServerSku sku = null) { tags ??= new Dictionary(); serverPrivateEndpointConnections ??= new List(); @@ -88,8 +87,6 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier systemData, tags, location, - identity, - sku, administratorLogin, administratorLoginPassword, version, @@ -97,7 +94,7 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier availabilityZone, createMode, sourceServerResourceId, - restorePointInTime, + restorePointInOn, replicationRole, replicaCapacity, dataEncryption, @@ -112,6 +109,8 @@ public static MySqlFlexibleServerData MySqlFlexibleServerData(ResourceIdentifier maintenancePatchStrategy != null ? new MaintenancePolicy(maintenancePatchStrategy, serializedAdditionalRawData: null) : null, maintenanceWindow, importSourceProperties, + identity, + sku, serializedAdditionalRawData: null); } @@ -165,10 +164,10 @@ public static MySqlFlexibleServerHighAvailability MySqlFlexibleServerHighAvailab /// The systemData. /// The group ids for the private endpoint resource. /// The private endpoint resource. - /// A collection of information about the state of the connection between service consumer and provider. + /// A collection of information about the state of the connection between service consumer and provider. /// The provisioning state of the private endpoint connection resource. /// A new instance for mocking. - public static MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable groupIds = null, ResourceIdentifier privateEndpointId = null, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState = null, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = null) + public static MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable groupIds = null, ResourceIdentifier privateEndpointId = null, MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState = null) { groupIds ??= new List(); @@ -179,342 +178,144 @@ public static MySqlFlexibleServersPrivateEndpointConnectionData MySqlFlexibleSer systemData, groupIds?.ToList(), privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, - connectionState, + privateLinkServiceConnectionState, provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// zone name. - /// Supported high availability mode. - /// supported geo backup regions. - /// A list of supported flexible server editions. - /// A new instance for mocking. - public static MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, IEnumerable supportedHAMode = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null) + /// Initializes a new instance of . + /// Estimated seconds of downtime for the deployment. + /// Scheduled Availability zone of the standby server. + /// Expected Availability zone of the standby server. + /// A new instance for mocking. + public static HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = null, string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) { - supportedHAMode ??= new List(); - supportedGeoBackupRegions ??= new List(); - supportedFlexibleServerEditions ??= new List(); - - return new MySqlFlexibleServerCapabilityProperties(zone, supportedHAMode?.ToList(), supportedGeoBackupRegions?.ToList(), supportedFlexibleServerEditions?.ToList(), serializedAdditionalRawData: null); + return new HighAvailabilityValidationEstimation(estimatedDowntime, scheduledStandbyAvailabilityZone, expectedStandbyAvailabilityZone, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Server edition name. - /// A list of supported storage editions. - /// A list of supported server versions. - /// A new instance for mocking. - public static MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, IEnumerable supportedStorageEditions = null, IEnumerable supportedServerVersions = null) + /// Initializes a new instance of . + /// The name of the backup. + /// Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE). + /// A new instance for mocking. + public static MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, MySqlFlexibleServerBackupFormat? backupFormat = null) { - supportedStorageEditions ??= new List(); - supportedServerVersions ??= new List(); - - return new MySqlFlexibleServerEditionCapability(name, supportedStorageEditions?.ToList(), supportedServerVersions?.ToList(), serializedAdditionalRawData: null); + return new MySqlFlexibleServerBackupSettings(backupName, backupFormat, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// storage edition name. - /// The minimal supported storage size. - /// The maximum supported storage size. - /// Minimal backup retention days. - /// Maximum backup retention days. - /// Minimal backup interval hours. - /// Maximum backup interval hours. - /// A new instance for mocking. - public static MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = null, long? maxStorageSize = null, long? minBackupRetentionDays = null, long? maxBackupRetentionDays = null, long? minBackupIntervalHours = null, long? maxBackupIntervalHours = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Size of datasource in bytes. + /// Data transferred in bytes. + /// Metadata related to backup to be stored for restoring resource in key-value pairs. + /// The error object. + /// The operation status. + /// Start time. + /// End time. + /// Operation progress (0-100). + /// A new instance for mocking. + public static MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, long? datasourceSizeInBytes = null, long? dataTransferredInBytes = null, string backupMetadata = null, ResponseError error = null, MySqlFlexibleServerBackupAndExportOperationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null) { - return new MySqlFlexibleServerStorageEditionCapability( + return new MySqlFlexibleServerBackupAndExportResult( + id, name, - minStorageSize, - maxStorageSize, - minBackupRetentionDays, - maxBackupRetentionDays, - minBackupIntervalHours, - maxBackupIntervalHours, + resourceType, + systemData, + datasourceSizeInBytes, + dataTransferredInBytes, + backupMetadata, + error, + status, + startOn, + endOn, + percentComplete, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// server version. - /// A list of supported Skus. - /// A new instance for mocking. - public static MySqlFlexibleServerServerVersionCapability MySqlFlexibleServerServerVersionCapability(string name = null, IEnumerable supportedSkus = null) + /// Initializes a new instance of . + /// Estimated no of storage containers required for resource data to be backed up. + /// A new instance for mocking. + public static MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = null) { - supportedSkus ??= new List(); - - return new MySqlFlexibleServerServerVersionCapability(name, supportedSkus?.ToList(), serializedAdditionalRawData: null); + return new MySqlFlexibleServerValidateBackupResult(numberOfContainers, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// vCore name. - /// supported vCores. - /// supported IOPS. - /// supported memory per vCore in MB. - /// A new instance for mocking. - public static MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = null, long? supportedIops = null, long? supportedMemoryPerVCoreInMB = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The size in kb of the logFile. + /// Creation timestamp of the log file. + /// Type of the log file. + /// Last modified timestamp of the log file. + /// The url to download the log file from. + /// A new instance for mocking. + public static MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, long? sizeInKB = null, DateTimeOffset? createdOn = null, string typePropertiesType = null, DateTimeOffset? lastModifiedOn = null, Uri uri = null) { - return new MySqlFlexibleServerSkuCapability(name, vCores, supportedIops, supportedMemoryPerVCoreInMB, serializedAdditionalRawData: null); + return new MySqlFlexibleServerLogFile( + id, + name, + resourceType, + systemData, + sizeInKB, + createdOn, + typePropertiesType, + lastModifiedOn, + uri, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// supported geo backup regions. - /// A list of supported flexible server editions. - /// A list of supported server versions. - /// A list of supported features. - /// A new instance for mocking. - public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null, IEnumerable supportedServerVersions = null, IEnumerable supportedFeatures = null) + /// Backup type. + /// Backup completed time (ISO8601 format). + /// Backup source. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupType = null, DateTimeOffset? completedOn = null, string source = null) { - supportedGeoBackupRegions ??= new List(); - supportedFlexibleServerEditions ??= new List(); - supportedServerVersions ??= new List(); - supportedFeatures ??= new List(); - - return new MySqlFlexibleServersCapabilityData( + return new MySqlFlexibleServerBackupData( id, name, resourceType, systemData, - supportedGeoBackupRegions?.ToList(), - supportedFlexibleServerEditions?.ToList(), - supportedServerVersions?.ToList(), - supportedFeatures?.ToList(), + backupType, + completedOn, + source, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Server edition name. - /// Default Sku name. - /// Default storage size. - /// A list of supported storage editions. - /// A list of supported Skus. - /// A new instance for mocking. - public static ServerEditionCapabilityV2 ServerEditionCapabilityV2(string name = null, string defaultSku = null, int? defaultStorageSize = null, IEnumerable supportedStorageEditions = null, IEnumerable supportedSkus = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Backup name. + /// + /// Backup completed time (ISO8601 format). + /// Backup source. + /// The provisioning state of backup resource. + /// A new instance for mocking. + public static MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupNameV2 = null, MySqlFlexibleServerBackupType? backupType = null, DateTimeOffset? completedOn = null, string source = null, MySqlFlexibleServerBackupProvisioningState? provisioningState = null) { - supportedStorageEditions ??= new List(); - supportedSkus ??= new List(); - - return new ServerEditionCapabilityV2( + return new MySqlFlexibleServerBackupV2Data( + id, name, - defaultSku, - defaultStorageSize, - supportedStorageEditions?.ToList(), - supportedSkus?.ToList(), + resourceType, + systemData, + backupNameV2, + backupType, + completedOn, + source, + provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// vCore name. - /// supported vCores. - /// supported IOPS. - /// supported memory per vCore in MB. - /// Supported zones. - /// Supported high availability mode. - /// A new instance for mocking. - public static SkuCapabilityV2 SkuCapabilityV2(string name = null, long? vCores = null, long? supportedIops = null, long? supportedMemoryPerVCoreMB = null, IEnumerable supportedZones = null, IEnumerable supportedHAMode = null) - { - supportedZones ??= new List(); - supportedHAMode ??= new List(); - - return new SkuCapabilityV2( - name, - vCores, - supportedIops, - supportedMemoryPerVCoreMB, - supportedZones?.ToList(), - supportedHAMode?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// server version. - /// A new instance for mocking. - public static ServerVersionCapabilityV2 ServerVersionCapabilityV2(string name = null) - { - return new ServerVersionCapabilityV2(name, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// feature name. - /// feature value. - /// A new instance for mocking. - public static MySqlFlexibleServerFeatureProperty MySqlFlexibleServerFeatureProperty(string featureName = null, string featureValue = null) - { - return new MySqlFlexibleServerFeatureProperty(featureName, featureValue, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The location name. - /// The subscription id. - /// A list of delegated subnet usage. - /// A new instance for mocking. - public static MySqlFlexibleServerVirtualNetworkSubnetUsageResult MySqlFlexibleServerVirtualNetworkSubnetUsageResult(AzureLocation? location = null, string subscriptionId = null, IEnumerable delegatedSubnetsUsage = null) - { - delegatedSubnetsUsage ??= new List(); - - return new MySqlFlexibleServerVirtualNetworkSubnetUsageResult(location, subscriptionId, delegatedSubnetsUsage?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// name of the subnet. - /// Number of used delegated subnets. - /// A new instance for mocking. - public static MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = null) - { - return new MySqlFlexibleServerDelegatedSubnetUsage(subnetName, usage, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Type of the sever administrator. - /// Login name of the server administrator. - /// SID (object ID) of the server administrator. - /// Tenant ID of the administrator. - /// The resource id of the identity used for AAD Authentication. - /// A new instance for mocking. - public static MySqlFlexibleServerAadAdministratorData MySqlFlexibleServerAadAdministratorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MySqlFlexibleServerAdministratorType? administratorType = null, string login = null, string sid = null, Guid? tenantId = null, ResourceIdentifier identityResourceId = null) - { - return new MySqlFlexibleServerAadAdministratorData( - id, - name, - resourceType, - systemData, - administratorType, - login, - sid, - tenantId, - identityResourceId, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Specifies the UTC creation time of the policy. - /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. - /// Provisioning state of the Threat Protection. - /// A new instance for mocking. - public static AdvancedThreatProtectionData AdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, AdvancedThreatProtectionState? state = null, AdvancedThreatProtectionProvisioningState? provisioningState = null) - { - return new AdvancedThreatProtectionData( - id, - name, - resourceType, - systemData, - createdOn, - state, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of the backup. - /// Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE). - /// A new instance for mocking. - public static MySqlFlexibleServerBackupSettings MySqlFlexibleServerBackupSettings(string backupName = null, MySqlFlexibleServerBackupFormat? backupFormat = null) - { - return new MySqlFlexibleServerBackupSettings(backupName, backupFormat, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The error object. - /// The operation status. - /// Start time. - /// End time. - /// Operation progress (0-100). - /// Size of datasource in bytes. - /// Data transferred in bytes. - /// Metadata related to backup to be stored for restoring resource in key-value pairs. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupAndExportResult MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResponseError error = null, MySqlFlexibleServerBackupAndExportOperationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null, long? datasourceSizeInBytes = null, long? dataTransferredInBytes = null, string backupMetadata = null) - { - return new MySqlFlexibleServerBackupAndExportResult( - id, - name, - resourceType, - systemData, - error, - status, - startOn, - endOn, - percentComplete, - datasourceSizeInBytes, - dataTransferredInBytes, - backupMetadata, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Backup type. - /// Backup completed time (ISO8601 format). - /// Backup source. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupData MySqlFlexibleServerBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupType = null, DateTimeOffset? completedOn = null, string source = null) - { - return new MySqlFlexibleServerBackupData( - id, - name, - resourceType, - systemData, - backupType, - completedOn, - source, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Backup name. - /// - /// Backup completed time (ISO8601 format). - /// Backup source. - /// The provisioning state of backup resource. - /// A new instance for mocking. - public static MySqlFlexibleServerBackupV2Data MySqlFlexibleServerBackupV2Data(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string backupNameV2 = null, MySqlFlexibleServerBackupType? backupType = null, DateTimeOffset? completedOn = null, string source = null, MySqlFlexibleServerBackupProvisioningState? provisioningState = null) - { - return new MySqlFlexibleServerBackupV2Data( - id, - name, - resourceType, - systemData, - backupNameV2, - backupType, - completedOn, - source, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The Configuration items on this page. - /// The link to the next page of items. - /// A new instance for mocking. - public static MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(IEnumerable values = null, Uri nextLink = null) - { - values ??= new List(); - - return new MySqlFlexibleServerConfigurations(values?.ToList(), nextLink, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -553,6 +354,17 @@ public static MySqlFlexibleServerConfigurationData MySqlFlexibleServerConfigurat serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The Configuration items on this page. + /// The link to the next page of items. + /// A new instance for mocking. + public static MySqlFlexibleServerConfigurations MySqlFlexibleServerConfigurations(IEnumerable values = null, Uri nextLink = null) + { + values ??= new List(); + + return new MySqlFlexibleServerConfigurations(values?.ToList(), nextLink, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -593,32 +405,140 @@ public static MySqlFlexibleServerFirewallRuleData MySqlFlexibleServerFirewallRul serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The size in kb of the logFile. - /// Creation timestamp of the log file. - /// Type of the log file. - /// Last modified timestamp of the log file. - /// The url to download the log file from. - /// A new instance for mocking. - public static MySqlFlexibleServerLogFile MySqlFlexibleServerLogFile(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, long? sizeInKB = null, DateTimeOffset? createdOn = null, string typePropertiesType = null, DateTimeOffset? lastModifiedOn = null, Uri uri = null) + /// Specifies the UTC creation time of the policy. + /// Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. + /// Provisioning state of the Threat Protection. + /// A new instance for mocking. + public static AdvancedThreatProtectionData AdvancedThreatProtectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, AdvancedThreatProtectionState? state = null, AdvancedThreatProtectionProvisioningState? provisioningState = null) { - return new MySqlFlexibleServerLogFile( + return new AdvancedThreatProtectionData( id, name, resourceType, systemData, - sizeInKB, createdOn, - typePropertiesType, - lastModifiedOn, - uri, + state, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// supported geo backup regions. + /// A list of supported flexible server editions. + /// A list of supported server versions. + /// A list of supported features. + /// A new instance for mocking. + public static MySqlFlexibleServersCapabilityData MySqlFlexibleServersCapabilityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null, IEnumerable supportedServerVersions = null, IEnumerable supportedFeatures = null) + { + supportedGeoBackupRegions ??= new List(); + supportedFlexibleServerEditions ??= new List(); + supportedServerVersions ??= new List(); + supportedFeatures ??= new List(); + + return new MySqlFlexibleServersCapabilityData( + id, + name, + resourceType, + systemData, + supportedGeoBackupRegions?.ToList(), + supportedFlexibleServerEditions?.ToList(), + supportedServerVersions?.ToList(), + supportedFeatures?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Server edition name. + /// Default Sku name. + /// Default storage size. + /// A list of supported storage editions. + /// A list of supported Skus. + /// A new instance for mocking. + public static ServerEditionCapabilityV2 ServerEditionCapabilityV2(string name = null, string defaultSku = null, int? defaultStorageSize = null, IEnumerable supportedStorageEditions = null, IEnumerable supportedSkus = null) + { + supportedStorageEditions ??= new List(); + supportedSkus ??= new List(); + + return new ServerEditionCapabilityV2( + name, + defaultSku, + defaultStorageSize, + supportedStorageEditions?.ToList(), + supportedSkus?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// storage edition name. + /// The minimal supported storage size. + /// The maximum supported storage size. + /// Minimal backup retention days. + /// Maximum backup retention days. + /// Minimal backup interval hours. + /// Maximum backup interval hours. + /// A new instance for mocking. + public static MySqlFlexibleServerStorageEditionCapability MySqlFlexibleServerStorageEditionCapability(string name = null, long? minStorageSize = null, long? maxStorageSize = null, long? minBackupRetentionDays = null, long? maxBackupRetentionDays = null, long? minBackupIntervalHours = null, long? maxBackupIntervalHours = null) + { + return new MySqlFlexibleServerStorageEditionCapability( + name, + minStorageSize, + maxStorageSize, + minBackupRetentionDays, + maxBackupRetentionDays, + minBackupIntervalHours, + maxBackupIntervalHours, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// vCore name. + /// supported vCores. + /// supported IOPS. + /// supported memory per vCore in MB. + /// Supported zones. + /// Supported high availability mode. + /// A new instance for mocking. + public static SkuCapabilityV2 SkuCapabilityV2(string name = null, long? vCores = null, long? supportedIops = null, long? supportedMemoryPerVCoreMB = null, IEnumerable supportedZones = null, IEnumerable supportedHAMode = null) + { + supportedZones ??= new List(); + supportedHAMode ??= new List(); + + return new SkuCapabilityV2( + name, + vCores, + supportedIops, + supportedMemoryPerVCoreMB, + supportedZones?.ToList(), + supportedHAMode?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// server version. + /// A new instance for mocking. + public static ServerVersionCapabilityV2 ServerVersionCapabilityV2(string name = null) + { + return new ServerVersionCapabilityV2(name, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// feature name. + /// feature value. + /// A new instance for mocking. + public static MySqlFlexibleServerFeatureProperty MySqlFlexibleServerFeatureProperty(string featureName = null, string featureValue = null) + { + return new MySqlFlexibleServerFeatureProperty(featureName, featureValue, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -657,47 +577,102 @@ public static MySqlFlexibleServerMaintenanceData MySqlFlexibleServerMaintenanceD serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource private link DNS zone name. - /// A new instance for mocking. - public static MySqlFlexibleServersPrivateLinkResourceData MySqlFlexibleServersPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + /// Initializes a new instance of . + /// zone name. + /// Supported high availability mode. + /// supported geo backup regions. + /// A list of supported flexible server editions. + /// A new instance for mocking. + public static MySqlFlexibleServerCapabilityProperties MySqlFlexibleServerCapabilityProperties(string zone = null, IEnumerable supportedHAMode = null, IEnumerable supportedGeoBackupRegions = null, IEnumerable supportedFlexibleServerEditions = null) { - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); + supportedHAMode ??= new List(); + supportedGeoBackupRegions ??= new List(); + supportedFlexibleServerEditions ??= new List(); - return new MySqlFlexibleServersPrivateLinkResourceData( - id, - name, - resourceType, - systemData, - groupId, - requiredMembers?.ToList(), - requiredZoneNames?.ToList(), - serializedAdditionalRawData: null); + return new MySqlFlexibleServerCapabilityProperties(zone, supportedHAMode?.ToList(), supportedGeoBackupRegions?.ToList(), supportedFlexibleServerEditions?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Estimated no of storage containers required for resource data to be backed up. - /// A new instance for mocking. - public static MySqlFlexibleServerValidateBackupResult MySqlFlexibleServerValidateBackupResult(int? numberOfContainers = null) + /// Initializes a new instance of . + /// Server edition name. + /// A list of supported storage editions. + /// A list of supported server versions. + /// A new instance for mocking. + public static MySqlFlexibleServerEditionCapability MySqlFlexibleServerEditionCapability(string name = null, IEnumerable supportedStorageEditions = null, IEnumerable supportedServerVersions = null) { - return new MySqlFlexibleServerValidateBackupResult(numberOfContainers, serializedAdditionalRawData: null); + supportedStorageEditions ??= new List(); + supportedServerVersions ??= new List(); + + return new MySqlFlexibleServerEditionCapability(name, supportedStorageEditions?.ToList(), supportedServerVersions?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Estimated seconds of downtime for the deployment. - /// Scheduled Availability zone of the standby server. - /// Expected Availability zone of the standby server. - /// A new instance for mocking. - public static HighAvailabilityValidationEstimation HighAvailabilityValidationEstimation(int? estimatedDowntime = null, string scheduledStandbyAvailabilityZone = null, string expectedStandbyAvailabilityZone = null) + /// Initializes a new instance of . + /// server version. + /// A list of supported Skus. + /// A new instance for mocking. + public static MySqlFlexibleServerServerVersionCapability MySqlFlexibleServerServerVersionCapability(string name = null, IEnumerable supportedSkus = null) { - return new HighAvailabilityValidationEstimation(estimatedDowntime, scheduledStandbyAvailabilityZone, expectedStandbyAvailabilityZone, serializedAdditionalRawData: null); + supportedSkus ??= new List(); + + return new MySqlFlexibleServerServerVersionCapability(name, supportedSkus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// vCore name. + /// supported vCores. + /// supported IOPS. + /// supported memory per vCore in MB. + /// A new instance for mocking. + public static MySqlFlexibleServerSkuCapability MySqlFlexibleServerSkuCapability(string name = null, long? vCores = null, long? supportedIops = null, long? supportedMemoryPerVCoreInMB = null) + { + return new MySqlFlexibleServerSkuCapability(name, vCores, supportedIops, supportedMemoryPerVCoreInMB, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The location name. + /// The subscription id. + /// A list of delegated subnet usage. + /// A new instance for mocking. + public static MySqlFlexibleServerVirtualNetworkSubnetUsageResult MySqlFlexibleServerVirtualNetworkSubnetUsageResult(AzureLocation? location = null, string subscriptionId = null, IEnumerable delegatedSubnetsUsage = null) + { + delegatedSubnetsUsage ??= new List(); + + return new MySqlFlexibleServerVirtualNetworkSubnetUsageResult(location, subscriptionId, delegatedSubnetsUsage?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// name of the subnet. + /// Number of used delegated subnets. + /// A new instance for mocking. + public static MySqlFlexibleServerDelegatedSubnetUsage MySqlFlexibleServerDelegatedSubnetUsage(string subnetName = null, long? usage = null) + { + return new MySqlFlexibleServerDelegatedSubnetUsage(subnetName, usage, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource name to verify. + /// Resource type used for verification. + /// A new instance for mocking. + public static MySqlFlexibleServerNameAvailabilityContent MySqlFlexibleServerNameAvailabilityContent(string name = null, ResourceType? resourceType = null) + { + return new MySqlFlexibleServerNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Error Message. + /// Indicates whether the resource name is available. + /// Reason for name being unavailable. + /// A new instance for mocking. + public static MySqlFlexibleServerNameAvailabilityResult MySqlFlexibleServerNameAvailabilityResult(string message = null, bool? isNameAvailable = null, string reason = null) + { + return new MySqlFlexibleServerNameAvailabilityResult(message, isNameAvailable, reason, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the private DNS zone suffix. + /// A new instance for mocking. + public static MySqlFlexibleServerPrivateDnsZoneSuffixResponse MySqlFlexibleServerPrivateDnsZoneSuffixResponse(string privateDnsZoneSuffix = null) + { + return new MySqlFlexibleServerPrivateDnsZoneSuffixResponse(privateDnsZoneSuffix, serializedAdditionalRawData: null); } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs index 278f15be87a9..b99755d39aa2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/FlexibleServersExtensions.cs @@ -38,44 +38,6 @@ private static MockableMySqlFlexibleServersTenantResource GetMockableMySqlFlexib return resource.GetCachedClient(client => new MockableMySqlFlexibleServersTenantResource(client, resource.Id)); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MySqlFlexibleServerResource GetMySqlFlexibleServerResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersCapabilityResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -96,22 +58,22 @@ public static MySqlFlexibleServerAadAdministratorResource GetMySqlFlexibleServer } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServerResource GetMySqlFlexibleServerResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetAdvancedThreatProtectionResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerResource(id); } /// @@ -210,60 +172,79 @@ public static MySqlFlexibleServerFirewallRuleResource GetMySqlFlexibleServerFire } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerMaintenanceResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetAdvancedThreatProtectionResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersPrivateEndpointConnectionResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersCapabilityResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MySqlFlexibleServerMaintenanceResource GetMySqlFlexibleServerMaintenanceResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersPrivateLinkResource(id); + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServerMaintenanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFlexibleServersPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMySqlFlexibleServersArmClient(client).GetMySqlFlexibleServersPrivateEndpointConnectionResource(id); } /// @@ -292,11 +273,11 @@ public static MySqlFlexibleServerCollection GetMySqlFlexibleServers(this Resourc /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -330,11 +311,11 @@ public static async Task> GetMySqlFlexible /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -386,11 +367,11 @@ public static MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersCa /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -425,11 +406,11 @@ public static async Task> GetMy /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -456,205 +437,207 @@ public static Response GetMySqlFlexibleS } /// - /// Check the availability of name for server + /// List all the servers in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers /// /// /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute + /// Server_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The request body. /// The cancellation token to use. - /// or is null. - public static async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMySqlFlexibleServersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content, cancellationToken).ConfigureAwait(false); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServersAsync(cancellationToken); } /// - /// Check the availability of name for server + /// List all the servers in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers /// /// /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute + /// Server_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The request body. /// The cancellation token to use. - /// or is null. - public static Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMySqlFlexibleServers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(content, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServers(cancellationToken); } /// - /// List all the servers in a given subscription. + /// Get capabilities at specified location in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities /// /// /// Operation Id - /// Servers_List + /// LocationBasedCapabilities_List /// /// /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name of the location. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMySqlFlexibleServersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetLocationBasedCapabilitiesAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServersAsync(cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilitiesAsync(locationName, cancellationToken); } /// - /// List all the servers in a given subscription. + /// Get capabilities at specified location in a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/flexibleServers + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities /// /// /// Operation Id - /// Servers_List + /// LocationBasedCapabilities_List /// /// /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name of the location. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMySqlFlexibleServers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetLocationBasedCapabilities(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetMySqlFlexibleServers(cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilities(locationName, cancellationToken); } /// - /// Get capabilities at specified location in a given subscription. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// LocationBasedCapabilities_List + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The name of the location. + /// The request body. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetLocationBasedCapabilitiesAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilitiesAsync(locationName, cancellationToken); + return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); } /// - /// Get capabilities at specified location in a given subscription. + /// Get virtual network subnet usage for a given vNet resource id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage /// /// /// Operation Id - /// LocationBasedCapabilities_List + /// CheckVirtualNetworkSubnetUsage_Execute /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The name of the location. + /// The request body. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetLocationBasedCapabilities(this SubscriptionResource subscriptionResource, AzureLocation locationName, CancellationToken cancellationToken = default) + /// or is null. + public static Response ExecuteCheckVirtualNetworkSubnetUsage(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).GetLocationBasedCapabilities(locationName, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsage(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); } /// @@ -666,11 +649,11 @@ public static Pageable GetLocationBased /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// CheckNameAvailability_CheckMySqlFlexibleServerNameAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -699,11 +682,11 @@ public static async Task> Ch /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// CheckNameAvailability_CheckMySqlFlexibleServerNameAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -724,69 +707,67 @@ public static Response CheckMySqlFlex } /// - /// Get virtual network subnet usage for a given vNet resource id. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// CheckNameAvailabilityWithoutLocation_CheckMySqlFlexibleServerNameAvailabilityWithoutLocation /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the location. - /// The request body. + /// The request body. /// The cancellation token to use. - /// or is null. - public static async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// or is null. + public static async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); + return await GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content, cancellationToken).ConfigureAwait(false); } /// - /// Get virtual network subnet usage for a given vNet resource id. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// CheckNameAvailabilityWithoutLocation_CheckMySqlFlexibleServerNameAvailabilityWithoutLocation /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the location. - /// The request body. + /// The request body. /// The cancellation token to use. - /// or is null. - public static Response ExecuteCheckVirtualNetworkSubnetUsage(this SubscriptionResource subscriptionResource, AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// or is null. + public static Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(this SubscriptionResource subscriptionResource, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).ExecuteCheckVirtualNetworkSubnetUsage(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); + return GetMockableMySqlFlexibleServersSubscriptionResource(subscriptionResource).CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(content, cancellationToken); } /// @@ -802,7 +783,7 @@ public static Response Execu /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -833,7 +814,7 @@ public static async Task /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs index 980d10e3af5b..36139fa3cf2a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersArmClient.cs @@ -34,30 +34,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MySqlFlexibleServerResource GetMySqlFlexibleServerResource(ResourceIdentifier id) - { - MySqlFlexibleServerResource.ValidateResourceId(id); - return new MySqlFlexibleServerResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(ResourceIdentifier id) - { - MySqlFlexibleServersCapabilityResource.ValidateResourceId(id); - return new MySqlFlexibleServersCapabilityResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -71,15 +47,15 @@ public virtual MySqlFlexibleServerAadAdministratorResource GetMySqlFlexibleServe } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(ResourceIdentifier id) + /// Returns a object. + public virtual MySqlFlexibleServerResource GetMySqlFlexibleServerResource(ResourceIdentifier id) { - AdvancedThreatProtectionResource.ValidateResourceId(id); - return new AdvancedThreatProtectionResource(Client, id); + MySqlFlexibleServerResource.ValidateResourceId(id); + return new MySqlFlexibleServerResource(Client, id); } /// @@ -142,6 +118,30 @@ public virtual MySqlFlexibleServerFirewallRuleResource GetMySqlFlexibleServerFir return new MySqlFlexibleServerFirewallRuleResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AdvancedThreatProtectionResource GetAdvancedThreatProtectionResource(ResourceIdentifier id) + { + AdvancedThreatProtectionResource.ValidateResourceId(id); + return new AdvancedThreatProtectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MySqlFlexibleServersCapabilityResource GetMySqlFlexibleServersCapabilityResource(ResourceIdentifier id) + { + MySqlFlexibleServersCapabilityResource.ValidateResourceId(id); + return new MySqlFlexibleServersCapabilityResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -165,17 +165,5 @@ public virtual MySqlFlexibleServersPrivateEndpointConnectionResource GetMySqlFle MySqlFlexibleServersPrivateEndpointConnectionResource.ValidateResourceId(id); return new MySqlFlexibleServersPrivateEndpointConnectionResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MySqlFlexibleServersPrivateLinkResource GetMySqlFlexibleServersPrivateLinkResource(ResourceIdentifier id) - { - MySqlFlexibleServersPrivateLinkResource.ValidateResourceId(id); - return new MySqlFlexibleServersPrivateLinkResource(Client, id); - } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs index 7de3180eff17..96fb252a902c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual MySqlFlexibleServerCollection GetMySqlFlexibleServers() /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetMySqlFlexibl /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs index dc212b3477d9..55413bc8fecc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs @@ -18,16 +18,16 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableMySqlFlexibleServersSubscriptionResource : ArmResource { - private ClientDiagnostics _checkNameAvailabilityWithoutLocationClientDiagnostics; - private CheckNameAvailabilityWithoutLocationRestOperations _checkNameAvailabilityWithoutLocationRestClient; private ClientDiagnostics _mySqlFlexibleServerServersClientDiagnostics; private ServersRestOperations _mySqlFlexibleServerServersRestClient; private ClientDiagnostics _locationBasedCapabilitiesClientDiagnostics; private LocationBasedCapabilitiesRestOperations _locationBasedCapabilitiesRestClient; - private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; - private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; private ClientDiagnostics _checkVirtualNetworkSubnetUsageClientDiagnostics; private CheckVirtualNetworkSubnetUsageRestOperations _checkVirtualNetworkSubnetUsageRestClient; + private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; + private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; + private ClientDiagnostics _checkNameAvailabilityWithoutLocationClientDiagnostics; + private CheckNameAvailabilityWithoutLocationRestOperations _checkNameAvailabilityWithoutLocationRestClient; /// Initializes a new instance of the class for mocking. protected MockableMySqlFlexibleServersSubscriptionResource() @@ -41,16 +41,16 @@ internal MockableMySqlFlexibleServersSubscriptionResource(ArmClient client, Reso { } - private ClientDiagnostics CheckNameAvailabilityWithoutLocationClientDiagnostics => _checkNameAvailabilityWithoutLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private CheckNameAvailabilityWithoutLocationRestOperations CheckNameAvailabilityWithoutLocationRestClient => _checkNameAvailabilityWithoutLocationRestClient ??= new CheckNameAvailabilityWithoutLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics MySqlFlexibleServerServersClientDiagnostics => _mySqlFlexibleServerServersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServerResource.ResourceType.Namespace, Diagnostics); private ServersRestOperations MySqlFlexibleServerServersRestClient => _mySqlFlexibleServerServersRestClient ??= new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MySqlFlexibleServerResource.ResourceType)); private ClientDiagnostics LocationBasedCapabilitiesClientDiagnostics => _locationBasedCapabilitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); private LocationBasedCapabilitiesRestOperations LocationBasedCapabilitiesRestClient => _locationBasedCapabilitiesRestClient ??= new LocationBasedCapabilitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics CheckVirtualNetworkSubnetUsageClientDiagnostics => _checkVirtualNetworkSubnetUsageClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); private CheckVirtualNetworkSubnetUsageRestOperations CheckVirtualNetworkSubnetUsageRestClient => _checkVirtualNetworkSubnetUsageRestClient ??= new CheckVirtualNetworkSubnetUsageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics CheckNameAvailabilityWithoutLocationClientDiagnostics => _checkNameAvailabilityWithoutLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityWithoutLocationRestOperations CheckNameAvailabilityWithoutLocationRestClient => _checkNameAvailabilityWithoutLocationRestClient ??= new CheckNameAvailabilityWithoutLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -75,11 +75,11 @@ public virtual MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersC /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -107,11 +107,11 @@ public virtual async Task> GetM /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -130,82 +130,6 @@ public virtual Response GetMySqlFlexible return GetMySqlFlexibleServersCapabilities(locationName).Get(capabilitySetName, cancellationToken); } - /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// - /// The request body. - /// The cancellation token to use. - /// is null. - public virtual async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); - scope.Start(); - try - { - var response = await CheckNameAvailabilityWithoutLocationRestClient.ExecuteAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Check the availability of name for server - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability - /// - /// - /// Operation Id - /// CheckNameAvailabilityWithoutLocation_Execute - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// - /// The request body. - /// The cancellation token to use. - /// is null. - public virtual Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); - scope.Start(); - try - { - var response = CheckNameAvailabilityWithoutLocationRestClient.Execute(Id.SubscriptionId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// List all the servers in a given subscription. /// @@ -215,11 +139,11 @@ public virtual Response CheckMySqlFle /// /// /// Operation Id - /// Servers_List + /// Server_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -245,11 +169,11 @@ public virtual AsyncPageable GetMySqlFlexibleServer /// /// /// Operation Id - /// Servers_List + /// Server_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -279,7 +203,7 @@ public virtual Pageable GetMySqlFlexibleServers(Can /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -306,7 +230,7 @@ public virtual AsyncPageable GetLocatio /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -320,6 +244,84 @@ public virtual Pageable GetLocationBase return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerCapabilityProperties.DeserializeMySqlFlexibleServerCapabilityProperties(e), LocationBasedCapabilitiesClientDiagnostics, Pipeline, "MockableMySqlFlexibleServersSubscriptionResource.GetLocationBasedCapabilities", "value", "nextLink", cancellationToken); } + /// + /// Get virtual network subnet usage for a given vNet resource id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// + /// + /// Operation Id + /// CheckVirtualNetworkSubnetUsage_Execute + /// + /// + /// Default Api Version + /// 2024-12-30 + /// + /// + /// + /// The name of the location. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); + + using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); + scope.Start(); + try + { + var response = await CheckVirtualNetworkSubnetUsageRestClient.ExecuteAsync(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get virtual network subnet usage for a given vNet resource id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// + /// + /// Operation Id + /// CheckVirtualNetworkSubnetUsage_Execute + /// + /// + /// Default Api Version + /// 2024-12-30 + /// + /// + /// + /// The name of the location. + /// The request body. + /// The cancellation token to use. + /// is null. + public virtual Response ExecuteCheckVirtualNetworkSubnetUsage(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); + + using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); + scope.Start(); + try + { + var response = CheckVirtualNetworkSubnetUsageRestClient.Execute(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the availability of name for server /// @@ -329,11 +331,11 @@ public virtual Pageable GetLocationBase /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// CheckNameAvailability_CheckMySqlFlexibleServerNameAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -349,7 +351,7 @@ public virtual async Task> C scope.Start(); try { - var response = await CheckNameAvailabilityRestClient.ExecuteAsync(Id.SubscriptionId, locationName, content, cancellationToken).ConfigureAwait(false); + var response = await CheckNameAvailabilityRestClient.CheckMySqlFlexibleServerNameAvailabilityAsync(Id.SubscriptionId, locationName, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -368,11 +370,11 @@ public virtual async Task> C /// /// /// Operation Id - /// CheckNameAvailability_Execute + /// CheckNameAvailability_CheckMySqlFlexibleServerNameAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -388,7 +390,7 @@ public virtual Response CheckMySqlFle scope.Start(); try { - var response = CheckNameAvailabilityRestClient.Execute(Id.SubscriptionId, locationName, content, cancellationToken); + var response = CheckNameAvailabilityRestClient.CheckMySqlFlexibleServerNameAvailability(Id.SubscriptionId, locationName, content, cancellationToken); return response; } catch (Exception e) @@ -399,35 +401,34 @@ public virtual Response CheckMySqlFle } /// - /// Get virtual network subnet usage for a given vNet resource id. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// CheckNameAvailabilityWithoutLocation_CheckMySqlFlexibleServerNameAvailabilityWithoutLocation /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// - /// The name of the location. - /// The request body. + /// The request body. /// The cancellation token to use. - /// is null. - public virtual async Task> ExecuteCheckVirtualNetworkSubnetUsageAsync(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); + using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); scope.Start(); try { - var response = await CheckVirtualNetworkSubnetUsageRestClient.ExecuteAsync(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken).ConfigureAwait(false); + var response = await CheckNameAvailabilityWithoutLocationRestClient.CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -438,35 +439,34 @@ public virtual async Task - /// Get virtual network subnet usage for a given vNet resource id. + /// Check the availability of name for server /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkVirtualNetworkSubnetUsage + /// /subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/checkNameAvailability /// /// /// Operation Id - /// CheckVirtualNetworkSubnetUsage_Execute + /// CheckNameAvailabilityWithoutLocation_CheckMySqlFlexibleServerNameAvailabilityWithoutLocation /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// - /// The name of the location. - /// The request body. + /// The request body. /// The cancellation token to use. - /// is null. - public virtual Response ExecuteCheckVirtualNetworkSubnetUsage(AzureLocation locationName, MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, nameof(mySqlFlexibleServerVirtualNetworkSubnetUsageParameter)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = CheckVirtualNetworkSubnetUsageClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.ExecuteCheckVirtualNetworkSubnetUsage"); + using var scope = CheckNameAvailabilityWithoutLocationClientDiagnostics.CreateScope("MockableMySqlFlexibleServersSubscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation"); scope.Start(); try { - var response = CheckVirtualNetworkSubnetUsageRestClient.Execute(Id.SubscriptionId, locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter, cancellationToken); + var response = CheckNameAvailabilityWithoutLocationRestClient.CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(Id.SubscriptionId, content, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs index 940b7ddd7b9b..99984c61211e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs @@ -54,7 +54,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -88,7 +88,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs index d2516a3acd01..86970fd04a36 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/AzureResourceManagerMySqlContext.cs @@ -85,17 +85,12 @@ namespace Azure.ResourceManager.MySql [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionData))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionListResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateEndpointConnectionResource))] - [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResource))] - [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResourceData))] - [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkResourceListResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServersPrivateLinkServiceConnectionState))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerStorage))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerStorageEditionCapability))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerValidateBackupResult))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerVirtualNetworkSubnetUsageParameter))] [ModelReaderWriterBuildable(typeof(MySqlFlexibleServerVirtualNetworkSubnetUsageResult))] - [ModelReaderWriterBuildable(typeof(OperationStatusExtendedResult))] - [ModelReaderWriterBuildable(typeof(FlexibleServers.Models.OperationStatusResult))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(ServerBackupV2ListResult))] [ModelReaderWriterBuildable(typeof(ServerEditionCapabilityV2))] diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs index 716bc6c8a9f5..7a36958a8326 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs @@ -233,14 +233,14 @@ internal static MySqlFlexibleServerBackupAndExportResult DeserializeMySqlFlexibl name, type, systemData, + datasourceSizeInBytes, + dataTransferredInBytes, + backupMetadata, error, status, startTime, endTime, percentComplete, - datasourceSizeInBytes, - dataTransferredInBytes, - backupMetadata, serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs index 9638f3d1c447..b3e7affc09ed 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerBackupAndExportResult.cs @@ -57,28 +57,34 @@ public MySqlFlexibleServerBackupAndExportResult() /// The name. /// The resourceType. /// The systemData. + /// Size of datasource in bytes. + /// Data transferred in bytes. + /// Metadata related to backup to be stored for restoring resource in key-value pairs. /// The error object. /// The operation status. /// Start time. /// End time. /// Operation progress (0-100). - /// Size of datasource in bytes. - /// Data transferred in bytes. - /// Metadata related to backup to be stored for restoring resource in key-value pairs. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResponseError error, MySqlFlexibleServerBackupAndExportOperationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, long? datasourceSizeInBytes, long? dataTransferredInBytes, string backupMetadata, ResponseError error, MySqlFlexibleServerBackupAndExportOperationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + DatasourceSizeInBytes = datasourceSizeInBytes; + DataTransferredInBytes = dataTransferredInBytes; + BackupMetadata = backupMetadata; Error = error; Status = status; StartOn = startOn; EndOn = endOn; PercentComplete = percentComplete; - DatasourceSizeInBytes = datasourceSizeInBytes; - DataTransferredInBytes = dataTransferredInBytes; - BackupMetadata = backupMetadata; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Size of datasource in bytes. + public long? DatasourceSizeInBytes { get; set; } + /// Data transferred in bytes. + public long? DataTransferredInBytes { get; set; } + /// Metadata related to backup to be stored for restoring resource in key-value pairs. + public string BackupMetadata { get; set; } /// The error object. public ResponseError Error { get; set; } /// The operation status. @@ -89,11 +95,5 @@ internal MySqlFlexibleServerBackupAndExportResult(ResourceIdentifier id, string public DateTimeOffset? EndOn { get; set; } /// Operation progress (0-100). public double? PercentComplete { get; set; } - /// Size of datasource in bytes. - public long? DatasourceSizeInBytes { get; set; } - /// Data transferred in bytes. - public long? DataTransferredInBytes { get; set; } - /// Metadata related to backup to be stored for restoring resource in key-value pairs. - public string BackupMetadata { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs index 9344e7dd47ac..9d9155a90a16 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs @@ -40,7 +40,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Values) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs index 93ea5ea4b70b..5780e6c0983d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerConfigurations.cs @@ -61,9 +61,6 @@ internal MySqlFlexibleServerConfigurations(IReadOnlyList The Configuration items on this page. - public IReadOnlyList Values { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs index 7780bbec6097..e2381a4b15c9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerEnableStatusEnum.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// Whether or not geo redundant backup is enabled. + /// Enum to indicate whether value is 'Enabled' or 'Disabled'. public readonly partial struct MySqlFlexibleServerEnableStatusEnum : IEquatable { private readonly string _value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs index 6184648e04d7..0225bbe6c2ad 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs @@ -303,7 +303,6 @@ internal static MySqlFlexibleServerPatch DeserializeMySqlFlexibleServerPatch(Jso return new MySqlFlexibleServerPatch( identity, sku, - tags ?? new ChangeTrackingDictionary(), administratorLoginPassword, version, storage, @@ -314,6 +313,7 @@ internal static MySqlFlexibleServerPatch DeserializeMySqlFlexibleServerPatch(Jso replicationRole, dataEncryption, network, + tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs index 4be3aaac147e..7bb7bc80eb3a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerPatch.cs @@ -55,7 +55,6 @@ public MySqlFlexibleServerPatch() /// Initializes a new instance of . /// The cmk identity for the server. Current supported identity types: UserAssigned. /// The SKU (pricing tier) of the server. - /// Application-specific metadata in the form of key-value pairs. /// The password of the administrator login. /// Server version. /// Storage related properties of a server. @@ -66,12 +65,12 @@ public MySqlFlexibleServerPatch() /// The replication role of the server. /// The Data Encryption for CMK. /// Network related properties of a server. + /// Application-specific metadata in the form of key-value pairs. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, IDictionary tags, string administratorLoginPassword, MySqlFlexibleServerVersion? version, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, MySqlFlexibleServerReplicationRole? replicationRole, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerNetwork network, IDictionary serializedAdditionalRawData) + internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLoginPassword, MySqlFlexibleServerVersion? version, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, MySqlFlexibleServerReplicationRole? replicationRole, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerNetwork network, IDictionary tags, IDictionary serializedAdditionalRawData) { Identity = identity; Sku = sku; - Tags = tags; AdministratorLoginPassword = administratorLoginPassword; Version = version; Storage = storage; @@ -82,6 +81,7 @@ internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexible ReplicationRole = replicationRole; DataEncryption = dataEncryption; Network = network; + Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,8 +89,6 @@ internal MySqlFlexibleServerPatch(ManagedServiceIdentity identity, MySqlFlexible public ManagedServiceIdentity Identity { get; set; } /// The SKU (pricing tier) of the server. public MySqlFlexibleServerSku Sku { get; set; } - /// Application-specific metadata in the form of key-value pairs. - public IDictionary Tags { get; } /// The password of the administrator login. public string AdministratorLoginPassword { get; set; } /// Server version. @@ -123,5 +121,7 @@ public MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy public MySqlFlexibleServerDataEncryption DataEncryption { get; set; } /// Network related properties of a server. public MySqlFlexibleServerNetwork Network { get; set; } + /// Application-specific metadata in the form of key-value pairs. + public IDictionary Tags { get; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs index b86ed7716f13..82116bec9057 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServerStorageRedundancyType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers.Models { - /// The redundant type of the server storage. The parameter is used for server creation. + /// Enum to indicate whether storage sku value is 'ZoneRedundancy' or 'LocalRedundancy'. public readonly partial struct MySqlFlexibleServerStorageRedundancyType : IEquatable { private readonly string _value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs index 6293b94eee46..8bd31d208a24 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointConnectionProvisioningState.cs @@ -27,13 +27,13 @@ public MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(string val private const string DeletingValue = "Deleting"; private const string FailedValue = "Failed"; - /// Succeeded. + /// Connection has been provisioned. public static MySqlFlexibleServersPrivateEndpointConnectionProvisioningState Succeeded { get; } = new MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(SucceededValue); - /// Creating. + /// Connection is being created. public static MySqlFlexibleServersPrivateEndpointConnectionProvisioningState Creating { get; } = new MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(CreatingValue); - /// Deleting. + /// Connection is being deleted. public static MySqlFlexibleServersPrivateEndpointConnectionProvisioningState Deleting { get; } = new MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(DeletingValue); - /// Failed. + /// Connection provisioning has failed. public static MySqlFlexibleServersPrivateEndpointConnectionProvisioningState Failed { get; } = new MySqlFlexibleServersPrivateEndpointConnectionProvisioningState(FailedValue); /// Determines if two values are the same. public static bool operator ==(MySqlFlexibleServersPrivateEndpointConnectionProvisioningState left, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState right) => left.Equals(right); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs index 2471c89bafff..2bef78db70e9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.cs @@ -26,11 +26,11 @@ public MySqlFlexibleServersPrivateEndpointServiceConnectionStatus(string value) private const string ApprovedValue = "Approved"; private const string RejectedValue = "Rejected"; - /// Pending. + /// Connection waiting for approval or rejection. public static MySqlFlexibleServersPrivateEndpointServiceConnectionStatus Pending { get; } = new MySqlFlexibleServersPrivateEndpointServiceConnectionStatus(PendingValue); - /// Approved. + /// Connection approved. public static MySqlFlexibleServersPrivateEndpointServiceConnectionStatus Approved { get; } = new MySqlFlexibleServersPrivateEndpointServiceConnectionStatus(ApprovedValue); - /// Rejected. + /// Connection Rejected. public static MySqlFlexibleServersPrivateEndpointServiceConnectionStatus Rejected { get; } = new MySqlFlexibleServersPrivateEndpointServiceConnectionStatus(RejectedValue); /// Determines if two values are the same. public static bool operator ==(MySqlFlexibleServersPrivateEndpointServiceConnectionStatus left, MySqlFlexibleServersPrivateEndpointServiceConnectionStatus right) => left.Equals(right); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs deleted file mode 100644 index 4f93c7391a2e..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.Serialization.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MySql.FlexibleServers.Models -{ - internal partial class MySqlFlexibleServersPrivateLinkResourceListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - MySqlFlexibleServersPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement, options); - } - - internal static MySqlFlexibleServersPrivateLinkResourceListResult DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MySqlFlexibleServersPrivateLinkResourceListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerMySqlContext.Default); - default: - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); - } - } - - MySqlFlexibleServersPrivateLinkResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs deleted file mode 100644 index 80c3ffdff231..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/OperationStatusExtendedResult.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MySql.FlexibleServers.Models -{ - /// Represents Operation Results API Response. - public partial class OperationStatusExtendedResult : OperationStatusResult - { - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs index 5e73991695e7..265fde1f89d4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AzureADAdministrators_CreateOrUpdate + /// AzureADAdministrator_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -108,11 +108,11 @@ public virtual async Task /// /// Operation Id - /// AzureADAdministrators_CreateOrUpdate + /// AzureADAdministrator_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -155,11 +155,11 @@ public virtual ArmOperation CreateO /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -196,11 +196,11 @@ public virtual async Task> /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -237,11 +237,11 @@ public virtual Response Get(MySqlFl /// /// /// Operation Id - /// AzureADAdministrators_ListByServer + /// AzureADAdministrator_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -267,11 +267,11 @@ public virtual AsyncPageable GetAll /// /// /// Operation Id - /// AzureADAdministrators_ListByServer + /// AzureADAdministrator_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -297,11 +297,11 @@ public virtual Pageable GetAll(Canc /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -336,11 +336,11 @@ public virtual async Task> ExistsAsync(MySqlFlexibleServerAdminis /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -375,11 +375,11 @@ public virtual Response Exists(MySqlFlexibleServerAdministratorName admini /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -416,11 +416,11 @@ public virtual async Task /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs index ed3a900c3c4a..f23a17830b14 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerAadAdministratorResource.cs @@ -98,11 +98,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -138,11 +138,11 @@ public virtual async Task> /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -178,11 +178,11 @@ public virtual Response Get(Cancell /// /// /// Operation Id - /// AzureADAdministrators_Delete + /// AzureADAdministrator_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -220,11 +220,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// AzureADAdministrators_Delete + /// AzureADAdministrator_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -262,11 +262,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// AzureADAdministrators_CreateOrUpdate + /// AzureADAdministrator_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -308,11 +308,11 @@ public virtual async Task /// /// Operation Id - /// AzureADAdministrators_CreateOrUpdate + /// AzureADAdministrator_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs index e47e449ed625..7ae37064ac3f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Backups_Put + /// ServerBackup_Put /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> Creat /// /// /// Operation Id - /// Backups_Put + /// ServerBackup_Put /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> GetAsync( /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string backupName /// /// /// Operation Id - /// Backups_ListByServer + /// ServerBackup_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Operation Id - /// Backups_ListByServer + /// ServerBackup_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task> G /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs index 4ad4bc27ac0d..e7001e5c800a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> GetAsync( /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response Get(CancellationToken /// /// /// Operation Id - /// Backups_Put + /// ServerBackup_Put /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -221,11 +221,11 @@ public virtual async Task> Updat /// /// /// Operation Id - /// Backups_Put + /// ServerBackup_Put /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs index 1a76d0371b2f..177d11835a05 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Collection.cs @@ -65,11 +65,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// LongRunningBackup_Create + /// ServerBackupV2_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -114,11 +114,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// LongRunningBackup_Create + /// ServerBackupV2_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -163,11 +163,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -208,11 +208,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -253,11 +253,11 @@ public virtual Response Get(string backupNa /// /// /// Operation Id - /// LongRunningBackups_List + /// ServerBackupV2_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -283,11 +283,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// LongRunningBackups_List + /// ServerBackupV2_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -313,11 +313,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -356,11 +356,11 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -399,11 +399,11 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -444,11 +444,11 @@ public virtual async Task> /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs index 3dfbaada233b..9ac2774da6fc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerBackupV2Resource.cs @@ -102,11 +102,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -142,11 +142,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -182,11 +182,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// LongRunningBackup_Create + /// ServerBackupV2_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -228,11 +228,11 @@ public virtual async Task> Upd /// /// /// Operation Id - /// LongRunningBackup_Create + /// ServerBackupV2_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs index bc8a59e28c79..a8ba89231ca9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerCollection.cs @@ -65,11 +65,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Servers_Create + /// Server_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -114,11 +114,11 @@ public virtual async Task> CreateOrUpd /// /// /// Operation Id - /// Servers_Create + /// Server_Create /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -163,11 +163,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -208,11 +208,11 @@ public virtual async Task> GetAsync(string /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -253,11 +253,11 @@ public virtual Response Get(string serverName, Canc /// /// /// Operation Id - /// Servers_ListByResourceGroup + /// Server_ListByResourceGroup /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -283,11 +283,11 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Operation Id - /// Servers_ListByResourceGroup + /// Server_ListByResourceGroup /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -348,7 +348,7 @@ public virtual AsyncPageable GetReplicasAsync(strin /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -375,11 +375,11 @@ public virtual Pageable GetReplicas(string serverNa /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -418,11 +418,11 @@ public virtual async Task> ExistsAsync(string serverName, Cancell /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -461,11 +461,11 @@ public virtual Response Exists(string serverName, CancellationToken cancel /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -506,11 +506,11 @@ public virtual async Task> GetIfEx /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs index de450950c3f9..05afe6bc493f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Configurations_CreateOrUpdate + /// Configuration_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task /// /// /// Operation Id - /// Configurations_CreateOrUpdate + /// Configuration_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUp /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string con /// /// /// Operation Id - /// Configurations_ListByServer + /// Configuration_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -282,11 +282,11 @@ public virtual AsyncPageable GetAllAsy /// /// /// Operation Id - /// Configurations_ListByServer + /// Configuration_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -316,11 +316,11 @@ public virtual Pageable GetAll(string /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -359,11 +359,11 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -402,11 +402,11 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -447,11 +447,11 @@ public virtual async Task /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs index 7bee8e42a604..d94ab1bde3fd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerConfigurationResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response Get(Cancellati /// /// /// Operation Id - /// Configurations_Update + /// Configuration_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -223,11 +223,11 @@ public virtual async Task /// /// /// Operation Id - /// Configurations_Update + /// Configuration_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs index acea77e9c510..ce579a8ed03e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.Serialization.cs @@ -85,10 +85,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sourceServerResourceId"u8); writer.WriteStringValue(SourceServerResourceId); } - if (Optional.IsDefined(RestorePointInTime)) + if (Optional.IsDefined(RestorePointInOn)) { writer.WritePropertyName("restorePointInTime"u8); - writer.WriteStringValue(RestorePointInTime.Value, "O"); + writer.WriteStringValue(RestorePointInOn.Value, "O"); } if (Optional.IsDefined(ReplicationRole)) { @@ -491,8 +491,6 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - sku, administratorLogin, administratorLoginPassword, version, @@ -515,6 +513,8 @@ internal static MySqlFlexibleServerData DeserializeMySqlFlexibleServerData(JsonE maintenancePolicy, maintenanceWindow, importSourceProperties, + identity, + sku, serializedAdditionalRawData); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs index c8c2c88130ad..166703563b40 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerData.cs @@ -65,8 +65,6 @@ public MySqlFlexibleServerData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The cmk identity for the server. Current supported identity types: UserAssigned. - /// The SKU (pricing tier) of the server. /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). /// The password of the administrator login (required for server creation). /// Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7. @@ -74,7 +72,7 @@ public MySqlFlexibleServerData(AzureLocation location) : base(location) /// availability Zone information of the server. /// The mode to create a new MySQL server. /// The source MySQL server id. - /// Restore point creation time (ISO8601 format), specifying the time to restore from. + /// Restore point creation time (ISO8601 format), specifying the time to restore from. /// The replication role. /// The maximum number of replicas that a primary server can have. /// The Data Encryption for CMK. @@ -89,11 +87,11 @@ public MySqlFlexibleServerData(AzureLocation location) : base(location) /// Maintenance policy of a server. /// Maintenance window of a server. Known issue: cannot be set during server creation or updated with other properties during server update; must be updated separately. /// Source properties for import from storage. + /// The cmk identity for the server. Current supported identity types: UserAssigned. + /// The SKU (pricing tier) of the server. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string fullVersion, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInTime, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, int? databasePort, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IReadOnlyList serverPrivateEndpointConnections, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string administratorLogin, string administratorLoginPassword, MySqlFlexibleServerVersion? version, string fullVersion, string availabilityZone, MySqlFlexibleServerCreateMode? createMode, ResourceIdentifier sourceServerResourceId, DateTimeOffset? restorePointInOn, MySqlFlexibleServerReplicationRole? replicationRole, int? replicaCapacity, MySqlFlexibleServerDataEncryption dataEncryption, MySqlFlexibleServerState? state, string fullyQualifiedDomainName, int? databasePort, MySqlFlexibleServerStorage storage, MySqlFlexibleServerBackupProperties backup, MySqlFlexibleServerHighAvailability highAvailability, MySqlFlexibleServerNetwork network, IReadOnlyList serverPrivateEndpointConnections, MaintenancePolicy maintenancePolicy, MySqlFlexibleServerMaintenanceWindow maintenanceWindow, ImportSourceProperties importSourceProperties, ManagedServiceIdentity identity, MySqlFlexibleServerSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Sku = sku; AdministratorLogin = administratorLogin; AdministratorLoginPassword = administratorLoginPassword; Version = version; @@ -101,7 +99,7 @@ internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceTyp AvailabilityZone = availabilityZone; CreateMode = createMode; SourceServerResourceId = sourceServerResourceId; - RestorePointInTime = restorePointInTime; + RestorePointInOn = restorePointInOn; ReplicationRole = replicationRole; ReplicaCapacity = replicaCapacity; DataEncryption = dataEncryption; @@ -116,6 +114,8 @@ internal MySqlFlexibleServerData(ResourceIdentifier id, string name, ResourceTyp MaintenancePolicy = maintenancePolicy; MaintenanceWindow = maintenanceWindow; ImportSourceProperties = importSourceProperties; + Identity = identity; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -124,10 +124,6 @@ internal MySqlFlexibleServerData() { } - /// The cmk identity for the server. Current supported identity types: UserAssigned. - public ManagedServiceIdentity Identity { get; set; } - /// The SKU (pricing tier) of the server. - public MySqlFlexibleServerSku Sku { get; set; } /// The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). public string AdministratorLogin { get; set; } /// The password of the administrator login (required for server creation). @@ -143,7 +139,7 @@ internal MySqlFlexibleServerData() /// The source MySQL server id. public ResourceIdentifier SourceServerResourceId { get; set; } /// Restore point creation time (ISO8601 format), specifying the time to restore from. - public DateTimeOffset? RestorePointInTime { get; set; } + public DateTimeOffset? RestorePointInOn { get; set; } /// The replication role. public MySqlFlexibleServerReplicationRole? ReplicationRole { get; set; } /// The maximum number of replicas that a primary server can have. @@ -184,5 +180,9 @@ public MySqlFlexibleServerPatchStrategy? MaintenancePatchStrategy public MySqlFlexibleServerMaintenanceWindow MaintenanceWindow { get; set; } /// Source properties for import from storage. public ImportSourceProperties ImportSourceProperties { get; set; } + /// The cmk identity for the server. Current supported identity types: UserAssigned. + public ManagedServiceIdentity Identity { get; set; } + /// The SKU (pricing tier) of the server. + public MySqlFlexibleServerSku Sku { get; set; } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs index bfee7197b9b1..f75f863842d0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Databases_CreateOrUpdate + /// Database_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// Databases_CreateOrUpdate + /// Database_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string database /// /// /// Operation Id - /// Databases_ListByServer + /// Database_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// Databases_ListByServer + /// Database_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string databaseName, CancellationToken canc /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task> /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs index 9eab0f8192b9..c9f2331491dc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerDatabaseResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// Databases_Delete + /// Database_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -219,11 +219,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Databases_Delete + /// Database_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -261,11 +261,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Databases_CreateOrUpdate + /// Database_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -307,11 +307,11 @@ public virtual async Task> Upd /// /// /// Operation Id - /// Databases_CreateOrUpdate + /// Database_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs index bb2b4d8fe3e5..b4ced120d64b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpd /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> Get /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string fire /// /// /// Operation Id - /// FirewallRules_ListByServer + /// FirewallRule_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Operation Id - /// FirewallRules_ListByServer + /// FirewallRule_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancella /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs index 30e56431ed21..d1d001b989dc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerFirewallRuleResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> Get /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response Get(Cancellatio /// /// /// Operation Id - /// FirewallRules_Delete + /// FirewallRule_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -219,11 +219,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// FirewallRules_Delete + /// FirewallRule_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -261,11 +261,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -307,11 +307,11 @@ public virtual async Task> /// /// /// Operation Id - /// FirewallRules_CreateOrUpdate + /// FirewallRule_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs index 2dbce3ba6543..bca7ca60247f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -105,11 +105,11 @@ public virtual async Task> GetA /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -150,11 +150,11 @@ public virtual Response Get(string maint /// /// /// Operation Id - /// Maintenances_List + /// Maintenance_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -180,11 +180,11 @@ public virtual AsyncPageable GetAllAsync /// /// /// Operation Id - /// Maintenances_List + /// Maintenance_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -210,11 +210,11 @@ public virtual Pageable GetAll(Cancellat /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -253,11 +253,11 @@ public virtual async Task> ExistsAsync(string maintenanceName, Ca /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -296,11 +296,11 @@ public virtual Response Exists(string maintenanceName, CancellationToken c /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -341,11 +341,11 @@ public virtual async Task /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs index 0189c2de7099..7bac5b9759be 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerMaintenanceResource.cs @@ -98,11 +98,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -138,11 +138,11 @@ public virtual async Task> GetA /// /// /// Operation Id - /// Maintenances_Read + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -178,11 +178,11 @@ public virtual Response Get(Cancellation /// /// /// Operation Id - /// Maintenances_Update + /// Maintenance_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -224,11 +224,11 @@ public virtual async Task> /// /// /// Operation Id - /// Maintenances_Update + /// Maintenance_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs index e386049ef43f..042587329e3b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServerResource.cs @@ -40,12 +40,12 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServersRestOperations _mySqlFlexibleServerServersRestClient; private readonly ClientDiagnostics _backupAndExportClientDiagnostics; private readonly BackupAndExportRestOperations _backupAndExportRestClient; - private readonly ClientDiagnostics _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics; - private readonly ConfigurationsRestOperations _mySqlFlexibleServerConfigurationConfigurationsRestClient; - private readonly ClientDiagnostics _serversMigrationClientDiagnostics; - private readonly ServersMigrationRestOperations _serversMigrationRestClient; private readonly ClientDiagnostics _logFilesClientDiagnostics; private readonly LogFilesRestOperations _logFilesRestClient; + private readonly ClientDiagnostics _serversMigrationClientDiagnostics; + private readonly ServersMigrationRestOperations _serversMigrationRestClient; + private readonly ClientDiagnostics _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics; + private readonly ConfigurationsRestOperations _mySqlFlexibleServerConfigurationConfigurationsRestClient; private readonly MySqlFlexibleServerData _data; /// Gets the resource type for the operations. @@ -75,13 +75,13 @@ internal MySqlFlexibleServerResource(ArmClient client, ResourceIdentifier id) : _mySqlFlexibleServerServersRestClient = new ServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServerServersApiVersion); _backupAndExportClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); _backupAndExportRestClient = new BackupAndExportRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _logFilesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _logFilesRestClient = new LogFilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _serversMigrationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _serversMigrationRestClient = new ServersMigrationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServerConfigurationResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(MySqlFlexibleServerConfigurationResource.ResourceType, out string mySqlFlexibleServerConfigurationConfigurationsApiVersion); _mySqlFlexibleServerConfigurationConfigurationsRestClient = new ConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServerConfigurationConfigurationsApiVersion); - _serversMigrationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _serversMigrationRestClient = new ServersMigrationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _logFilesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _logFilesRestClient = new LogFilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -124,11 +124,11 @@ public virtual MySqlFlexibleServerAadAdministratorCollection GetMySqlFlexibleSer /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -153,11 +153,11 @@ public virtual async Task> /// /// /// Operation Id - /// AzureADAdministrators_Get + /// AzureADAdministrator_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -173,71 +173,6 @@ public virtual Response GetMySqlFle return GetMySqlFlexibleServerAadAdministrators().Get(administratorName, cancellationToken); } - /// Gets a collection of AdvancedThreatProtectionResources in the MySqlFlexibleServer. - /// An object representing collection of AdvancedThreatProtectionResources and their operations over a AdvancedThreatProtectionResource. - public virtual AdvancedThreatProtectionCollection GetAdvancedThreatProtections() - { - return GetCachedClient(client => new AdvancedThreatProtectionCollection(client, Id)); - } - - /// - /// Get a server's Advanced Threat Protection state - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} - /// - /// - /// Operation Id - /// AdvancedThreatProtectionSettings_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Advanced Threat Protection state. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual async Task> GetAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) - { - return await GetAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a server's Advanced Threat Protection state - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} - /// - /// - /// Operation Id - /// AdvancedThreatProtectionSettings_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the Advanced Threat Protection state. - /// The cancellation token to use. - [ForwardsClientCalls] - public virtual Response GetAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) - { - return GetAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); - } - /// Gets a collection of MySqlFlexibleServerBackupResources in the MySqlFlexibleServer. /// An object representing collection of MySqlFlexibleServerBackupResources and their operations over a MySqlFlexibleServerBackupResource. public virtual MySqlFlexibleServerBackupCollection GetMySqlFlexibleServerBackups() @@ -254,11 +189,11 @@ public virtual MySqlFlexibleServerBackupCollection GetMySqlFlexibleServerBackups /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -285,11 +220,11 @@ public virtual async Task> GetMySqlF /// /// /// Operation Id - /// Backups_Get + /// ServerBackup_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -323,11 +258,11 @@ public virtual MySqlFlexibleServerBackupV2Collection GetMySqlFlexibleServerBacku /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -354,11 +289,11 @@ public virtual async Task> GetMySq /// /// /// Operation Id - /// LongRunningBackups_Get + /// ServerBackupV2_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -392,11 +327,11 @@ public virtual MySqlFlexibleServerConfigurationCollection GetMySqlFlexibleServer /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -423,11 +358,11 @@ public virtual async Task> Ge /// /// /// Operation Id - /// Configurations_Get + /// Configuration_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -461,11 +396,11 @@ public virtual MySqlFlexibleServerDatabaseCollection GetMySqlFlexibleServerDatab /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -492,11 +427,11 @@ public virtual async Task> GetMySq /// /// /// Operation Id - /// Databases_Get + /// Database_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -530,11 +465,11 @@ public virtual MySqlFlexibleServerFirewallRuleCollection GetMySqlFlexibleServerF /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -561,11 +496,11 @@ public virtual async Task> Get /// /// /// Operation Id - /// FirewallRules_Get + /// FirewallRule_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -583,211 +518,207 @@ public virtual Response GetMySqlFlexibl return GetMySqlFlexibleServerFirewallRules().Get(firewallRuleName, cancellationToken); } - /// Gets a collection of MySqlFlexibleServerMaintenanceResources in the MySqlFlexibleServer. - /// An object representing collection of MySqlFlexibleServerMaintenanceResources and their operations over a MySqlFlexibleServerMaintenanceResource. - public virtual MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() + /// Gets a collection of AdvancedThreatProtectionResources in the MySqlFlexibleServer. + /// An object representing collection of AdvancedThreatProtectionResources and their operations over a AdvancedThreatProtectionResource. + public virtual AdvancedThreatProtectionCollection GetAdvancedThreatProtections() { - return GetCachedClient(client => new MySqlFlexibleServerMaintenanceCollection(client, Id)); + return GetCachedClient(client => new AdvancedThreatProtectionCollection(client, Id)); } /// - /// Read maintenance. + /// Get a server's Advanced Threat Protection state /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} /// /// /// Operation Id - /// Maintenances_Read + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, CancellationToken cancellationToken = default) + public virtual async Task> GetAdvancedThreatProtectionAsync(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { - return await GetMySqlFlexibleServerMaintenances().GetAsync(maintenanceName, cancellationToken).ConfigureAwait(false); + return await GetAdvancedThreatProtections().GetAsync(advancedThreatProtectionName, cancellationToken).ConfigureAwait(false); } /// - /// Read maintenance. + /// Get a server's Advanced Threat Protection state /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName} /// /// /// Operation Id - /// Maintenances_Read + /// AdvancedThreatProtection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMySqlFlexibleServerMaintenance(string maintenanceName, CancellationToken cancellationToken = default) + public virtual Response GetAdvancedThreatProtection(AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { - return GetMySqlFlexibleServerMaintenances().Get(maintenanceName, cancellationToken); + return GetAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); } - /// Gets a collection of MySqlFlexibleServersPrivateEndpointConnectionResources in the MySqlFlexibleServer. - /// An object representing collection of MySqlFlexibleServersPrivateEndpointConnectionResources and their operations over a MySqlFlexibleServersPrivateEndpointConnectionResource. - public virtual MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() + /// Gets a collection of MySqlFlexibleServerMaintenanceResources in the MySqlFlexibleServer. + /// An object representing collection of MySqlFlexibleServerMaintenanceResources and their operations over a MySqlFlexibleServerMaintenanceResource. + public virtual MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMaintenances() { - return GetCachedClient(client => new MySqlFlexibleServersPrivateEndpointConnectionCollection(client, Id)); + return GetCachedClient(client => new MySqlFlexibleServerMaintenanceCollection(client, Id)); } /// - /// Gets a private endpoint connection. + /// Read maintenance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the private endpoint connection associated with the Azure resource. + /// The name of the maintenance. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetMySqlFlexibleServerMaintenanceAsync(string maintenanceName, CancellationToken cancellationToken = default) { - return await GetMySqlFlexibleServersPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + return await GetMySqlFlexibleServerMaintenances().GetAsync(maintenanceName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a private endpoint connection. + /// Read maintenance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances/{maintenanceName} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// Maintenance_Read /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the private endpoint connection associated with the Azure resource. + /// The name of the maintenance. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual Response GetMySqlFlexibleServerMaintenance(string maintenanceName, CancellationToken cancellationToken = default) { - return GetMySqlFlexibleServersPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + return GetMySqlFlexibleServerMaintenances().Get(maintenanceName, cancellationToken); } - /// Gets a collection of MySqlFlexibleServersPrivateLinkResources in the MySqlFlexibleServer. - /// An object representing collection of MySqlFlexibleServersPrivateLinkResources and their operations over a MySqlFlexibleServersPrivateLinkResource. - public virtual MySqlFlexibleServersPrivateLinkResourceCollection GetMySqlFlexibleServersPrivateLinkResources() + /// Gets a collection of MySqlFlexibleServersPrivateEndpointConnectionResources in the MySqlFlexibleServer. + /// An object representing collection of MySqlFlexibleServersPrivateEndpointConnectionResources and their operations over a MySqlFlexibleServersPrivateEndpointConnectionResource. + public virtual MySqlFlexibleServersPrivateEndpointConnectionCollection GetMySqlFlexibleServersPrivateEndpointConnections() { - return GetCachedClient(client => new MySqlFlexibleServersPrivateLinkResourceCollection(client, Id)); + return GetCachedClient(client => new MySqlFlexibleServersPrivateEndpointConnectionCollection(client, Id)); } /// - /// Gets a private link resource for MySQL server. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the private link resource. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMySqlFlexibleServersPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) + public virtual async Task> GetMySqlFlexibleServersPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return await GetMySqlFlexibleServersPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); + return await GetMySqlFlexibleServersPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a private link resource for MySQL server. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// PrivateLinkResources_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource - /// + /// /// /// /// - /// The name of the private link resource. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMySqlFlexibleServersPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) + public virtual Response GetMySqlFlexibleServersPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return GetMySqlFlexibleServersPrivateLinkResources().Get(groupName, cancellationToken); + return GetMySqlFlexibleServersPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } /// @@ -799,11 +730,11 @@ public virtual Response GetMySqlFlexibl /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -839,11 +770,11 @@ public virtual async Task> GetAsync(Cancel /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -879,11 +810,11 @@ public virtual Response Get(CancellationToken cance /// /// /// Operation Id - /// Servers_Delete + /// Server_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -921,11 +852,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// Servers_Delete + /// Server_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -963,11 +894,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Servers_Update + /// Server_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1009,11 +940,11 @@ public virtual async Task> UpdateAsync /// /// /// Operation Id - /// Servers_Update + /// Server_Update /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1047,19 +978,19 @@ public virtual ArmOperation Update(WaitUntil waitUn } /// - /// Detach VNet on a server. + /// Manual failover a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover /// /// /// Operation Id - /// Servers_DetachVNet + /// Servers_Failover /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1068,21 +999,17 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - public virtual async Task> DetachVnetAsync(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) + public virtual async Task FailoverAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.DetachVNetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVNetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _mySqlFlexibleServerServersRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1093,19 +1020,19 @@ public virtual async Task> DetachVnetA } /// - /// Detach VNet on a server. + /// Manual failover a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover /// /// /// Operation Id - /// Servers_DetachVNet + /// Servers_Failover /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1114,21 +1041,17 @@ public virtual async Task> DetachVnetA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - public virtual ArmOperation DetachVnet(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.DetachVNet(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVNetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _mySqlFlexibleServerServersRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + operation.WaitForCompletionResponse(cancellationToken); return operation; } catch (Exception e) @@ -1139,19 +1062,19 @@ public virtual ArmOperation DetachVnet(WaitUntil wa } /// - /// Manual failover a server. + /// Validate a deployment of high availability. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability /// /// /// Operation Id - /// Servers_Failover + /// Servers_ValidateEstimateHighAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1159,19 +1082,19 @@ public virtual ArmOperation DetachVnet(WaitUntil wa /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - public virtual async Task FailoverAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ValidateEstimateHighAvailabilityAsync(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1181,19 +1104,19 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance } /// - /// Manual failover a server. + /// Validate a deployment of high availability. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/failover + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability /// /// /// Operation Id - /// Servers_Failover + /// Servers_ValidateEstimateHighAvailability /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1201,19 +1124,19 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual Response ValidateEstimateHighAvailability(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Failover"); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken); + return response; } catch (Exception e) { @@ -1223,19 +1146,19 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc } /// - /// Resets GTID on a server. + /// Restarts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart /// /// /// Operation Id - /// Servers_ResetGtid + /// Servers_Restart /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1244,19 +1167,19 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for resetting GTID on a server. + /// The required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.ResetGtidAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _mySqlFlexibleServerServersRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1269,19 +1192,19 @@ public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySq } /// - /// Resets GTID on a server. + /// Restarts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart /// /// /// Operation Id - /// Servers_ResetGtid + /// Servers_Restart /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1290,19 +1213,19 @@ public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySq /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for resetting GTID on a server. + /// The required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.ResetGtid(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _mySqlFlexibleServerServersRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1315,19 +1238,19 @@ public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGt } /// - /// Restarts a server. + /// Starts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start /// /// /// Operation Id - /// Servers_Restart + /// Servers_Start /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1336,19 +1259,15 @@ public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGt /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) + public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1361,19 +1280,19 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlF } /// - /// Restarts a server. + /// Starts a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start /// /// /// Operation Id - /// Servers_Restart + /// Servers_Start /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1382,19 +1301,15 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlF /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The required parameters for restarting a server. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRestartParameter mySqlFlexibleServerRestartParameter, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerRestartParameter, nameof(mySqlFlexibleServerRestartParameter)); - - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Restart"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerRestartParameter).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1407,19 +1322,19 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRest } /// - /// Starts a server. + /// Stops a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop /// /// /// Operation Id - /// Servers_Start + /// Servers_Stop /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1429,14 +1344,14 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRest /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1449,19 +1364,19 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella } /// - /// Starts a server. + /// Stops a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop /// /// /// Operation Id - /// Servers_Start + /// Servers_Stop /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1471,14 +1386,14 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Start"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1491,19 +1406,19 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell } /// - /// Stops a server. + /// Resets GTID on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid /// /// /// Operation Id - /// Servers_Stop + /// Servers_ResetGtid /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1512,15 +1427,19 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _mySqlFlexibleServerServersRestClient.ResetGtidAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1533,19 +1452,19 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat } /// - /// Stops a server. + /// Resets GTID on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/resetGtid /// /// /// Operation Id - /// Servers_Stop + /// Servers_ResetGtid /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1554,15 +1473,19 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for resetting GTID on a server. /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) { - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.Stop"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ResetGtid"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _mySqlFlexibleServerServersRestClient.ResetGtid(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new FlexibleServersArmOperation(_mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateResetGtidRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1575,19 +1498,19 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella } /// - /// Validate a deployment of high availability. + /// Detach VNet on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet /// /// /// Operation Id - /// Servers_ValidateEstimateHighAvailability + /// Servers_DetachVnet /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1595,19 +1518,23 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// - /// The required parameters for validation of high availability deployment. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - public virtual async Task> ValidateEstimateHighAvailabilityAsync(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> DetachVnetAsync(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); scope.Start(); try { - var response = await _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken).ConfigureAwait(false); - return response; + var response = await _mySqlFlexibleServerServersRestClient.DetachVnetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVnetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1617,19 +1544,19 @@ public virtual async Task> Valida } /// - /// Validate a deployment of high availability. + /// Detach VNet on a server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateEstimateHighAvailability + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet /// /// /// Operation Id - /// Servers_ValidateEstimateHighAvailability + /// Servers_DetachVnet /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -1637,19 +1564,23 @@ public virtual async Task> Valida /// /// /// - /// The required parameters for validation of high availability deployment. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// is null. - public virtual Response ValidateEstimateHighAvailability(HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation DetachVnet(WaitUntil waitUntil, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.ValidateEstimateHighAvailability"); + using var scope = _mySqlFlexibleServerServersClientDiagnostics.CreateScope("MySqlFlexibleServerResource.DetachVnet"); scope.Start(); try { - var response = _mySqlFlexibleServerServersRestClient.ValidateEstimateHighAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, highAvailabilityValidationEstimation, cancellationToken); - return response; + var response = _mySqlFlexibleServerServersRestClient.DetachVnet(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerOperationSource(Client), _mySqlFlexibleServerServersClientDiagnostics, Pipeline, _mySqlFlexibleServerServersRestClient.CreateDetachVnetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -1671,7 +1602,7 @@ public virtual Response ValidateEstimateHi /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1713,7 +1644,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1755,7 +1686,7 @@ public virtual ArmOperation CreateBack /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1789,7 +1720,7 @@ public virtual async Task> Val /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1811,95 +1742,55 @@ public virtual Response ValidateBackup( } /// - /// Update a list of configurations in a given server. + /// List all the server log files in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles /// /// /// Operation Id - /// Configurations_BatchUpdate + /// LogFiles_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// + /// 2024-12-30 /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateConfigurationsAsync(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetLogFilesAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - - using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); - scope.Start(); - try - { - var response = await _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken).ConfigureAwait(false); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _logFilesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _logFilesRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerLogFile.DeserializeMySqlFlexibleServerLogFile(e), _logFilesClientDiagnostics, Pipeline, "MySqlFlexibleServerResource.GetLogFiles", "value", "nextLink", cancellationToken); } /// - /// Update a list of configurations in a given server. + /// List all the server log files in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles /// /// /// Operation Id - /// Configurations_BatchUpdate + /// LogFiles_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// + /// 2024-12-30 /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateConfigurations(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetLogFiles(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - - using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); - scope.Start(); - try - { - var response = _mySqlFlexibleServerConfigurationConfigurationsRestClient.BatchUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken); - var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateBatchUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _logFilesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _logFilesRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerLogFile.DeserializeMySqlFlexibleServerLogFile(e), _logFilesClientDiagnostics, Pipeline, "MySqlFlexibleServerResource.GetLogFiles", "value", "nextLink", cancellationToken); } /// @@ -1915,7 +1806,7 @@ public virtual ArmOperation UpdateConfigurati /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1953,7 +1844,7 @@ public virtual async Task> CutoverMigr /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// @@ -1979,55 +1870,95 @@ public virtual ArmOperation CutoverMigrationServers } /// - /// List all the server log files in a given server. + /// Update a list of configurations in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations /// /// /// Operation Id - /// LogFiles_ListByServer + /// Configurations_UpdateConfigurations /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 + /// + /// + /// Resource + /// /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetLogFilesAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateConfigurationsAsync(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _logFilesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _logFilesRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerLogFile.DeserializeMySqlFlexibleServerLogFile(e), _logFilesClientDiagnostics, Pipeline, "MySqlFlexibleServerResource.GetLogFiles", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + + using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); + scope.Start(); + try + { + var response = await _mySqlFlexibleServerConfigurationConfigurationsRestClient.UpdateConfigurationsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken).ConfigureAwait(false); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateUpdateConfigurationsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// List all the server log files in a given server. + /// Update a list of configurations in a given server. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/logFiles + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/updateConfigurations /// /// /// Operation Id - /// LogFiles_ListByServer + /// Configurations_UpdateConfigurations /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 + /// + /// + /// Resource + /// /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for updating a list of server configuration. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetLogFiles(CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateConfigurations(WaitUntil waitUntil, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _logFilesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _logFilesRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MySqlFlexibleServerLogFile.DeserializeMySqlFlexibleServerLogFile(e), _logFilesClientDiagnostics, Pipeline, "MySqlFlexibleServerResource.GetLogFiles", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); + + using var scope = _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics.CreateScope("MySqlFlexibleServerResource.UpdateConfigurations"); + scope.Start(); + try + { + var response = _mySqlFlexibleServerConfigurationConfigurationsRestClient.UpdateConfigurations(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate, cancellationToken); + var operation = new FlexibleServersArmOperation(new MySqlFlexibleServerConfigurationsOperationSource(), _mySqlFlexibleServerConfigurationConfigurationsClientDiagnostics, Pipeline, _mySqlFlexibleServerConfigurationConfigurationsRestClient.CreateUpdateConfigurationsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, mySqlFlexibleServerConfigurationListForBatchUpdate).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -2039,11 +1970,11 @@ public virtual Pageable GetLogFiles(CancellationToke /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -2101,11 +2032,11 @@ public virtual async Task> AddTagAsync(str /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -2163,11 +2094,11 @@ public virtual Response AddTag(string key, string v /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -2220,11 +2151,11 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -2277,11 +2208,11 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -2337,11 +2268,11 @@ public virtual async Task> RemoveTagAsync( /// /// /// Operation Id - /// Servers_Get + /// Server_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs index 0555da5cdc5f..7ddb6077d232 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityCollection.cs @@ -64,11 +64,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> GetA /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -154,11 +154,11 @@ public virtual Response Get(string capab /// /// /// Operation Id - /// LocationBasedCapabilitySet_List + /// Capability_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -184,11 +184,11 @@ public virtual AsyncPageable GetAllAsync /// /// /// Operation Id - /// LocationBasedCapabilitySet_List + /// Capability_List /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -214,11 +214,11 @@ public virtual Pageable GetAll(Cancellat /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -257,11 +257,11 @@ public virtual async Task> ExistsAsync(string capabilitySetName, /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -300,11 +300,11 @@ public virtual Response Exists(string capabilitySetName, CancellationToken /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -345,11 +345,11 @@ public virtual async Task /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs index fa39a38839d6..4edfc2cb16e8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersCapabilityResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task> GetA /// /// /// Operation Id - /// LocationBasedCapabilitySet_Get + /// Capability_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs index 20f3d66f0b4f..bd856b376868 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate + /// PrivateEndpointConnection_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate + /// PrivateEndpointConnection_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response G /// /// /// Operation Id - /// PrivateEndpointConnections_ListByServer + /// PrivateEndpointConnection_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -277,11 +277,11 @@ public virtual AsyncPageable /// /// Operation Id - /// PrivateEndpointConnections_ListByServer + /// PrivateEndpointConnection_ListByServer /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -306,11 +306,11 @@ public virtual Pageable G /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -349,11 +349,11 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -392,11 +392,11 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -437,11 +437,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs index f23babe41b5c..2ebadab0a512 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.Serialization.cs @@ -56,10 +56,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("privateEndpoint"u8); ((IJsonModel)PrivateEndpoint).Write(writer, options); } - if (Optional.IsDefined(ConnectionState)) + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) { writer.WritePropertyName("privateLinkServiceConnectionState"u8); - writer.WriteObjectValue(ConnectionState, options); + writer.WriteObjectValue(PrivateLinkServiceConnectionState, options); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs index 887e33907b32..160b40662d49 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionData.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { /// /// A class representing the MySqlFlexibleServersPrivateEndpointConnection data model. - /// The private endpoint connection resource. + /// A private endpoint connection resource /// public partial class MySqlFlexibleServersPrivateEndpointConnectionData : ResourceData { @@ -65,14 +65,14 @@ public MySqlFlexibleServersPrivateEndpointConnectionData() /// The systemData. /// The group ids for the private endpoint resource. /// The private endpoint resource. - /// A collection of information about the state of the connection between service consumer and provider. + /// A collection of information about the state of the connection between service consumer and provider. /// The provisioning state of the private endpoint connection resource. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList groupIds, SubResource privateEndpoint, MySqlFlexibleServersPrivateLinkServiceConnectionState connectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal MySqlFlexibleServersPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList groupIds, SubResource privateEndpoint, MySqlFlexibleServersPrivateLinkServiceConnectionState privateLinkServiceConnectionState, MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { GroupIds = groupIds; PrivateEndpoint = privateEndpoint; - ConnectionState = connectionState; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,7 +88,7 @@ public ResourceIdentifier PrivateEndpointId } /// A collection of information about the state of the connection between service consumer and provider. - public MySqlFlexibleServersPrivateLinkServiceConnectionState ConnectionState { get; set; } + public MySqlFlexibleServersPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// The provisioning state of the private endpoint connection resource. public MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs index 99c0f1e9eeab..f0bd31d98e0e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateEndpointConnectionResource.cs @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -137,11 +137,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_Get + /// PrivateEndpointConnection_Get /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -177,11 +177,11 @@ public virtual Response G /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnection_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -219,11 +219,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// PrivateEndpointConnections_Delete + /// PrivateEndpointConnection_Delete /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -261,11 +261,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate + /// PrivateEndpointConnection_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource @@ -307,11 +307,11 @@ public virtual async Task /// /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate + /// PrivateEndpointConnection_CreateOrUpdate /// /// /// Default Api Version - /// 2024-12-01-preview + /// 2024-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs deleted file mode 100644 index 6fd0c4859afd..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - public partial class MySqlFlexibleServersPrivateLinkResource : IJsonModel - { - private static MySqlFlexibleServersPrivateLinkResourceData s_dataDeserializationInstance; - private static MySqlFlexibleServersPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - MySqlFlexibleServersPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); - - MySqlFlexibleServersPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs deleted file mode 100644 index a8d06c66c38b..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResource.cs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - /// - /// A Class representing a MySqlFlexibleServersPrivateLinkResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMySqlFlexibleServersPrivateLinkResource method. - /// Otherwise you can get one from its parent resource using the GetMySqlFlexibleServersPrivateLinkResource method. - /// - public partial class MySqlFlexibleServersPrivateLinkResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The serverName. - /// The groupName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serverName, string groupName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient; - private readonly MySqlFlexibleServersPrivateLinkResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DBforMySQL/flexibleServers/privateLinkResources"; - - /// Initializes a new instance of the class for mocking. - protected MySqlFlexibleServersPrivateLinkResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal MySqlFlexibleServersPrivateLinkResource(ArmClient client, MySqlFlexibleServersPrivateLinkResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal MySqlFlexibleServersPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); - _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual MySqlFlexibleServersPrivateLinkResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a private link resource for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResource.Get"); - scope.Start(); - try - { - var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a private link resource for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResource.Get"); - scope.Start(); - try - { - var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs deleted file mode 100644 index 92319c288b9f..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceCollection.cs +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMySqlFlexibleServersPrivateLinkResources method from an instance of . - /// - public partial class MySqlFlexibleServersPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient; - - /// Initializes a new instance of the class for mocking. - protected MySqlFlexibleServersPrivateLinkResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal MySqlFlexibleServersPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MySql.FlexibleServers", MySqlFlexibleServersPrivateLinkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(MySqlFlexibleServersPrivateLinkResource.ResourceType, out string mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); - _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MySqlFlexibleServerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MySqlFlexibleServerResource.ResourceType), nameof(id)); - } - - /// - /// Gets a private link resource for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Get"); - scope.Start(); - try - { - var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a private link resource for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Get"); - scope.Start(); - try - { - var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the private link resources for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources - /// - /// - /// Operation Id - /// PrivateLinkResources_ListByServer - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateLinkResource(Client, MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(e)), _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Lists the private link resources for MySQL server. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources - /// - /// - /// Operation Id - /// PrivateLinkResources_ListByServer - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new MySqlFlexibleServersPrivateLinkResource(Client, MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(e)), _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "MySqlFlexibleServersPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.Exists"); - scope.Start(); - try - { - var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// Default Api Version - /// 2024-12-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var scope = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("MySqlFlexibleServersPrivateLinkResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _mySqlFlexibleServersPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, groupName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MySqlFlexibleServersPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs deleted file mode 100644 index 7ab755361fc1..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.Serialization.cs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - public partial class MySqlFlexibleServersPrivateLinkResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(GroupId)) - { - writer.WritePropertyName("groupId"u8); - writer.WriteStringValue(GroupId); - } - if (options.Format != "W" && Optional.IsCollectionDefined(RequiredMembers)) - { - writer.WritePropertyName("requiredMembers"u8); - writer.WriteStartArray(); - foreach (var item in RequiredMembers) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RequiredZoneNames)) - { - writer.WritePropertyName("requiredZoneNames"u8); - writer.WriteStartArray(); - foreach (var item in RequiredZoneNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - MySqlFlexibleServersPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement, options); - } - - internal static MySqlFlexibleServersPrivateLinkResourceData DeserializeMySqlFlexibleServersPrivateLinkResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - string groupId = default; - IReadOnlyList requiredMembers = default; - IList requiredZoneNames = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerMySqlContext.Default); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("groupId"u8)) - { - groupId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("requiredMembers"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredMembers = array; - continue; - } - if (property0.NameEquals("requiredZoneNames"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredZoneNames = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MySqlFlexibleServersPrivateLinkResourceData( - id, - name, - type, - systemData, - groupId, - requiredMembers ?? new ChangeTrackingList(), - requiredZoneNames ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerMySqlContext.Default); - default: - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support writing '{options.Format}' format."); - } - } - - MySqlFlexibleServersPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs deleted file mode 100644 index ad3b650b9b2a..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/MySqlFlexibleServersPrivateLinkResourceData.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - /// - /// A class representing the MySqlFlexibleServersPrivateLinkResource data model. - /// A private link resource. - /// - public partial class MySqlFlexibleServersPrivateLinkResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public MySqlFlexibleServersPrivateLinkResourceData() - { - RequiredMembers = new ChangeTrackingList(); - RequiredZoneNames = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource private link DNS zone name. - /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServersPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - GroupId = groupId; - RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The private link resource group id. - public string GroupId { get; } - /// The private link resource required member names. - public IReadOnlyList RequiredMembers { get; } - /// The private link resource private link DNS zone name. - public IList RequiredZoneNames { get; } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs index ca2c8fabf42d..934036f9cec0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class AdvancedThreatProtectionSettingsRestOperations /// Initializes a new instance of AdvancedThreatProtectionSettingsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public AdvancedThreatProtectionSettingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings", false); + uri.AppendPath("/advancedThreatProtectionSettings/", false); + uri.AppendPath(advancedThreatProtectionName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings", false); + uri.AppendPath("/advancedThreatProtectionSettings/", false); + uri.AppendPath(advancedThreatProtectionName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,71 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Gets a list of server's Advanced Threat Protection states. + /// Get a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AdvancedThreatProtectionListResult value = default; + AdvancedThreatProtectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); + value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets a list of server's Advanced Threat Protection states. + /// Get a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Advanced Threat Protection state. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AdvancedThreatProtectionListResult value = default; + AdvancedThreatProtectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); + value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) + internal RequestUriBuilder CreateUpdatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +154,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName) + internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,75 +172,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a server's Advanced Threat Protection state. + /// Updates a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public async Task UpdatePutAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AdvancedThreatProtectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a server's Advanced Threat Protection state. + /// Updates a server's Advanced Threat Protection state. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, CancellationToken cancellationToken = default) + public Response UpdatePut(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName); + using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AdvancedThreatProtectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AdvancedThreatProtectionData.DeserializeAdvancedThreatProtectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AdvancedThreatProtectionData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -248,11 +254,11 @@ internal RequestUriBuilder CreateUpdatePutRequestUri(string subscriptionId, stri return uri; } - internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -268,7 +274,7 @@ internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resour request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -279,23 +285,22 @@ internal HttpMessage CreateUpdatePutRequest(string subscriptionId, string resour /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdatePutAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: case 202: return message.Response; default: @@ -308,23 +313,22 @@ public async Task UpdatePutAsync(string subscriptionId, string resourc /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. + /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response UpdatePut(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdatePutRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: case 202: return message.Response; default: @@ -332,7 +336,7 @@ public Response UpdatePut(string subscriptionId, string resourceGroupName, strin } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -342,17 +346,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings/", false); - uri.AppendPath(advancedThreatProtectionName.ToString(), true); + uri.AppendPath("/advancedThreatProtectionSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -361,70 +364,67 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/advancedThreatProtectionSettings/", false); - uri.AppendPath(advancedThreatProtectionName.ToString(), true); + uri.AppendPath("/advancedThreatProtectionSettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a server's Advanced Threat Protection state. + /// Gets a list of server's Advanced Threat Protection states. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AdvancedThreatProtectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates a server's Advanced Threat Protection state. + /// Gets a list of server's Advanced Threat Protection states. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Advanced Threat Protection state. - /// The server's Advanced Threat Protection body to update. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionPatch patch, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, advancedThreatProtectionName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AdvancedThreatProtectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AdvancedThreatProtectionListResult.DeserializeAdvancedThreatProtectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs index b8db22ee6b19..682144fbf9d1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/AzureADAdministratorsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class AzureADAdministratorsRestOperations /// Initializes a new instance of AzureADAdministratorsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public AzureADAdministratorsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators", false); + uri.AppendPath("/administrators/", false); + uri.AppendPath(administratorName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators", false); + uri.AppendPath("/administrators/", false); + uri.AppendPath(administratorName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,71 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the AAD administrators in a given server. + /// Gets information about an azure ad administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerAadAdministratorListResult value = default; + MySqlFlexibleServerAadAdministratorData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the AAD administrators in a given server. + /// Gets information about an azure ad administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerAadAdministratorListResult value = default; + MySqlFlexibleServerAadAdministratorData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +154,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,75 +172,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about an azure ad administrator. + /// Creates or updates an existing Azure Active Directory administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. + /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about an azure ad administrator. + /// Creates or updates an existing Azure Active Directory administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. + /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerAadAdministratorData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerAadAdministratorData.DeserializeMySqlFlexibleServerAadAdministratorData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerAadAdministratorData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -248,11 +254,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -265,74 +271,65 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(administratorName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates an existing Azure Active Directory administrator. + /// Deletes an Azure AD Administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. - /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Creates or updates an existing Azure Active Directory administrator. + /// Deletes an Azure AD Administrator. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the Azure AD Administrator. - /// The required parameters for creating or updating an aad administrator. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, MySqlFlexibleServerAadAdministratorData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, administratorName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -342,17 +339,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators/", false); - uri.AppendPath(administratorName.ToString(), true); + uri.AppendPath("/administrators", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -361,8 +357,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/administrators/", false); - uri.AppendPath(administratorName.ToString(), true); + uri.AppendPath("/administrators", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -370,55 +365,59 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes an Azure AD Administrator. + /// List all the AAD administrators in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerAadAdministratorListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes an Azure AD Administrator. + /// List all the AAD administrators in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the Azure AD Administrator. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerAdministratorName administratorName, CancellationToken cancellationToken = default) + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, administratorName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerAadAdministratorListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerAadAdministratorListResult.DeserializeMySqlFlexibleServerAadAdministratorListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs index 07938a897ca3..2d6180426228 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupAndExportRestOperations.cs @@ -25,14 +25,14 @@ internal partial class BackupAndExportRestOperations /// Initializes a new instance of BackupAndExportRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public BackupAndExportRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -95,8 +95,8 @@ public async Task CreateAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: + case 200: return message.Response; default: throw new RequestFailedException(message.Response); @@ -122,8 +122,8 @@ public Response Create(string subscriptionId, string resourceGroupName, string s _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: + case 200: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs index 72fcde2bf98f..84bbcde594b0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/BackupsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class BackupsRestOperations /// Initializes a new instance of BackupsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups", false); + uri.AppendPath("/backups/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups", false); + uri.AppendPath("/backups/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -76,26 +78,30 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupListResult value = default; + MySqlFlexibleServerBackupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); + value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -105,32 +111,36 @@ public async Task> ListByServerAsy /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupListResult value = default; + MySqlFlexibleServerBackupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); + value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -168,7 +178,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// List all the backups for a given server. + /// Create backup for a given server with specified backup name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -176,14 +186,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + public async Task> PutAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -194,14 +204,12 @@ public async Task> GetAsync(string subsc value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the backups for a given server. + /// Create backup for a given server with specified backup name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. @@ -209,14 +217,14 @@ public async Task> GetAsync(string subsc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + public Response Put(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -227,14 +235,12 @@ public Response Get(string subscriptionId, string value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,17 +250,16 @@ internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backups", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -263,8 +268,7 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backups/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backups", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -272,30 +276,28 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou return message; } - /// Create backup for a given server with specified backup name. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> PutAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupData value = default; + MySqlFlexibleServerBackupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); + value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -303,30 +305,28 @@ public async Task> PutAsync(string subsc } } - /// Create backup for a given server with specified backup name. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Put(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreatePutRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupData value = default; + MySqlFlexibleServerBackupListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupData.DeserializeMySqlFlexibleServerBackupData(document.RootElement); + value = MySqlFlexibleServerBackupListResult.DeserializeMySqlFlexibleServerBackupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs index b6e46df0d4f5..953498b105e4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -25,18 +25,18 @@ internal partial class CheckNameAvailabilityRestOperations /// Initializes a new instance of CheckNameAvailabilityRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateExecuteRequestUri(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content) + internal RequestUriBuilder CreateCheckMySqlFlexibleServerNameAvailabilityRequestUri(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -49,7 +49,7 @@ internal RequestUriBuilder CreateExecuteRequestUri(string subscriptionId, AzureL return uri; } - internal HttpMessage CreateExecuteRequest(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content) + internal HttpMessage CreateCheckMySqlFlexibleServerNameAvailabilityRequest(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,12 +79,12 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, AzureLocation l /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ExecuteAsync(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + public async Task> CheckMySqlFlexibleServerNameAvailabilityAsync(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateExecuteRequest(subscriptionId, locationName, content); + using var message = CreateCheckMySqlFlexibleServerNameAvailabilityRequest(subscriptionId, locationName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -107,12 +107,12 @@ public async Task> ExecuteAs /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response Execute(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + public Response CheckMySqlFlexibleServerNameAvailability(string subscriptionId, AzureLocation locationName, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateExecuteRequest(subscriptionId, locationName, content); + using var message = CreateCheckMySqlFlexibleServerNameAvailabilityRequest(subscriptionId, locationName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs index 9fb73f0ef59b..f2df96a09551 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs @@ -25,18 +25,18 @@ internal partial class CheckNameAvailabilityWithoutLocationRestOperations /// Initializes a new instance of CheckNameAvailabilityWithoutLocationRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public CheckNameAvailabilityWithoutLocationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateExecuteRequestUri(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content) + internal RequestUriBuilder CreateCheckMySqlFlexibleServerNameAvailabilityWithoutLocationRequestUri(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -47,7 +47,7 @@ internal RequestUriBuilder CreateExecuteRequestUri(string subscriptionId, MySqlF return uri; } - internal HttpMessage CreateExecuteRequest(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content) + internal HttpMessage CreateCheckMySqlFlexibleServerNameAvailabilityWithoutLocationRequest(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -74,12 +74,12 @@ internal HttpMessage CreateExecuteRequest(string subscriptionId, MySqlFlexibleSe /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ExecuteAsync(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + public async Task> CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateExecuteRequest(subscriptionId, content); + using var message = CreateCheckMySqlFlexibleServerNameAvailabilityWithoutLocationRequest(subscriptionId, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -101,12 +101,12 @@ public async Task> ExecuteAs /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response Execute(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) + public Response CheckMySqlFlexibleServerNameAvailabilityWithoutLocation(string subscriptionId, MySqlFlexibleServerNameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateExecuteRequest(subscriptionId, content); + using var message = CreateCheckMySqlFlexibleServerNameAvailabilityWithoutLocationRequest(subscriptionId, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs index d1e9573a2632..299506a889f3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs @@ -25,14 +25,14 @@ internal partial class CheckVirtualNetworkSubnetUsageRestOperations /// Initializes a new instance of CheckVirtualNetworkSubnetUsageRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public CheckVirtualNetworkSubnetUsageRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs index e42b31d058b6..cf560dd3c495 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ConfigurationsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ConfigurationsRestOperations /// Initializes a new instance of ConfigurationsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,28 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations", false); + uri.AppendPath("/configurations/", false); + uri.AppendPath(configurationName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (keyword != null) - { - uri.AppendQuery("keyword", keyword, true); - } - if (page != null) - { - uri.AppendQuery("page", page.Value, true); - } - if (pageSize != null) - { - uri.AppendQuery("pageSize", pageSize.Value, true); - } return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -80,97 +65,82 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations", false); + uri.AppendPath("/configurations/", false); + uri.AppendPath(configurationName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (tags != null) - { - uri.AppendQuery("tags", tags, true); - } - if (keyword != null) - { - uri.AppendQuery("keyword", keyword, true); - } - if (page != null) - { - uri.AppendQuery("page", page.Value, true); - } - if (pageSize != null) - { - uri.AppendQuery("pageSize", pageSize.Value, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// List all the configurations in a given server. + /// Gets information about a configuration of server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The tags of the server configuration. - /// The keyword of the server configuration. - /// The page of the server configuration. - /// The pageSize of the server configuration. + /// The name of the server configuration. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerConfigurations value = default; + MySqlFlexibleServerConfigurationData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the configurations in a given server. + /// Gets information about a configuration of server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The tags of the server configuration. - /// The keyword of the server configuration. - /// The page of the server configuration. - /// The pageSize of the server configuration. + /// The name of the server configuration. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerConfigurations value = default; + MySqlFlexibleServerConfigurationData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -186,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -204,77 +174,73 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a configuration of server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a configuration of server. + /// Updates a configuration of a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server configuration. + /// The required parameters for updating a server configuration. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string configurationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerConfigurationData.DeserializeMySqlFlexibleServerConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerConfigurationData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -290,11 +256,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -325,7 +291,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -333,7 +299,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -354,7 +320,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -362,7 +328,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -374,7 +340,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -384,17 +350,32 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); + uri.AppendPath("/configurations", false); uri.AppendQuery("api-version", _apiVersion, true); + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (keyword != null) + { + uri.AppendQuery("keyword", keyword, true); + } + if (page != null) + { + uri.AppendQuery("page", page.Value, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName, string tags, string keyword, int? page, int? pageSize) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -403,78 +384,97 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); + uri.AppendPath("/configurations", false); uri.AppendQuery("api-version", _apiVersion, true); + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (keyword != null) + { + uri.AppendQuery("keyword", keyword, true); + } + if (page != null) + { + uri.AppendQuery("page", page.Value, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a configuration of a server. + /// List all the configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server configuration. - /// The required parameters for updating a server configuration. + /// The tags of the server configuration. + /// The keyword of the server configuration. + /// The page of the server configuration. + /// The pageSize of the server configuration. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurations value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates a configuration of a server. + /// List all the configurations in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server configuration. - /// The required parameters for updating a server configuration. + /// The tags of the server configuration. + /// The keyword of the server configuration. + /// The page of the server configuration. + /// The pageSize of the server configuration. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, string configurationName, MySqlFlexibleServerConfigurationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, string tags = null, string keyword = null, int? page = null, int? pageSize = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, configurationName, data); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName, tags, keyword, page, pageSize); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerConfigurations value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerConfigurations.DeserializeMySqlFlexibleServerConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateBatchUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) + internal RequestUriBuilder CreateUpdateConfigurationsRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -489,7 +489,7 @@ internal RequestUriBuilder CreateBatchUpdateRequestUri(string subscriptionId, st return uri; } - internal HttpMessage CreateBatchUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) + internal HttpMessage CreateUpdateConfigurationsRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -522,14 +522,14 @@ internal HttpMessage CreateBatchUpdateRequest(string subscriptionId, string reso /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task BatchUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + public async Task UpdateConfigurationsAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); + using var message = CreateUpdateConfigurationsRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -549,14 +549,14 @@ public async Task BatchUpdateAsync(string subscriptionId, string resou /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response BatchUpdate(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) + public Response UpdateConfigurations(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNull(mySqlFlexibleServerConfigurationListForBatchUpdate, nameof(mySqlFlexibleServerConfigurationListForBatchUpdate)); - using var message = CreateBatchUpdateRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); + using var message = CreateUpdateConfigurationsRequest(subscriptionId, resourceGroupName, serverName, mySqlFlexibleServerConfigurationListForBatchUpdate); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs index 64423060834e..2d47ecdc7cda 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class DatabasesRestOperations /// Initializes a new instance of DatabasesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases", false); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases", false); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the databases in a given server. + /// Gets information about a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the database. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerDatabaseListResult value = default; + MySqlFlexibleServerDatabaseData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the databases in a given server. + /// Gets information about a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the database. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerDatabaseListResult value = default; + MySqlFlexibleServerDatabaseData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,77 +174,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a database. + /// Creates a new database or updates an existing database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. + /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a database. + /// Creates a new database or updates an existing database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. + /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerDatabaseData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerDatabaseData.DeserializeMySqlFlexibleServerDatabaseData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerDatabaseData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,11 +258,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -267,76 +275,67 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a new database or updates an existing database. + /// Deletes a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. - /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Creates a new database or updates an existing database. + /// Deletes a database. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the database. - /// The required parameters for creating or updating a database. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, MySqlFlexibleServerDatabaseData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,17 +345,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); + uri.AppendPath("/databases", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -365,8 +363,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); + uri.AppendPath("/databases", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -374,57 +371,59 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a database. + /// List all the databases in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the database. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a database. + /// List all the databases in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the database. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerDatabaseListResult.DeserializeMySqlFlexibleServerDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 82fe146fc644..a9f1f47569ea 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class FirewallRulesRestOperations /// Initializes a new instance of FirewallRulesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules", false); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules", false); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// List all the firewall rules in a given server. + /// Gets information about a server firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the server firewall rule. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerFirewallRuleListResult value = default; + MySqlFlexibleServerFirewallRuleData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the firewall rules in a given server. + /// Gets information about a server firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the server firewall rule. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerFirewallRuleListResult value = default; + MySqlFlexibleServerFirewallRuleData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,77 +174,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets information about a server firewall rule. + /// Creates a new firewall rule or updates an existing firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. + /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets information about a server firewall rule. + /// Creates a new firewall rule or updates an existing firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. + /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerFirewallRuleData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerFirewallRuleData.DeserializeMySqlFlexibleServerFirewallRuleData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerFirewallRuleData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,11 +258,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -267,76 +275,67 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(firewallRuleName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a new firewall rule or updates an existing firewall rule. + /// Deletes a firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. - /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Creates a new firewall rule or updates an existing firewall rule. + /// Deletes a firewall rule. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the server firewall rule. - /// The required parameters for creating or updating a firewall rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, MySqlFlexibleServerFirewallRuleData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,17 +345,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); + uri.AppendPath("/firewallRules", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -365,8 +363,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/firewallRules/", false); - uri.AppendPath(firewallRuleName, true); + uri.AppendPath("/firewallRules", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -374,57 +371,59 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a firewall rule. + /// List all the firewall rules in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server firewall rule. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerFirewallRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a firewall rule. + /// List all the firewall rules in a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the server firewall rule. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, firewallRuleName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServerFirewallRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerFirewallRuleListResult.DeserializeMySqlFlexibleServerFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs index d87b4986d00d..7ea38c597822 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs @@ -25,14 +25,14 @@ internal partial class GetPrivateDnsZoneSuffixRestOperations /// Initializes a new instance of GetPrivateDnsZoneSuffixRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public GetPrivateDnsZoneSuffixRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs index 9bb1981167aa..94ecc195ee18 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class LocationBasedCapabilitiesRestOperations /// Initializes a new instance of LocationBasedCapabilitiesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public LocationBasedCapabilitiesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs index ab2a86da7e25..d8d428054c4e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs @@ -25,18 +25,18 @@ internal partial class LocationBasedCapabilitySetRestOperations /// Initializes a new instance of LocationBasedCapabilitySetRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public LocationBasedCapabilitySetRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation locationName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation locationName, string capabilitySetName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); uri.AppendPath(locationName, true); - uri.AppendPath("/capabilitySets", false); + uri.AppendPath("/capabilitySets/", false); + uri.AppendPath(capabilitySetName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation locationName) + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locationName, string capabilitySetName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,7 +61,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); uri.AppendPath(locationName, true); - uri.AppendPath("/capabilitySets", false); + uri.AppendPath("/capabilitySets/", false); + uri.AppendPath(capabilitySetName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -71,24 +73,28 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca /// Get capabilities at specified location in a given subscription. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. + /// Name of capability set. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, AzureLocation locationName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation locationName, string capabilitySetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(capabilitySetName, nameof(capabilitySetName)); - using var message = CreateListRequest(subscriptionId, locationName); + using var message = CreateGetRequest(subscriptionId, locationName, capabilitySetName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - CapabilitySetsList value = default; + MySqlFlexibleServersCapabilityData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = CapabilitySetsList.DeserializeCapabilitySetsList(document.RootElement); + value = MySqlFlexibleServersCapabilityData.DeserializeMySqlFlexibleServersCapabilityData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServersCapabilityData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -97,30 +103,34 @@ public async Task> ListAsync(string subscriptionId, /// Get capabilities at specified location in a given subscription. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. + /// Name of capability set. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, AzureLocation locationName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation locationName, string capabilitySetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(capabilitySetName, nameof(capabilitySetName)); - using var message = CreateListRequest(subscriptionId, locationName); + using var message = CreateGetRequest(subscriptionId, locationName, capabilitySetName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - CapabilitySetsList value = default; + MySqlFlexibleServersCapabilityData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = CapabilitySetsList.DeserializeCapabilitySetsList(document.RootElement); + value = MySqlFlexibleServersCapabilityData.DeserializeMySqlFlexibleServersCapabilityData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServersCapabilityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation locationName, string capabilitySetName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation locationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -128,13 +138,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); uri.AppendPath(locationName, true); - uri.AppendPath("/capabilitySets/", false); - uri.AppendPath(capabilitySetName, true); + uri.AppendPath("/capabilitySets", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locationName, string capabilitySetName) + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation locationName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -145,8 +154,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/locations/", false); uri.AppendPath(locationName, true); - uri.AppendPath("/capabilitySets/", false); - uri.AppendPath(capabilitySetName, true); + uri.AppendPath("/capabilitySets", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -157,28 +165,24 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat /// Get capabilities at specified location in a given subscription. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// Name of capability set. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, AzureLocation locationName, string capabilitySetName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(capabilitySetName, nameof(capabilitySetName)); - using var message = CreateGetRequest(subscriptionId, locationName, capabilitySetName); + using var message = CreateListRequest(subscriptionId, locationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServersCapabilityData value = default; + CapabilitySetsList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServersCapabilityData.DeserializeMySqlFlexibleServersCapabilityData(document.RootElement); + value = CapabilitySetsList.DeserializeCapabilitySetsList(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServersCapabilityData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -187,28 +191,24 @@ public async Task> GetAsync(string /// Get capabilities at specified location in a given subscription. /// The ID of the target subscription. The value must be an UUID. /// The name of the location. - /// Name of capability set. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, AzureLocation locationName, string capabilitySetName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, AzureLocation locationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(capabilitySetName, nameof(capabilitySetName)); - using var message = CreateGetRequest(subscriptionId, locationName, capabilitySetName); + using var message = CreateListRequest(subscriptionId, locationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServersCapabilityData value = default; + CapabilitySetsList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServersCapabilityData.DeserializeMySqlFlexibleServersCapabilityData(document.RootElement); + value = CapabilitySetsList.DeserializeCapabilitySetsList(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServersCapabilityData)null, message.Response); default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs index 4c36bb838a53..9e3aeb5f713a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LogFilesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class LogFilesRestOperations /// Initializes a new instance of LogFilesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public LogFilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs index f619ba5c0b6e..9fd186c22b19 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupRestOperations.cs @@ -23,14 +23,14 @@ internal partial class LongRunningBackupRestOperations /// Initializes a new instance of LongRunningBackupRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public LongRunningBackupRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs index 098f93e69a4d..206f72dc0ffb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/LongRunningBackupsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class LongRunningBackupsRestOperations /// Initializes a new instance of LongRunningBackupsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public LongRunningBackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2", false); + uri.AppendPath("/backupsV2/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2", false); + uri.AppendPath("/backupsV2/", false); + uri.AppendPath(backupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List all the backups for a given server. + /// Get backup for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServerBackupV2ListResult value = default; + MySqlFlexibleServerBackupV2Data value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); + value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List all the backups for a given server. + /// Get backup for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the backup. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServerBackupV2ListResult value = default; + MySqlFlexibleServerBackupV2Data value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); + value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -140,13 +150,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backupsV2", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string backupName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -159,8 +168,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/backupsV2/", false); - uri.AppendPath(backupName, true); + uri.AppendPath("/backupsV2", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -168,67 +176,59 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get backup for a given server. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupV2Data value = default; + ServerBackupV2ListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); + value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get backup for a given server. + /// List all the backups for a given server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the backup. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string backupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, backupName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServerBackupV2Data value = default; + ServerBackupV2ListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerBackupV2Data.DeserializeMySqlFlexibleServerBackupV2Data(document.RootElement); + value = ServerBackupV2ListResult.DeserializeServerBackupV2ListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MySqlFlexibleServerBackupV2Data)null, message.Response); default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs index 0dbda9b857d5..c215c568d39b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/MaintenancesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class MaintenancesRestOperations /// Initializes a new instance of MaintenancesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public MaintenancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances", false); + uri.AppendPath("/maintenances/", false); + uri.AppendPath(maintenanceName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances", false); + uri.AppendPath("/maintenances/", false); + uri.AppendPath(maintenanceName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List maintenances. + /// Read maintenance. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the maintenance. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ReadAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MaintenanceListResult value = default; + MySqlFlexibleServerMaintenanceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); + value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List maintenances. + /// Read maintenance. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the maintenance. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Read(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MaintenanceListResult value = default; + MySqlFlexibleServerMaintenanceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); + value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +156,11 @@ internal RequestUriBuilder CreateReadRequestUri(string subscriptionId, string re return uri; } - internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,77 +174,73 @@ internal HttpMessage CreateReadRequest(string subscriptionId, string resourceGro uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Read maintenance. + /// Update maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the maintenance. + /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ReadAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerMaintenanceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Read maintenance. + /// Update maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the maintenance. + /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Read(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateReadRequest(subscriptionId, resourceGroupName, serverName, maintenanceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServerMaintenanceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerMaintenanceData.DeserializeMySqlFlexibleServerMaintenanceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServerMaintenanceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,17 +250,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances/", false); - uri.AppendPath(maintenanceName, true); + uri.AppendPath("/maintenances", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -263,72 +268,67 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/maintenances/", false); - uri.AppendPath(maintenanceName, true); + uri.AppendPath("/maintenances", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update maintenances. + /// List maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the maintenance. - /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MaintenanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update maintenances. + /// List maintenances. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the maintenance. - /// The required parameters for update maintenance on a server. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string serverName, string maintenanceName, MySqlFlexibleServerMaintenancePatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(maintenanceName, nameof(maintenanceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, maintenanceName, patch); + using var message = CreateListRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MaintenanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MaintenanceListResult.DeserializeMaintenanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 70e2351bc356..6b67240cbbd7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class PrivateEndpointConnectionsRestOperations /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByServerRequest(string subscriptionId, string res return message; } - /// Gets all private endpoint connections on a server. + /// Gets a private endpoint connection. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + MySqlFlexibleServersPrivateEndpointConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets all private endpoint connections on a server. + /// Gets a private endpoint connection. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. + /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + MySqlFlexibleServersPrivateEndpointConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +156,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,77 +174,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets a private endpoint connection. + /// Approve or reject a private endpoint connection with a given name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServersPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a private endpoint connection. + /// Approve or reject a private endpoint connection with a given name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the private endpoint connection associated with the Azure resource. + /// Resource create parameters. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MySqlFlexibleServersPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServersPrivateEndpointConnectionData.DeserializeMySqlFlexibleServersPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServersPrivateEndpointConnectionData)null, message.Response); + case 201: + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,11 +258,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -267,76 +275,67 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(privateEndpointConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Approve or reject a private endpoint connection with a given name. + /// Deletes a private endpoint connection with a given name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the private endpoint connection associated with the Azure resource. - /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Approve or reject a private endpoint connection with a given name. + /// Deletes a private endpoint connection with a given name. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. /// The name of the private endpoint connection associated with the Azure resource. - /// Resource create parameters. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, MySqlFlexibleServersPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,17 +345,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/privateEndpointConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName) + internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -365,8 +363,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/privateEndpointConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -374,57 +371,59 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a private endpoint connection with a given name. + /// Gets all private endpoint connections on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a private endpoint connection with a given name. + /// Gets all private endpoint connections on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The name of the private endpoint connection associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string serverName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serverName, privateEndpointConnectionName); + using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MySqlFlexibleServersPrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServersPrivateEndpointConnectionListResult.DeserializeMySqlFlexibleServersPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs deleted file mode 100644 index bf4d2e73ee76..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MySql.FlexibleServers.Models; - -namespace Azure.ResourceManager.MySql.FlexibleServers -{ - internal partial class PrivateLinkResourcesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateLinkResourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListByServerRequestUri(string subscriptionId, string resourceGroupName, string serverName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/privateLinkResources", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByServerRequest(string subscriptionId, string resourceGroupName, string serverName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/privateLinkResources", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the private link resources for MySQL server. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServerAsync(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServersPrivateLinkResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServersPrivateLinkResourceListResult.DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the private link resources for MySQL server. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServer(string subscriptionId, string resourceGroupName, string serverName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - - using var message = CreateListByServerRequest(subscriptionId, resourceGroupName, serverName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServersPrivateLinkResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServersPrivateLinkResourceListResult.DeserializeMySqlFlexibleServersPrivateLinkResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName, string groupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string groupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a private link resource for MySQL server. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The name of the private link resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, groupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServersPrivateLinkResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServersPrivateLinkResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a private link resource for MySQL server. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The name of the private link resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string serverName, string groupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, groupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServersPrivateLinkResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServersPrivateLinkResourceData.DeserializeMySqlFlexibleServersPrivateLinkResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MySqlFlexibleServersPrivateLinkResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs index 7df5acb63a3a..bdae3d1ad309 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ReplicasRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ReplicasRestOperations /// Initializes a new instance of ReplicasRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs index 3cd791a716d8..bc31b3f81d18 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersMigrationRestOperations.cs @@ -23,14 +23,14 @@ internal partial class ServersMigrationRestOperations /// Initializes a new instance of ServersMigrationRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ServersMigrationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -87,8 +87,8 @@ public async Task CutoverMigrationAsync(string subscriptionId, string await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: + case 200: return message.Response; default: throw new RequestFailedException(message.Response); @@ -112,8 +112,8 @@ public Response CutoverMigration(string subscriptionId, string resourceGroupName _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: + case 200: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs index 0bc3996a5a83..3b11eaa91809 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/RestOperations/ServersRestOperations.cs @@ -25,181 +25,17 @@ internal partial class ServersRestOperations /// Initializes a new instance of ServersRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-12-01-preview"; + _apiVersion = apiVersion ?? "2024-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the servers in a given subscription. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the servers in a given subscription. - /// The ID of the target subscription. The value must be an UUID. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all the servers in a given resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all the servers in a given resource group. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MySqlFlexibleServerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serverName) { var uri = new RawRequestUriBuilder(); @@ -511,7 +347,6 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(serverName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -568,7 +403,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal RequestUriBuilder CreateDetachVNetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -576,87 +411,157 @@ internal RequestUriBuilder CreateDetachVNetRequestUri(string subscriptionId, str uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/detachVNet", false); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachVNetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); - uri.AppendPath(serverName, true); - uri.AppendPath("/detachVNet", false); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Detach VNet on a server. + /// List all the servers in a given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DetachVNetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDetachVNetRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Detach VNet on a server. + /// List all the servers in a given resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the server. - /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DetachVNet(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDetachVNetRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MySqlFlexibleServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the servers in a given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the servers in a given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MySqlFlexibleServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MySqlFlexibleServerListResult.DeserializeMySqlFlexibleServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -693,7 +598,6 @@ internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourc uri.AppendPath("/failover", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -748,7 +652,7 @@ public Response Failover(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) + internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -758,12 +662,12 @@ internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/resetGtid", false); + uri.AppendPath("/validateEstimateHighAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) + internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -776,67 +680,75 @@ internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resour uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/resetGtid", false); + uri.AppendPath("/validateEstimateHighAvailability", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(highAvailabilityValidationEstimation, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Resets GTID on a server. + /// Validate a deployment of high availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for resetting GTID on a server. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResetGtidAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + public async Task> ValidateEstimateHighAvailabilityAsync(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + HighAvailabilityValidationEstimation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Resets GTID on a server. + /// Validate a deployment of high availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for resetting GTID on a server. + /// The required parameters for validation of high availability deployment. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResetGtid(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + public Response ValidateEstimateHighAvailability(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); - using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + HighAvailabilityValidationEstimation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -873,7 +785,6 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(mySqlFlexibleServerRestartParameter, ModelSerializationExtensions.WireOptions); @@ -967,7 +878,6 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -1053,7 +963,6 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro uri.AppendPath("/stop", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -1108,7 +1017,7 @@ public Response Stop(string subscriptionId, string resourceGroupName, string ser } } - internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) + internal RequestUriBuilder CreateResetGtidRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1118,12 +1027,12 @@ internal RequestUriBuilder CreateValidateEstimateHighAvailabilityRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/validateEstimateHighAvailability", false); + uri.AppendPath("/resetGtid", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation) + internal HttpMessage CreateResetGtidRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1136,81 +1045,166 @@ internal HttpMessage CreateValidateEstimateHighAvailabilityRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); uri.AppendPath(serverName, true); - uri.AppendPath("/validateEstimateHighAvailability", false); + uri.AppendPath("/resetGtid", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Resets GTID on a server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The required parameters for resetting GTID on a server. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResetGtidAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resets GTID on a server. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the server. + /// The required parameters for resetting GTID on a server. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ResetGtid(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerGtidSetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetGtidRequest(subscriptionId, resourceGroupName, serverName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDetachVnetRequestUri(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/detachVNet", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDetachVnetRequest(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DBforMySQL/flexibleServers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/detachVNet", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(highAvailabilityValidationEstimation, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Validate a deployment of high availability. + /// Detach VNet on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for validation of high availability deployment. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ValidateEstimateHighAvailabilityAsync(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public async Task DetachVnetAsync(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); + using var message = CreateDetachVnetRequest(subscriptionId, resourceGroupName, serverName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 202: case 200: - { - HighAvailabilityValidationEstimation value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Validate a deployment of high availability. + /// Detach VNet on a server. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the server. - /// The required parameters for validation of high availability deployment. + /// The required parameters for detach vnet on a server. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ValidateEstimateHighAvailability(string subscriptionId, string resourceGroupName, string serverName, HighAvailabilityValidationEstimation highAvailabilityValidationEstimation, CancellationToken cancellationToken = default) + public Response DetachVnet(string subscriptionId, string resourceGroupName, string serverName, MySqlFlexibleServerDetachVnetContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); - Argument.AssertNotNull(highAvailabilityValidationEstimation, nameof(highAvailabilityValidationEstimation)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateValidateEstimateHighAvailabilityRequest(subscriptionId, resourceGroupName, serverName, highAvailabilityValidationEstimation); + using var message = CreateDetachVnetRequest(subscriptionId, resourceGroupName, serverName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 202: case 200: - { - HighAvailabilityValidationEstimation value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = HighAvailabilityValidationEstimation.DeserializeHighAvailabilityValidationEstimation(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1218,7 +1212,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1232,18 +1226,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List all the servers in a given subscription. + /// List all the servers in a given resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1259,18 +1255,20 @@ public async Task> ListNextPageAsync(str } } - /// List all the servers in a given subscription. + /// List all the servers in a given resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1286,7 +1284,7 @@ public Response ListNextPage(string nextLink, str } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1294,7 +1292,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1308,20 +1306,18 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// List all the servers in a given resource group. + /// List all the servers in a given subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1337,20 +1333,18 @@ public async Task> ListByResourceGroupNe } } - /// List all the servers in a given resource group. + /// List all the servers in a given subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md deleted file mode 100644 index 887fd76edbcf..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +++ /dev/null @@ -1,163 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -```yaml -azure-arm: true -csharp: true -clear-output-folder: true -skip-csproj: true -library-name: MySql -#mgmt-debug: -# show-serialized-names: true -use-model-reader-writer: true - -batch: - - tag: package-flexibleserver-2024-12-01-preview -``` - -``` yaml $(tag) == 'package-flexibleserver-2024-12-01-preview' -namespace: Azure.ResourceManager.MySql.FlexibleServers -require: https://github.com/Azure/azure-rest-api-specs/blob/bb58530b93212845aeb78120d6762677c7610ef7/specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/readme.md -output-folder: $(this-folder)/Generated -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: false -modelerfour: - flatten-payloads: false - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - 'locationName': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - 'PrincipalId': 'uuid' - '*SubnetId': 'arm-id' - '*ResourceId': 'arm-id' - '*UserAssignedIdentityId': 'arm-id' - 'ResourceType': 'resource-type' - '*IPAddress': 'ip-address' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -prepend-rp-prefix: - - Capability - -rename-mapping: - Storage.storageSizeGB: StorageSizeInGB - SkuCapability.supportedMemoryPerVCoreMB: SupportedMemoryPerVCoreInMB - ConfigurationListForBatchUpdate.value: Values - ConfigurationListResult.value: Values - Configuration: MySqlFlexibleServerConfiguration - Database: MySqlFlexibleServerDatabase - FirewallRule: MySqlFlexibleServerFirewallRule - ServerBackup: MySqlFlexibleServerBackup - ServerBackupV2: MySqlFlexibleServerBackupV2 - Server: MySqlFlexibleServer - ServerVersion: MySqlFlexibleServerVersion - EnableStatusEnum: MySqlFlexibleServerEnableStatusEnum - ReplicationRole: MySqlFlexibleServerReplicationRole - DataEncryption: MySqlFlexibleServerDataEncryption - MaintenanceWindow: MySqlFlexibleServerMaintenanceWindow - Backup: MySqlFlexibleServerBackupProperties - Storage: MySqlFlexibleServerStorage - MySQLServerSku: MySqlFlexibleServerSku - Network: MySqlFlexibleServerNetwork - HighAvailability: MySqlFlexibleServerHighAvailability - HighAvailabilityMode: MySqlFlexibleServerHighAvailabilityMode - HighAvailabilityState: MySqlFlexibleServerHighAvailabilityState - ServerForUpdate: MySqlFlexibleServerForUpdate - ServerListResult: MySqlFlexibleServerListResult - ServerRestartParameter: MySqlFlexibleServerRestartParameter - ServerState: MySqlFlexibleServerState - ServerBackupListResult: MySqlFlexibleServerBackupListResult - FirewallRuleListResult: MySqlFlexibleServerFirewallRuleListResult - DatabaseListResult: MySqlFlexibleServerDatabaseListResult - ConfigurationSource: MySqlFlexibleServerConfigurationSource - ConfigurationListResult: MySqlFlexibleServerConfigurations - ConfigurationForBatchUpdate: MySqlFlexibleServerConfigurationForBatchUpdate - ConfigurationListForBatchUpdate: MySqlFlexibleServerConfigurationListForBatchUpdate - VirtualNetworkSubnetUsageParameter: MySqlFlexibleServerVirtualNetworkSubnetUsageParameter - DelegatedSubnetUsage: MySqlFlexibleServerDelegatedSubnetUsage - VirtualNetworkSubnetUsageResult: MySqlFlexibleServerVirtualNetworkSubnetUsageResult - SkuCapability: MySqlFlexibleServerSkuCapability - ServerVersionCapability: MySqlFlexibleServerServerVersionCapability - StorageEditionCapability: MySqlFlexibleServerStorageEditionCapability - ServerEditionCapability: MySqlFlexibleServerEditionCapability - CapabilityProperties: MySqlFlexibleServerCapabilityProperties - CapabilitiesListResult: MySqlFlexibleServerCapabilitiesListResult - GetPrivateDnsZoneSuffixResponse: MySqlFlexibleServerPrivateDnsZoneSuffixResponse - NameAvailabilityRequest: MySqlFlexibleServerNameAvailabilityContent - NameAvailability: MySqlFlexibleServerNameAvailabilityResult - CreateMode: MySqlFlexibleServerCreateMode - DataEncryptionType: MySqlFlexibleServerDataEncryptionType - ServerSkuTier: MySqlFlexibleServerSkuTier - IsReadOnly: MySqlFlexibleServerConfigReadOnlyState - IsDynamicConfig: MySqlFlexibleServerConfigDynamicState - IsConfigPendingRestart: MySqlFlexibleServerConfigPendingRestartState - NameAvailability.nameAvailable: IsNameAvailable - AzureADAdministrator: MySqlFlexibleServerAadAdministrator - AdministratorListResult: MySqlFlexibleServerAadAdministratorListResult - AdministratorName: MySqlFlexibleServerAdministratorName - BackupAndExportRequest: MySqlFlexibleServerBackupAndExportRequest - BackupAndExportResponse: MySqlFlexibleServerBackupAndExportResult - BackupFormat: MySqlFlexibleServerBackupFormat - BackupRequestBase: MySqlFlexibleServerBackupContentBase - BackupSettings: MySqlFlexibleServerBackupSettings - BackupStoreDetails: MySqlFlexibleServerBackupStoreDetails - FullBackupStoreDetails: MySqlFlexibleServerFullBackupStoreDetails - AdministratorType: MySqlFlexibleServerAdministratorType - LogFile: MySqlFlexibleServerLogFile - LogFileListResult: MySqlFlexibleServerLogFileListResult - OperationStatus: MySqlFlexibleServerBackupAndExportOperationStatus - ResetAllToDefault: MySqlFlexibleServerConfigurationResetAllToDefault - ServerGtidSetParameter: MySqlFlexibleServerGtidSetContent - ValidateBackupResponse: MySqlFlexibleServerValidateBackupResult - Maintenance: MySqlFlexibleServerMaintenance - MaintenanceType: MySqlFlexibleServerMaintenanceType - MaintenanceState: MySqlFlexibleServerMaintenanceState - MaintenanceProvisioningState: MySqlFlexibleServerMaintenanceProvisioningState - BackupType: MySqlFlexibleServerBackupType - ProvisioningState: MySqlFlexibleServerBackupProvisioningState - Server.properties.privateEndpointConnections: ServerPrivateEndpointConnections - BatchOfMaintenance: MySqlFlexibleServerBatchOfMaintenance - FeatureProperty: MySqlFlexibleServerFeatureProperty - PatchStrategy: MySqlFlexibleServerPatchStrategy - StorageRedundancyEnum: MySqlFlexibleServerStorageRedundancyType - ServerDetachVNetParameter: MySqlFlexibleServerDetachVnetContent - -override-operation-name: - CheckNameAvailability_Execute: CheckMySqlFlexibleServerNameAvailability - CheckNameAvailabilityWithoutLocation_Execute: CheckMySqlFlexibleServerNameAvailabilityWithoutLocation - Configurations_BatchUpdate: UpdateConfigurations - BackupAndExport_ValidateBackup: ValidateBackup - Servers_DetachVNet: DetachVnet - -directive: - - remove-operation: OperationProgress_Get - - remove-operation: OperationResults_Get - -``` diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs index 45c90e2316e5..bee37a992060 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_AdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettingsWithAllParametersUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsPutDisabled.json + // this example is just showing the usage of "AdvancedThreatProtection_UpdatePut" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,10 +41,7 @@ public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettings // invoke the operation AdvancedThreatProtectionName advancedThreatProtectionName = AdvancedThreatProtectionName.Default; - AdvancedThreatProtectionData data = new AdvancedThreatProtectionData - { - State = AdvancedThreatProtectionState.Disabled, - }; + AdvancedThreatProtectionData data = new AdvancedThreatProtectionData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, advancedThreatProtectionName, data); AdvancedThreatProtectionResource result = lro.Value; @@ -59,8 +56,8 @@ public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettings [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsPutEnabled.json + // this example is just showing the usage of "AdvancedThreatProtection_UpdatePut" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -80,10 +77,7 @@ public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsU // invoke the operation AdvancedThreatProtectionName advancedThreatProtectionName = AdvancedThreatProtectionName.Default; - AdvancedThreatProtectionData data = new AdvancedThreatProtectionData - { - State = AdvancedThreatProtectionState.Enabled, - }; + AdvancedThreatProtectionData data = new AdvancedThreatProtectionData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, advancedThreatProtectionName, data); AdvancedThreatProtectionResource result = lro.Value; @@ -98,8 +92,8 @@ public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsU [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsGet.json + // this example is just showing the usage of "AdvancedThreatProtection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -132,8 +126,8 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetListOfServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsList.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsList.json + // this example is just showing the usage of "AdvancedThreatProtection_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -168,8 +162,8 @@ public async Task GetAll_GetListOfServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsGet.json + // this example is just showing the usage of "AdvancedThreatProtection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -198,8 +192,8 @@ public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsGet.json + // this example is just showing the usage of "AdvancedThreatProtection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs index ca159b98415e..8096eccf7802 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs @@ -20,8 +20,8 @@ public partial class Sample_AdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsGet.json + // this example is just showing the usage of "AdvancedThreatProtection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsPatchDisabled.json + // this example is just showing the usage of "AdvancedThreatProtection_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -69,10 +69,7 @@ public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllP AdvancedThreatProtectionResource advancedThreatProtection = client.GetAdvancedThreatProtectionResource(advancedThreatProtectionResourceId); // invoke the operation - AdvancedThreatProtectionPatch patch = new AdvancedThreatProtectionPatch - { - State = AdvancedThreatProtectionState.Disabled, - }; + AdvancedThreatProtectionPatch patch = new AdvancedThreatProtectionPatch(); ArmOperation lro = await advancedThreatProtection.UpdateAsync(WaitUntil.Completed, patch); AdvancedThreatProtectionResource result = lro.Value; @@ -87,8 +84,8 @@ public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllP [Ignore("Only validating compilation of examples")] public async Task Update_EnableAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json - // this example is just showing the usage of "AdvancedThreatProtectionSettings_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AdvancedThreatProtectionSettingsPatchEnabled.json + // this example is just showing the usage of "AdvancedThreatProtection_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -105,10 +102,7 @@ public async Task Update_EnableAServerSAdvancedThreatProtectionSettings() AdvancedThreatProtectionResource advancedThreatProtection = client.GetAdvancedThreatProtectionResource(advancedThreatProtectionResourceId); // invoke the operation - AdvancedThreatProtectionPatch patch = new AdvancedThreatProtectionPatch - { - State = AdvancedThreatProtectionState.Enabled, - }; + AdvancedThreatProtectionPatch patch = new AdvancedThreatProtectionPatch(); ArmOperation lro = await advancedThreatProtection.UpdateAsync(WaitUntil.Completed, patch); AdvancedThreatProtectionResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs index 8f246e867178..484d561379ff 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorCreate.json - // this example is just showing the usage of "AzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorCreate.json + // this example is just showing the usage of "AzureADAdministrator_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,14 +41,7 @@ public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() // invoke the operation MySqlFlexibleServerAdministratorName administratorName = MySqlFlexibleServerAdministratorName.ActiveDirectory; - MySqlFlexibleServerAadAdministratorData data = new MySqlFlexibleServerAadAdministratorData - { - AdministratorType = MySqlFlexibleServerAdministratorType.ActiveDirectory, - Login = "bob@contoso.com", - Sid = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - TenantId = Guid.Parse("c12b7025-bfe2-46c1-b463-993b5e4cd467"), - IdentityResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"), - }; + MySqlFlexibleServerAadAdministratorData data = new MySqlFlexibleServerAadAdministratorData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, administratorName, data); MySqlFlexibleServerAadAdministratorResource result = lro.Value; @@ -63,8 +56,8 @@ public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json - // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorGet.json + // this example is just showing the usage of "AzureADAdministrator_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -97,8 +90,8 @@ public async Task Get_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAzureADAdministratorsInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorsListByServer.json - // this example is just showing the usage of "AzureADAdministrators_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorsListByServer.json + // this example is just showing the usage of "AzureADAdministrator_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -133,8 +126,8 @@ public async Task GetAll_ListAzureADAdministratorsInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json - // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorGet.json + // this example is just showing the usage of "AzureADAdministrator_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -163,8 +156,8 @@ public async Task Exists_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json - // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorGet.json + // this example is just showing the usage of "AzureADAdministrator_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs index 6be5430cda18..23c300a9d278 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorGet.json - // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorGet.json + // this example is just showing the usage of "AzureADAdministrator_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorDelete.json - // this example is just showing the usage of "AzureADAdministrators_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorDelete.json + // this example is just showing the usage of "AzureADAdministrator_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnAzureAdAdministrator() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/AzureADAdministratorCreate.json - // this example is just showing the usage of "AzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/AzureADAdministratorCreate.json + // this example is just showing the usage of "AzureADAdministrator_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,14 +96,7 @@ public async Task Update_CreateAnAzureAdAdministrator() MySqlFlexibleServerAadAdministratorResource mySqlFlexibleServerAadAdministrator = client.GetMySqlFlexibleServerAadAdministratorResource(mySqlFlexibleServerAadAdministratorResourceId); // invoke the operation - MySqlFlexibleServerAadAdministratorData data = new MySqlFlexibleServerAadAdministratorData - { - AdministratorType = MySqlFlexibleServerAdministratorType.ActiveDirectory, - Login = "bob@contoso.com", - Sid = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c", - TenantId = Guid.Parse("c12b7025-bfe2-46c1-b463-993b5e4cd467"), - IdentityResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi"), - }; + MySqlFlexibleServerAadAdministratorData data = new MySqlFlexibleServerAadAdministratorData(); ArmOperation lro = await mySqlFlexibleServerAadAdministrator.UpdateAsync(WaitUntil.Completed, data); MySqlFlexibleServerAadAdministratorResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs index 5f8bdc04211c..43035f6e91e6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerBackupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupPut.json - // this example is just showing the usage of "Backups_Put" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupPut.json + // this example is just showing the usage of "ServerBackup_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -54,8 +54,8 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json - // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupGet.json + // this example is just showing the usage of "ServerBackup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -88,8 +88,8 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupsListByServer.json - // this example is just showing the usage of "Backups_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupsListByServer.json + // this example is just showing the usage of "ServerBackup_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -124,8 +124,8 @@ public async Task GetAll_ListBackupsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json - // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupGet.json + // this example is just showing the usage of "ServerBackup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -154,8 +154,8 @@ public async Task Exists_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json - // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupGet.json + // this example is just showing the usage of "ServerBackup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs index af67307a8ccc..32c57537ab09 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupGet.json - // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupGet.json + // this example is just showing the usage of "ServerBackup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -50,8 +50,8 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupPut.json - // this example is just showing the usage of "Backups_Put" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/BackupPut.json + // this example is just showing the usage of "ServerBackup_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs index 60e62b3ccd79..abbc5b07e9c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerBackupV2Collection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackup.json - // this example is just showing the usage of "LongRunningBackup_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackup.json + // this example is just showing the usage of "ServerBackupV2_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -55,8 +55,8 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json - // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackupGet.json + // this example is just showing the usage of "ServerBackupV2_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -89,8 +89,8 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupsListByServer.json - // this example is just showing the usage of "LongRunningBackups_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackupsListByServer.json + // this example is just showing the usage of "ServerBackupV2_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -125,8 +125,8 @@ public async Task GetAll_ListBackupsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json - // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackupGet.json + // this example is just showing the usage of "ServerBackupV2_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -155,8 +155,8 @@ public async Task Exists_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json - // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackupGet.json + // this example is just showing the usage of "ServerBackupV2_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs index 0c471e93dc94..eb4d47e91919 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerBackupV2Resource [Ignore("Only validating compilation of examples")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackupGet.json - // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackupGet.json + // this example is just showing the usage of "ServerBackupV2_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -50,8 +50,8 @@ public async Task Get_GetABackupForAServer() [Ignore("Only validating compilation of examples")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LongRunningBackup.json - // this example is just showing the usage of "LongRunningBackup_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LongRunningBackup.json + // this example is just showing the usage of "ServerBackupV2_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs index 46a6fb89a65d..1b2b87195889 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs @@ -22,8 +22,8 @@ public partial class Sample_MySqlFlexibleServerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreate.json - // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerCreate.json + // this example is just showing the usage of "Server_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -45,29 +45,6 @@ public async Task CreateOrUpdate_CreateANewServer() MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("southeastasia")) { Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), - AdministratorLogin = "cloudsa", - AdministratorLoginPassword = "your_password", - Version = MySqlFlexibleServerVersion.Ver5_7, - AvailabilityZone = "1", - CreateMode = MySqlFlexibleServerCreateMode.Default, - Storage = new MySqlFlexibleServerStorage - { - StorageSizeInGB = 100, - Iops = 600, - AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, - StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.ZoneRedundancy, - }, - Backup = new MySqlFlexibleServerBackupProperties - { - BackupRetentionDays = 7, - BackupIntervalHours = 24, - GeoRedundantBackup = MySqlFlexibleServerEnableStatusEnum.Disabled, - }, - HighAvailability = new MySqlFlexibleServerHighAvailability - { - Mode = MySqlFlexibleServerHighAvailabilityMode.ZoneRedundant, - StandbyAvailabilityZone = "3", - }, Tags = { ["num"] = "1" @@ -87,8 +64,8 @@ public async Task CreateOrUpdate_CreateANewServer() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAReplicaServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateReplica.json - // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerCreateReplica.json + // this example is just showing the usage of "Server_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -107,11 +84,7 @@ public async Task CreateOrUpdate_CreateAReplicaServer() // invoke the operation string serverName = "replica-server"; - MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("SoutheastAsia")) - { - CreateMode = MySqlFlexibleServerCreateMode.Replica, - SourceServerResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testgr/providers/Microsoft.DBforMySQL/flexibleServers/source-server"), - }; + MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("SoutheastAsia")); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serverName, data); MySqlFlexibleServerResource result = lro.Value; @@ -124,10 +97,10 @@ public async Task CreateOrUpdate_CreateAReplicaServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() + public async Task CreateOrUpdate_CreateAServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithPointInTimeRestore.json - // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerCreateWithBYOK.json + // this example is just showing the usage of "Server_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -137,7 +110,7 @@ public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "TargetResourceGroup"; + string resourceGroupName = "testrg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -145,13 +118,17 @@ public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() MySqlFlexibleServerCollection collection = resourceGroupResource.GetMySqlFlexibleServers(); // invoke the operation - string serverName = "targetserver"; - MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("SoutheastAsia")) + string serverName = "mysqltestserver"; + MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("southeastasia")) { - Sku = new MySqlFlexibleServerSku("Standard_D14_v2", MySqlFlexibleServerSkuTier.GeneralPurpose), - CreateMode = MySqlFlexibleServerCreateMode.PointInTimeRestore, - SourceServerResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMySQL/flexibleServers/sourceserver"), - RestorePointInTime = DateTimeOffset.Parse("2021-06-24T00:00:37.467Z"), + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity() +}, + }, + Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), Tags = { ["num"] = "1" @@ -169,10 +146,10 @@ public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAServerWithByok() + public async Task CreateOrUpdate_CreateAServerWithNonDefaultDatabasePort() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithBYOK.json - // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerCreateWithDatabasePort.json + // this example is just showing the usage of "Server_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -193,45 +170,7 @@ public async Task CreateOrUpdate_CreateAServerWithByok() string serverName = "mysqltestserver"; MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("southeastasia")) { - Identity = new ManagedServiceIdentity("UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity() -}, - }, Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), - AdministratorLogin = "cloudsa", - AdministratorLoginPassword = "your_password", - Version = MySqlFlexibleServerVersion.Ver5_7, - AvailabilityZone = "1", - CreateMode = MySqlFlexibleServerCreateMode.Default, - DataEncryption = new MySqlFlexibleServerDataEncryption - { - PrimaryUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), - PrimaryKeyUri = new Uri("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - GeoBackupUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), - GeoBackupKeyUri = new Uri("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - EncryptionType = MySqlFlexibleServerDataEncryptionType.AzureKeyVault, - }, - Storage = new MySqlFlexibleServerStorage - { - StorageSizeInGB = 100, - Iops = 600, - AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, - StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, - }, - Backup = new MySqlFlexibleServerBackupProperties - { - BackupRetentionDays = 7, - BackupIntervalHours = 24, - GeoRedundantBackup = MySqlFlexibleServerEnableStatusEnum.Disabled, - }, - HighAvailability = new MySqlFlexibleServerHighAvailability - { - Mode = MySqlFlexibleServerHighAvailabilityMode.ZoneRedundant, - StandbyAvailabilityZone = "3", - }, Tags = { ["num"] = "1" @@ -249,10 +188,10 @@ public async Task CreateOrUpdate_CreateAServerWithByok() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAServerWithNonDefaultDatabasePort() + public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerCreateWithDatabasePort.json - // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerCreateWithPointInTimeRestore.json + // this example is just showing the usage of "Server_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -262,7 +201,7 @@ public async Task CreateOrUpdate_CreateAServerWithNonDefaultDatabasePort() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "testrg"; + string resourceGroupName = "TargetResourceGroup"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -270,34 +209,10 @@ public async Task CreateOrUpdate_CreateAServerWithNonDefaultDatabasePort() MySqlFlexibleServerCollection collection = resourceGroupResource.GetMySqlFlexibleServers(); // invoke the operation - string serverName = "mysqltestserver"; - MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("southeastasia")) + string serverName = "targetserver"; + MySqlFlexibleServerData data = new MySqlFlexibleServerData(new AzureLocation("SoutheastAsia")) { - Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), - AdministratorLogin = "cloudsa", - AdministratorLoginPassword = "your_password", - Version = MySqlFlexibleServerVersion.Ver5_7, - AvailabilityZone = "1", - CreateMode = MySqlFlexibleServerCreateMode.Default, - DatabasePort = 8888, - Storage = new MySqlFlexibleServerStorage - { - StorageSizeInGB = 100, - Iops = 600, - AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, - StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, - }, - Backup = new MySqlFlexibleServerBackupProperties - { - BackupRetentionDays = 7, - BackupIntervalHours = 24, - GeoRedundantBackup = MySqlFlexibleServerEnableStatusEnum.Disabled, - }, - HighAvailability = new MySqlFlexibleServerHighAvailability - { - Mode = MySqlFlexibleServerHighAvailabilityMode.ZoneRedundant, - StandbyAvailabilityZone = "3", - }, + Sku = new MySqlFlexibleServerSku("Standard_D14_v2", MySqlFlexibleServerSkuTier.GeneralPurpose), Tags = { ["num"] = "1" @@ -317,8 +232,8 @@ public async Task CreateOrUpdate_CreateAServerWithNonDefaultDatabasePort() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -350,8 +265,8 @@ public async Task Get_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGetWithVnet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -383,8 +298,8 @@ public async Task Get_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServersInAResourceGroup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServersListByResourceGroup.json - // this example is just showing the usage of "Servers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServersListByResourceGroup.json + // this example is just showing the usage of "Server_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -418,7 +333,7 @@ public async Task GetAll_ListServersInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetReplicas_ListReplicasForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ReplicasListByServer.json + // Generated from example definition: 2024-12-30/ReplicasListByServer.json // this example is just showing the usage of "Replicas_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -454,8 +369,8 @@ public async Task GetReplicas_ListReplicasForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -483,8 +398,8 @@ public async Task Exists_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGetWithVnet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -512,8 +427,8 @@ public async Task Exists_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -553,8 +468,8 @@ public async Task GetIfExists_GetAServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGetWithVnet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs index edcbc83d6661..5bc0c435858d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.MySql.FlexibleServers.Models; using NUnit.Framework; namespace Azure.ResourceManager.MySql.FlexibleServers.Samples @@ -20,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationCreateOrUpdate.json - // this example is just showing the usage of "Configurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationCreateOrUpdate.json + // this example is just showing the usage of "Configuration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,11 +40,7 @@ public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() // invoke the operation string configurationName = "event_scheduler"; - MySqlFlexibleServerConfigurationData data = new MySqlFlexibleServerConfigurationData - { - Value = "off", - Source = MySqlFlexibleServerConfigurationSource.UserOverride, - }; + MySqlFlexibleServerConfigurationData data = new MySqlFlexibleServerConfigurationData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, data); MySqlFlexibleServerConfigurationResource result = lro.Value; @@ -60,8 +55,8 @@ public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json - // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationGet.json + // this example is just showing the usage of "Configuration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -94,8 +89,8 @@ public async Task Get_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllConfigurationsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationsListByServer.json - // this example is just showing the usage of "Configurations_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationsListByServer.json + // this example is just showing the usage of "Configuration_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -132,8 +127,8 @@ public async Task GetAll_ListAllConfigurationsForAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json - // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationGet.json + // this example is just showing the usage of "Configuration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -162,8 +157,8 @@ public async Task Exists_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json - // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationGet.json + // this example is just showing the usage of "Configuration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs index 38743271895f..2e3a8461ab31 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.MySql.FlexibleServers.Models; using NUnit.Framework; namespace Azure.ResourceManager.MySql.FlexibleServers.Samples @@ -20,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationGet.json - // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationGet.json + // this example is just showing the usage of "Configuration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +50,8 @@ public async Task Get_GetAConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAUserConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationUpdate.json - // this example is just showing the usage of "Configurations_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationUpdate.json + // this example is just showing the usage of "Configuration_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -69,11 +68,7 @@ public async Task Update_UpdateAUserConfiguration() MySqlFlexibleServerConfigurationResource mySqlFlexibleServerConfiguration = client.GetMySqlFlexibleServerConfigurationResource(mySqlFlexibleServerConfigurationResourceId); // invoke the operation - MySqlFlexibleServerConfigurationData data = new MySqlFlexibleServerConfigurationData - { - Value = "on", - Source = MySqlFlexibleServerConfigurationSource.UserOverride, - }; + MySqlFlexibleServerConfigurationData data = new MySqlFlexibleServerConfigurationData(); ArmOperation lro = await mySqlFlexibleServerConfiguration.UpdateAsync(WaitUntil.Completed, data); MySqlFlexibleServerConfigurationResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs index 1d4370be8b92..fd6a1372cbeb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseCreate.json - // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseCreate.json + // this example is just showing the usage of "Database_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -40,11 +40,7 @@ public async Task CreateOrUpdate_CreateADatabase() // invoke the operation string databaseName = "db1"; - MySqlFlexibleServerDatabaseData data = new MySqlFlexibleServerDatabaseData - { - Charset = "utf8", - Collation = "utf8_general_ci", - }; + MySqlFlexibleServerDatabaseData data = new MySqlFlexibleServerDatabaseData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data); MySqlFlexibleServerDatabaseResource result = lro.Value; @@ -59,8 +55,8 @@ public async Task CreateOrUpdate_CreateADatabase() [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json - // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseGet.json + // this example is just showing the usage of "Database_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -93,8 +89,8 @@ public async Task Get_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabasesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabasesListByServer.json - // this example is just showing the usage of "Databases_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabasesListByServer.json + // this example is just showing the usage of "Database_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -129,8 +125,8 @@ public async Task GetAll_ListDatabasesInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json - // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseGet.json + // this example is just showing the usage of "Database_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -159,8 +155,8 @@ public async Task Exists_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json - // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseGet.json + // this example is just showing the usage of "Database_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs index 41cf0e086c1d..2d2e0ad16bf8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseGet.json - // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseGet.json + // this example is just showing the usage of "Database_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -50,8 +50,8 @@ public async Task Get_GetADatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseDelete.json - // this example is just showing the usage of "Databases_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseDelete.json + // this example is just showing the usage of "Database_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -77,8 +77,8 @@ public async Task Delete_DeleteADatabase() [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/DatabaseCreate.json - // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/DatabaseCreate.json + // this example is just showing the usage of "Database_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -95,11 +95,7 @@ public async Task Update_CreateADatabase() MySqlFlexibleServerDatabaseResource mySqlFlexibleServerDatabase = client.GetMySqlFlexibleServerDatabaseResource(mySqlFlexibleServerDatabaseResourceId); // invoke the operation - MySqlFlexibleServerDatabaseData data = new MySqlFlexibleServerDatabaseData - { - Charset = "utf8", - Collation = "utf8_general_ci", - }; + MySqlFlexibleServerDatabaseData data = new MySqlFlexibleServerDatabaseData(); ArmOperation lro = await mySqlFlexibleServerDatabase.UpdateAsync(WaitUntil.Completed, data); MySqlFlexibleServerDatabaseResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs index bf8d0c550dc4..6793c79f86a5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleCreate.json - // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleCreate.json + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_CreateAFirewallRule() // invoke the operation string firewallRuleName = "rule1"; - MySqlFlexibleServerFirewallRuleData data = new MySqlFlexibleServerFirewallRuleData(IPAddress.Parse("0.0.0.0"), IPAddress.Parse("255.255.255.255")); + MySqlFlexibleServerFirewallRuleData data = new MySqlFlexibleServerFirewallRuleData(null, null); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, firewallRuleName, data); MySqlFlexibleServerFirewallRuleResource result = lro.Value; @@ -56,8 +56,8 @@ public async Task CreateOrUpdate_CreateAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleGet.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -90,8 +90,8 @@ public async Task Get_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllFirewallRulesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRulesListByServer.json - // this example is just showing the usage of "FirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRulesListByServer.json + // this example is just showing the usage of "FirewallRule_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -126,8 +126,8 @@ public async Task GetAll_ListAllFirewallRulesInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleGet.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -156,8 +156,8 @@ public async Task Exists_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleGet.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs index 1d82c98f782b..9f37d65a6e8e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleGet.json - // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleGet.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleDelete.json - // this example is just showing the usage of "FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleDelete.json + // this example is just showing the usage of "FirewallRule_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/FirewallRuleCreate.json - // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/FirewallRuleCreate.json + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,7 +96,7 @@ public async Task Update_CreateAFirewallRule() MySqlFlexibleServerFirewallRuleResource mySqlFlexibleServerFirewallRule = client.GetMySqlFlexibleServerFirewallRuleResource(mySqlFlexibleServerFirewallRuleResourceId); // invoke the operation - MySqlFlexibleServerFirewallRuleData data = new MySqlFlexibleServerFirewallRuleData(IPAddress.Parse("0.0.0.0"), IPAddress.Parse("255.255.255.255")); + MySqlFlexibleServerFirewallRuleData data = new MySqlFlexibleServerFirewallRuleData(null, null); ArmOperation lro = await mySqlFlexibleServerFirewallRule.UpdateAsync(WaitUntil.Completed, data); MySqlFlexibleServerFirewallRuleResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs index 89a15604f68d..d35b2d980450 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServerMaintenanceCollection [Ignore("Only validating compilation of examples")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json - // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenanceRead.json + // this example is just showing the usage of "Maintenance_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,8 +53,8 @@ public async Task Get_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListMaintenancesOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancesListByServer.json - // this example is just showing the usage of "Maintenances_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenancesListByServer.json + // this example is just showing the usage of "Maintenance_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -89,8 +89,8 @@ public async Task GetAll_ListMaintenancesOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json - // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenanceRead.json + // this example is just showing the usage of "Maintenance_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -119,8 +119,8 @@ public async Task Exists_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json - // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenanceRead.json + // this example is just showing the usage of "Maintenance_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs index b033fa4e7d53..3a8920bef259 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServerMaintenanceResource [Ignore("Only validating compilation of examples")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceRead.json - // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenanceRead.json + // this example is just showing the usage of "Maintenance_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_ReadAMaintenance() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateMaintenanceOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenanceUpdate.json - // this example is just showing the usage of "Maintenances_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenanceUpdate.json + // this example is just showing the usage of "Maintenance_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -69,10 +69,7 @@ public async Task Update_UpdateMaintenanceOnAServer() MySqlFlexibleServerMaintenanceResource mySqlFlexibleServerMaintenance = client.GetMySqlFlexibleServerMaintenanceResource(mySqlFlexibleServerMaintenanceResourceId); // invoke the operation - MySqlFlexibleServerMaintenancePatch patch = new MySqlFlexibleServerMaintenancePatch - { - MaintenanceStartOn = DateTimeOffset.Parse("2024-01-20T00:00:00"), - }; + MySqlFlexibleServerMaintenancePatch patch = new MySqlFlexibleServerMaintenancePatch(); ArmOperation lro = await mySqlFlexibleServerMaintenance.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerMaintenanceResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs index ca75f3cc9528..ebe376bad594 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServerResource.cs @@ -21,8 +21,8 @@ public partial class Sample_MySqlFlexibleServerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerGetWithVnet.json - // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerGetWithVnet.json + // this example is just showing the usage of "Server_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -81,8 +81,8 @@ public async Task Get_GetAServerWithVnet() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerDelete.json - // this example is just showing the usage of "Servers_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerDelete.json + // this example is just showing the usage of "Server_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -105,56 +105,10 @@ public async Task Delete_DeleteAServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateAServer() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdate.json - // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServerResource created on azure - // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource - string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "testrg"; - string serverName = "mysqltestserver"; - ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - - // invoke the operation - MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch - { - Storage = new MySqlFlexibleServerStorage - { - StorageSizeInGB = 30, - Iops = 200, - AutoGrow = MySqlFlexibleServerEnableStatusEnum.Disabled, - AutoIoScaling = MySqlFlexibleServerEnableStatusEnum.Disabled, - StorageRedundancy = MySqlFlexibleServerStorageRedundancyType.LocalRedundancy, - }, - Network = new MySqlFlexibleServerNetwork - { - PublicNetworkAccess = MySqlFlexibleServerEnableStatusEnum.Disabled, - }, - }; - ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); - MySqlFlexibleServerResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServerData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateServerCustomerMaintenanceWindow() + public async Task Update_UpdateServerToOptInVirtualCanary() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json - // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenancePolicyPatchOptInVirtualCanary.json + // this example is just showing the usage of "Server_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -170,17 +124,7 @@ public async Task Update_UpdateServerCustomerMaintenanceWindow() MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch - { - MaintenanceWindow = new MySqlFlexibleServerMaintenanceWindow - { - CustomWindow = "Enabled", - StartHour = 8, - StartMinute = 0, - DayOfWeek = 1, - BatchOfMaintenance = MySqlFlexibleServerBatchOfMaintenance.Batch1, - }, - }; + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch(); ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; @@ -193,10 +137,10 @@ public async Task Update_UpdateServerCustomerMaintenanceWindow() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateServerToOptInVirtualCanary() + public async Task Update_UpdateServerToOptOutVirtualCanary() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancePolicyPatchOptInVirtualCanary.json - // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/MaintenancePolicyPatchOptOutVirtualCanary.json + // this example is just showing the usage of "Server_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -212,10 +156,7 @@ public async Task Update_UpdateServerToOptInVirtualCanary() MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch - { - MaintenancePatchStrategy = MySqlFlexibleServerPatchStrategy.VirtualCanary, - }; + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch(); ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; @@ -228,10 +169,10 @@ public async Task Update_UpdateServerToOptInVirtualCanary() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateServerToOptOutVirtualCanary() + public async Task Update_UpdateAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/MaintenancePolicyPatchOptOutVirtualCanary.json - // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerUpdate.json + // this example is just showing the usage of "Server_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -247,10 +188,7 @@ public async Task Update_UpdateServerToOptOutVirtualCanary() MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch - { - MaintenancePatchStrategy = new MySqlFlexibleServerPatchStrategy("Default"), - }; + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch(); ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; @@ -265,8 +203,8 @@ public async Task Update_UpdateServerToOptOutVirtualCanary() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerUpdateWithBYOK.json - // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerUpdateWithBYOK.json + // this example is just showing the usage of "Server_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -291,14 +229,6 @@ public async Task Update_UpdateServerWithByok() [new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")] = new UserAssignedIdentity() }, }, - DataEncryption = new MySqlFlexibleServerDataEncryption - { - PrimaryUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity"), - PrimaryKeyUri = new Uri("https://test.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - GeoBackupUserAssignedIdentityId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity"), - GeoBackupKeyUri = new Uri("https://test-geo.vault.azure.net/keys/key/c8a92236622244c0a4fdb892666f671a"), - EncryptionType = MySqlFlexibleServerDataEncryptionType.AzureKeyVault, - }, }; ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; @@ -312,10 +242,10 @@ public async Task Update_UpdateServerWithByok() [Test] [Ignore("Only validating compilation of examples")] - public async Task DetachVnet_DetachVNetOnAServer() + public async Task Update_UpdateServerCustomerMaintenanceWindow() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerDetachVNet.json - // this example is just showing the usage of "Servers_DetachVNet" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerUpdateWithCustomerMaintenanceWindow.json + // this example is just showing the usage of "Server_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -325,17 +255,14 @@ public async Task DetachVnet_DetachVNetOnAServer() // this example assumes you already have this MySqlFlexibleServerResource created on azure // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; - string resourceGroupName = "TestGroup"; - string serverName = "testserver"; + string resourceGroupName = "testrg"; + string serverName = "mysqltestserver"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerDetachVnetContent content = new MySqlFlexibleServerDetachVnetContent - { - PublicNetworkAccess = MySqlFlexibleServerEnableStatusEnum.Enabled, - }; - ArmOperation lro = await mySqlFlexibleServer.DetachVnetAsync(WaitUntil.Completed, content); + MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch(); + ArmOperation lro = await mySqlFlexibleServer.UpdateAsync(WaitUntil.Completed, patch); MySqlFlexibleServerResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -349,7 +276,7 @@ public async Task DetachVnet_DetachVNetOnAServer() [Ignore("Only validating compilation of examples")] public async Task Failover_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerFailover.json + // Generated from example definition: 2024-12-30/ServerFailover.json // this example is just showing the usage of "Servers_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -373,10 +300,10 @@ public async Task Failover_RestartAServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task ResetGtid_ResetGTIDOnAServer() + public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimationOfHighAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerResetGtid.json - // this example is just showing the usage of "Servers_ResetGtid" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerValidateEstimateHighAvailability.json + // this example is just showing the usage of "Servers_ValidateEstimateHighAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -392,20 +319,20 @@ public async Task ResetGtid_ResetGTIDOnAServer() MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - MySqlFlexibleServerGtidSetContent content = new MySqlFlexibleServerGtidSetContent + HighAvailabilityValidationEstimation highAvailabilityValidationEstimation = new HighAvailabilityValidationEstimation { - GtidSet = "4aff5b51-97ba-11ed-a955-002248036acc:1-16", + ExpectedStandbyAvailabilityZone = "1", }; - await mySqlFlexibleServer.ResetGtidAsync(WaitUntil.Completed, content); + HighAvailabilityValidationEstimation result = await mySqlFlexibleServer.ValidateEstimateHighAvailabilityAsync(highAvailabilityValidationEstimation); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task Restart_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerRestart.json + // Generated from example definition: 2024-12-30/ServerRestart.json // this example is just showing the usage of "Servers_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -436,7 +363,7 @@ public async Task Restart_RestartAServer() [Ignore("Only validating compilation of examples")] public async Task Start_StartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerStart.json + // Generated from example definition: 2024-12-30/ServerStart.json // this example is just showing the usage of "Servers_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -462,7 +389,7 @@ public async Task Start_StartAServer() [Ignore("Only validating compilation of examples")] public async Task Stop_StopAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerStop.json + // Generated from example definition: 2024-12-30/ServerStop.json // this example is just showing the usage of "Servers_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -486,10 +413,10 @@ public async Task Stop_StopAServer() [Test] [Ignore("Only validating compilation of examples")] - public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimationOfHighAvailability() + public async Task ResetGtid_ResetGTIDOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServerValidateEstimateHighAvailability.json - // this example is just showing the usage of "Servers_ValidateEstimateHighAvailability" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServerResetGtid.json + // this example is just showing the usage of "Servers_ResetGtid" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -505,20 +432,55 @@ public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimat MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); // invoke the operation - HighAvailabilityValidationEstimation highAvailabilityValidationEstimation = new HighAvailabilityValidationEstimation + MySqlFlexibleServerGtidSetContent content = new MySqlFlexibleServerGtidSetContent { - ExpectedStandbyAvailabilityZone = "1", + GtidSet = "4aff5b51-97ba-11ed-a955-002248036acc:1-16", }; - HighAvailabilityValidationEstimation result = await mySqlFlexibleServer.ValidateEstimateHighAvailabilityAsync(highAvailabilityValidationEstimation); + await mySqlFlexibleServer.ResetGtidAsync(WaitUntil.Completed, content); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DetachVnet_DetachVNetOnAServer() + { + // Generated from example definition: 2024-12-30/ServerDetachVNet.json + // this example is just showing the usage of "Servers_DetachVnet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MySqlFlexibleServerResource created on azure + // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource + string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + string resourceGroupName = "TestGroup"; + string serverName = "testserver"; + ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); + + // invoke the operation + MySqlFlexibleServerDetachVnetContent content = new MySqlFlexibleServerDetachVnetContent + { + PublicNetworkAccess = MySqlFlexibleServerEnableStatusEnum.Enabled, + }; + ArmOperation lro = await mySqlFlexibleServer.DetachVnetAsync(WaitUntil.Completed, content); + MySqlFlexibleServerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MySqlFlexibleServerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task CreateBackupAndExport_CreateAndExportBackup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/BackupAndExport.json + // Generated from example definition: 2024-12-30/BackupAndExport.json // this example is just showing the usage of "BackupAndExport_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -546,7 +508,7 @@ public async Task CreateBackupAndExport_CreateAndExportBackup() [Ignore("Only validating compilation of examples")] public async Task ValidateBackup_ValidateBackup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ValidateBackup.json + // Generated from example definition: 2024-12-30/ValidateBackup.json // this example is just showing the usage of "BackupAndExport_ValidateBackup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -570,10 +532,10 @@ public async Task ValidateBackup_ValidateBackup() [Test] [Ignore("Only validating compilation of examples")] - public async Task UpdateConfigurations_ConfigurationList() + public async Task GetLogFiles_ListAllServerLogFilesForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ConfigurationsBatchUpdate.json - // this example is just showing the usage of "Configurations_BatchUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/LogFilesListByServer.json + // this example is just showing the usage of "LogFiles_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -584,35 +546,24 @@ public async Task UpdateConfigurations_ConfigurationList() // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; string resourceGroupName = "testrg"; - string serverName = "mysqltestserver"; + string serverName = "mysqltestsvc1"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - // invoke the operation - MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate = new MySqlFlexibleServerConfigurationListForBatchUpdate + // invoke the operation and iterate over the result + await foreach (MySqlFlexibleServerLogFile item in mySqlFlexibleServer.GetLogFilesAsync()) { - Values = {new MySqlFlexibleServerConfigurationForBatchUpdate -{ -Name = "event_scheduler", -Value = "OFF", -}, new MySqlFlexibleServerConfigurationForBatchUpdate -{ -Name = "div_precision_increment", -Value = "8", -}}, - ResetAllToDefault = MySqlFlexibleServerConfigurationResetAllToDefault.False, - }; - ArmOperation lro = await mySqlFlexibleServer.UpdateConfigurationsAsync(WaitUntil.Completed, mySqlFlexibleServerConfigurationListForBatchUpdate); - MySqlFlexibleServerConfigurations result = lro.Value; + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImport() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CutoverMigration.json + // Generated from example definition: 2024-12-30/CutoverMigration.json // this example is just showing the usage of "ServersMigration_CutoverMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -641,10 +592,10 @@ public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImpor [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLogFiles_ListAllServerLogFilesForAServer() + public async Task UpdateConfigurations_ConfigurationList() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/LogFilesListByServer.json - // this example is just showing the usage of "LogFiles_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ConfigurationsBatchUpdate.json + // this example is just showing the usage of "Configurations_UpdateConfigurations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -655,17 +606,26 @@ public async Task GetLogFiles_ListAllServerLogFilesForAServer() // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff"; string resourceGroupName = "testrg"; - string serverName = "mysqltestsvc1"; + string serverName = "mysqltestserver"; ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - // invoke the operation and iterate over the result - await foreach (MySqlFlexibleServerLogFile item in mySqlFlexibleServer.GetLogFilesAsync()) + // invoke the operation + MySqlFlexibleServerConfigurationListForBatchUpdate mySqlFlexibleServerConfigurationListForBatchUpdate = new MySqlFlexibleServerConfigurationListForBatchUpdate { - Console.WriteLine($"Succeeded: {item}"); - } + Values = {new MySqlFlexibleServerConfigurationForBatchUpdate +{ +Name = "event_scheduler", +}, new MySqlFlexibleServerConfigurationForBatchUpdate +{ +Name = "div_precision_increment", +}}, + ResetAllToDefault = MySqlFlexibleServerConfigurationResetAllToDefault.False, + }; + ArmOperation lro = await mySqlFlexibleServer.UpdateConfigurationsAsync(WaitUntil.Completed, mySqlFlexibleServerConfigurationListForBatchUpdate); + MySqlFlexibleServerConfigurations result = lro.Value; - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs index b38ed4185045..e7d5b61dd827 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_MySqlFlexibleServersCapabilityCollection [Ignore("Only validating compilation of examples")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json - // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitySetByLocation.json + // this example is just showing the usage of "Capability_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -53,8 +53,8 @@ public async Task Get_CapabilityResult() [Ignore("Only validating compilation of examples")] public async Task GetAll_CapabilitySetsResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetListByLocation.json - // this example is just showing the usage of "LocationBasedCapabilitySet_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitySetListByLocation.json + // this example is just showing the usage of "Capability_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -88,8 +88,8 @@ public async Task GetAll_CapabilitySetsResult() [Ignore("Only validating compilation of examples")] public async Task Exists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json - // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitySetByLocation.json + // this example is just showing the usage of "Capability_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -117,8 +117,8 @@ public async Task Exists_CapabilityResult() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json - // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitySetByLocation.json + // this example is just showing the usage of "Capability_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs index fed2ef2ff778..d61d12f5aa85 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs @@ -19,8 +19,8 @@ public partial class Sample_MySqlFlexibleServersCapabilityResource [Ignore("Only validating compilation of examples")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitySetByLocation.json - // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitySetByLocation.json + // this example is just showing the usage of "Capability_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs index fc103cca4052..be7932620e0a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionCollection.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.MySql.FlexibleServers.Models; using NUnit.Framework; namespace Azure.ResourceManager.MySql.FlexibleServers.Samples @@ -20,8 +19,8 @@ public partial class Sample_MySqlFlexibleServersPrivateEndpointConnectionCollect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionUpdate.json - // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionUpdate.json + // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,14 +40,7 @@ public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAG // invoke the operation string privateEndpointConnectionName = "private-endpoint-connection-name"; - MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData - { - ConnectionState = new MySqlFlexibleServersPrivateLinkServiceConnectionState - { - Status = MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.Approved, - Description = "Approved by johndoe@contoso.com", - }, - }; + MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); MySqlFlexibleServersPrivateEndpointConnectionResource result = lro.Value; @@ -63,8 +55,8 @@ public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAG [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -97,8 +89,8 @@ public async Task Get_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionList.json - // this example is just showing the usage of "PrivateEndpointConnections_ListByServer" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionList.json + // this example is just showing the usage of "PrivateEndpointConnection_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -133,8 +125,8 @@ public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -163,8 +155,8 @@ public async Task Exists_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs index 03cb879aca5a..e41bc4a3e6a9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateEndpointConnectionResource.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.MySql.FlexibleServers.Models; using NUnit.Framework; namespace Azure.ResourceManager.MySql.FlexibleServers.Samples @@ -20,8 +19,8 @@ public partial class Sample_MySqlFlexibleServersPrivateEndpointConnectionResourc [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionGet.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionGet.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +50,8 @@ public async Task Get_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionDelete.json - // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionDelete.json + // this example is just showing the usage of "PrivateEndpointConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -78,8 +77,8 @@ public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() [Ignore("Only validating compilation of examples")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateEndpointConnectionUpdate.json - // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/PrivateEndpointConnectionUpdate.json + // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,14 +95,7 @@ public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName MySqlFlexibleServersPrivateEndpointConnectionResource mySqlFlexibleServersPrivateEndpointConnection = client.GetMySqlFlexibleServersPrivateEndpointConnectionResource(mySqlFlexibleServersPrivateEndpointConnectionResourceId); // invoke the operation - MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData - { - ConnectionState = new MySqlFlexibleServersPrivateLinkServiceConnectionState - { - Status = MySqlFlexibleServersPrivateEndpointServiceConnectionStatus.Approved, - Description = "Approved by johndoe@contoso.com", - }, - }; + MySqlFlexibleServersPrivateEndpointConnectionData data = new MySqlFlexibleServersPrivateEndpointConnectionData(); ArmOperation lro = await mySqlFlexibleServersPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); MySqlFlexibleServersPrivateEndpointConnectionResource result = lro.Value; diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs deleted file mode 100644 index 3cecce24f6fa..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResource.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.ResourceManager.MySql.FlexibleServers.Samples -{ - public partial class Sample_MySqlFlexibleServersPrivateLinkResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServersPrivateLinkResource created on azure - // for more information of creating MySqlFlexibleServersPrivateLinkResource, please refer to the document of MySqlFlexibleServersPrivateLinkResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - string groupName = "plr"; - ResourceIdentifier mySqlFlexibleServersPrivateLinkResourceId = MySqlFlexibleServersPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, groupName); - MySqlFlexibleServersPrivateLinkResource mySqlFlexibleServersPrivateLinkResource = client.GetMySqlFlexibleServersPrivateLinkResource(mySqlFlexibleServersPrivateLinkResourceId); - - // invoke the operation - MySqlFlexibleServersPrivateLinkResource result = await mySqlFlexibleServersPrivateLinkResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServersPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs deleted file mode 100644 index 867f1160a933..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_MySqlFlexibleServersPrivateLinkResourceCollection.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.ResourceManager.MySql.FlexibleServers.Samples -{ - public partial class Sample_MySqlFlexibleServersPrivateLinkResourceCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServerResource created on azure - // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - - // get the collection of this MySqlFlexibleServersPrivateLinkResource - MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - MySqlFlexibleServersPrivateLinkResource result = await collection.GetAsync(groupName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServersPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_GetsPrivateLinkResourcesForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesList.json - // this example is just showing the usage of "PrivateLinkResources_ListByServer" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServerResource created on azure - // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - - // get the collection of this MySqlFlexibleServersPrivateLinkResource - MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); - - // invoke the operation and iterate over the result - await foreach (MySqlFlexibleServersPrivateLinkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServersPrivateLinkResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServerResource created on azure - // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - - // get the collection of this MySqlFlexibleServersPrivateLinkResource - MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - bool result = await collection.ExistsAsync(groupName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlFlexibleServerResource created on azure - // for more information of creating MySqlFlexibleServerResource, please refer to the document of MySqlFlexibleServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlFlexibleServerResourceId = MySqlFlexibleServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlFlexibleServerResource mySqlFlexibleServer = client.GetMySqlFlexibleServerResource(mySqlFlexibleServerResourceId); - - // get the collection of this MySqlFlexibleServersPrivateLinkResource - MySqlFlexibleServersPrivateLinkResourceCollection collection = mySqlFlexibleServer.GetMySqlFlexibleServersPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - NullableResponse response = await collection.GetIfExistsAsync(groupName); - MySqlFlexibleServersPrivateLinkResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServersPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index b9f607b4677a..ba03732f69e0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckNameAvailability() + public async Task GetMySqlFlexibleServers_ListServersInASubscription() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckNameAvailabilityWithoutLocation.json - // this example is just showing the usage of "CheckNameAvailabilityWithoutLocation_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/ServersList.json + // this example is just showing the usage of "Server_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -35,22 +35,25 @@ public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckN ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation - MySqlFlexibleServerNameAvailabilityContent content = new MySqlFlexibleServerNameAvailabilityContent("name1") + // invoke the operation and iterate over the result + await foreach (MySqlFlexibleServerResource item in subscriptionResource.GetMySqlFlexibleServersAsync()) { - ResourceType = new ResourceType("Microsoft.DBforMySQL/flexibleServers"), - }; - MySqlFlexibleServerNameAvailabilityResult result = await subscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content); + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MySqlFlexibleServerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetMySqlFlexibleServers_ListServersInASubscription() + public async Task GetLocationBasedCapabilities_CapabilitiesList() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/ServersList.json - // this example is just showing the usage of "Servers_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CapabilitiesByLocationList.json + // this example is just showing the usage of "LocationBasedCapabilities_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -64,13 +67,10 @@ public async Task GetMySqlFlexibleServers_ListServersInASubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (MySqlFlexibleServerResource item in subscriptionResource.GetMySqlFlexibleServersAsync()) + AzureLocation locationName = new AzureLocation("WestUS"); + await foreach (MySqlFlexibleServerCapabilityProperties item in subscriptionResource.GetLocationBasedCapabilitiesAsync(locationName)) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlFlexibleServerData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {item}"); } Console.WriteLine("Succeeded"); @@ -78,10 +78,10 @@ public async Task GetMySqlFlexibleServers_ListServersInASubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLocationBasedCapabilities_CapabilitiesList() + public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubnetUsage() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CapabilitiesByLocationList.json - // this example is just showing the usage of "LocationBasedCapabilities_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CheckVirtualNetworkSubnetUsage.json + // this example is just showing the usage of "CheckVirtualNetworkSubnetUsage_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -94,22 +94,23 @@ public async Task GetLocationBasedCapabilities_CapabilitiesList() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result + // invoke the operation AzureLocation locationName = new AzureLocation("WestUS"); - await foreach (MySqlFlexibleServerCapabilityProperties item in subscriptionResource.GetLocationBasedCapabilitiesAsync(locationName)) + MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter = new MySqlFlexibleServerVirtualNetworkSubnetUsageParameter { - Console.WriteLine($"Succeeded: {item}"); - } + VirtualNetworkResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), + }; + MySqlFlexibleServerVirtualNetworkSubnetUsageResult result = await subscriptionResource.ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckNameAvailability.json - // this example is just showing the usage of "CheckNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CheckNameAvailability.json + // this example is just showing the usage of "CheckNameAvailability_CheckMySqlFlexibleServerNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -135,10 +136,10 @@ public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability [Test] [Ignore("Only validating compilation of examples")] - public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubnetUsage() + public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json - // this example is just showing the usage of "CheckVirtualNetworkSubnetUsage_Execute" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-30/CheckNameAvailabilityWithoutLocation.json + // this example is just showing the usage of "CheckNameAvailabilityWithoutLocation_CheckMySqlFlexibleServerNameAvailabilityWithoutLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -152,12 +153,11 @@ public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubne SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - AzureLocation locationName = new AzureLocation("WestUS"); - MySqlFlexibleServerVirtualNetworkSubnetUsageParameter mySqlFlexibleServerVirtualNetworkSubnetUsageParameter = new MySqlFlexibleServerVirtualNetworkSubnetUsageParameter + MySqlFlexibleServerNameAvailabilityContent content = new MySqlFlexibleServerNameAvailabilityContent("name1") { - VirtualNetworkResourceId = new ResourceIdentifier("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), + ResourceType = new ResourceType("Microsoft.DBforMySQL/flexibleServers"), }; - MySqlFlexibleServerVirtualNetworkSubnetUsageResult result = await subscriptionResource.ExecuteCheckVirtualNetworkSubnetUsageAsync(locationName, mySqlFlexibleServerVirtualNetworkSubnetUsageParameter); + MySqlFlexibleServerNameAvailabilityResult result = await subscriptionResource.CheckMySqlFlexibleServerNameAvailabilityWithoutLocationAsync(content); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs index 8107ccad616c..03ebac33eca5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_TenantResourceExtensions [Ignore("Only validating compilation of examples")] public async Task ExecuteGetPrivateDnsZoneSuffix_GetPrivateDnsZoneSuffix() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-12-01-preview/examples/GetPrivateDnsZoneSuffix.json + // Generated from example definition: 2024-12-30/GetPrivateDnsZoneSuffix.json // this example is just showing the usage of "GetPrivateDnsZoneSuffix_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResource.cs deleted file mode 100644 index 3075f2210bc9..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResource.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.ResourceManager.MySql.Samples -{ - public partial class Sample_MySqlPrivateLinkResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2018-06-01/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlPrivateLinkResource created on azure - // for more information of creating MySqlPrivateLinkResource, please refer to the document of MySqlPrivateLinkResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - string groupName = "plr"; - ResourceIdentifier mySqlPrivateLinkResourceId = MySqlPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, groupName); - MySqlPrivateLinkResource mySqlPrivateLinkResource = client.GetMySqlPrivateLinkResource(mySqlPrivateLinkResourceId); - - // invoke the operation - MySqlPrivateLinkResource result = await mySqlPrivateLinkResource.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResourceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResourceCollection.cs deleted file mode 100644 index 930bbf49ed08..000000000000 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/MySqlSamples/Sample_MySqlPrivateLinkResourceCollection.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.ResourceManager.MySql.Samples -{ - public partial class Sample_MySqlPrivateLinkResourceCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2018-06-01/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlServerResource created on azure - // for more information of creating MySqlServerResource, please refer to the document of MySqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlServerResourceId = MySqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlServerResource mySqlServer = client.GetMySqlServerResource(mySqlServerResourceId); - - // get the collection of this MySqlPrivateLinkResource - MySqlPrivateLinkResourceCollection collection = mySqlServer.GetMySqlPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - MySqlPrivateLinkResource result = await collection.GetAsync(groupName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_GetsPrivateLinkResourcesForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2018-06-01/examples/PrivateLinkResourcesList.json - // this example is just showing the usage of "PrivateLinkResources_ListByServer" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlServerResource created on azure - // for more information of creating MySqlServerResource, please refer to the document of MySqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlServerResourceId = MySqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlServerResource mySqlServer = client.GetMySqlServerResource(mySqlServerResourceId); - - // get the collection of this MySqlPrivateLinkResource - MySqlPrivateLinkResourceCollection collection = mySqlServer.GetMySqlPrivateLinkResources(); - - // invoke the operation and iterate over the result - await foreach (MySqlPrivateLinkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlPrivateLinkResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2018-06-01/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlServerResource created on azure - // for more information of creating MySqlServerResource, please refer to the document of MySqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlServerResourceId = MySqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlServerResource mySqlServer = client.GetMySqlServerResource(mySqlServerResourceId); - - // get the collection of this MySqlPrivateLinkResource - MySqlPrivateLinkResourceCollection collection = mySqlServer.GetMySqlPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - bool result = await collection.ExistsAsync(groupName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetsAPrivateLinkResourceForMySQL() - { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2018-06-01/examples/PrivateLinkResourcesGet.json - // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MySqlServerResource created on azure - // for more information of creating MySqlServerResource, please refer to the document of MySqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "test-svr"; - ResourceIdentifier mySqlServerResourceId = MySqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - MySqlServerResource mySqlServer = client.GetMySqlServerResource(mySqlServerResourceId); - - // get the collection of this MySqlPrivateLinkResource - MySqlPrivateLinkResourceCollection collection = mySqlServer.GetMySqlPrivateLinkResources(); - - // invoke the operation - string groupName = "plr"; - NullableResponse response = await collection.GetIfExistsAsync(groupName); - MySqlPrivateLinkResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MySqlPrivateLinkResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tests/Scenario/MySqlFlexibleServerTests.cs b/sdk/mysql/Azure.ResourceManager.MySql/tests/Scenario/MySqlFlexibleServerTests.cs index 6467f6158fb2..cd595214bf16 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/tests/Scenario/MySqlFlexibleServerTests.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/tests/Scenario/MySqlFlexibleServerTests.cs @@ -63,7 +63,7 @@ public async Task CreateGetList() public async Task CreateUpdateGetDelete() { // Create - ResourceGroupResource rg = await CreateResourceGroupAsync(Subscription, "mysqlflexrg", AzureLocation.EastUS); + ResourceGroupResource rg = await CreateResourceGroupAsync(Subscription, "mysqlflexrg", AzureLocation.EastAsia); MySqlFlexibleServerCollection serverCollection = rg.GetMySqlFlexibleServers(); string serverName = Recording.GenerateAssetName("mysqlflexserver"); var data = new MySqlFlexibleServerData(rg.Data.Location) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/tsp-location.yaml b/sdk/mysql/Azure.ResourceManager.MySql/tsp-location.yaml new file mode 100644 index 000000000000..e5f3780d127a --- /dev/null +++ b/sdk/mysql/Azure.ResourceManager.MySql/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers +commit: fe80a99a8d7b83987ffc0d66361d1760cfcb1a2b +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs index b4c4576f9c7b..d968802f8fc9 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs @@ -8,6 +8,7 @@ #pragma warning disable AOAI001 #pragma warning disable AZC0112 +#pragma warning disable SCME0001 namespace Azure.AI.OpenAI.Chat; @@ -42,15 +43,27 @@ protected AzureChatClient() /// public override Task> CompleteChatAsync(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default) { + bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8); PostfixSwapMaxTokens(ref options); - return base.CompleteChatAsync(messages, options, cancellationToken); + Task> result = base.CompleteChatAsync(messages, options, cancellationToken); + if (maxTokenMasked) + { + AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8); + } + return result; } /// public override ClientResult CompleteChat(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default) { + bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8); PostfixSwapMaxTokens(ref options); - return base.CompleteChat(messages, options, cancellationToken); + ClientResult result = base.CompleteChat(messages, options, cancellationToken); + if (maxTokenMasked) + { + AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8); + } + return result; } /// @@ -65,16 +78,28 @@ public override CollectionResult CompleteChatStre public override AsyncCollectionResult CompleteChatStreamingAsync(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default) { PostfixClearStreamOptions(messages, ref options); + bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8); PostfixSwapMaxTokens(ref options); - return base.CompleteChatStreamingAsync(messages, options, cancellationToken); + AsyncCollectionResult < StreamingChatCompletionUpdate > result = base.CompleteChatStreamingAsync(messages, options, cancellationToken); + if (maxTokenMasked) + { + AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8); + } + return result; } /// public override CollectionResult CompleteChatStreaming(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default) { PostfixClearStreamOptions(messages, ref options); + bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8); PostfixSwapMaxTokens(ref options); - return base.CompleteChatStreaming(messages, options, cancellationToken); + CollectionResult < StreamingChatCompletionUpdate > result = base.CompleteChatStreaming(messages, options, cancellationToken); + if (maxTokenMasked) + { + AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8); + } + return result; } /** @@ -86,19 +111,19 @@ public override CollectionResult CompleteChatStre */ private static void PostfixClearStreamOptions(IEnumerable messages, ref ChatCompletionOptions options) { - if (AdditionalPropertyHelpers - .GetAdditionalPropertyAsListOfChatDataSource(options?.SerializedAdditionalRawData, "data_sources")?.Count > 0 + if (options?.GetDataSources()?.Count > 0 || messages?.Any( message => message?.Content?.Any( contentPart => contentPart?.Kind == ChatMessageContentPartKind.Image) == true) == true) { options ??= new(); - options.SerializedAdditionalRawData ??= new Dictionary(); - AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "stream_options"); + options.Patch.Remove("$.stream_options"u8); } } + private static bool HasValue(JsonPatch patch, ReadOnlySpan path) => patch.Contains(path) && !patch.IsRemoved(path); + /** * As of 2024-09-01-preview, Azure OpenAI conditionally supports the use of the new max_completion_tokens property: * - The o1-mini and o1-preview models accept max_completion_tokens and reject max_tokens @@ -113,52 +138,30 @@ private static void PostfixClearStreamOptions(IEnumerable messages, private static void PostfixSwapMaxTokens(ref ChatCompletionOptions options) { options ??= new(); - bool valueIsSet = options.MaxOutputTokenCount is not null; - bool oldPropertyBlocked = AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens"); + bool oldPropertyBlocked = AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8); - if (valueIsSet) + if (options.MaxOutputTokenCount.HasValue) { if (!oldPropertyBlocked) { - options.SerializedAdditionalRawData ??= new ChangeTrackingDictionary(); - AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "max_completion_tokens"); - - using MemoryStream stream = new(); - using Utf8JsonWriter writer = new(stream); - - if (options.MaxOutputTokenCount != null) - { - writer.WriteNumberValue(options.MaxOutputTokenCount.Value); - } - else - { - writer.WriteNullValue(); - } - - writer.Flush(); - - options.SerializedAdditionalRawData["max_tokens"] = BinaryData.FromBytes(stream.ToArray()); + options.Patch.Remove("$.max_completion_tokens"u8); + options.Patch.Set("$.max_tokens"u8, options.MaxOutputTokenCount.Value); } else { - // Allow standard serialization to the new property to occur; remove overrides - if (options.SerializedAdditionalRawData.ContainsKey("max_completion_tokens")) - { - options.SerializedAdditionalRawData.Remove("max_completion_tokens"); - } + options.Patch.Remove("$.max_tokens"u8); + options.Patch.Set("$.max_completion_tokens"u8, options.MaxOutputTokenCount.Value); } } else { - if (!AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens") - && options.SerializedAdditionalRawData?.ContainsKey("max_tokens") == true) + if (HasValue(options.Patch, "$.max_tokens"u8)) { - options.SerializedAdditionalRawData.Remove("max_tokens"); + options.Patch.Remove("$.max_tokens"u8); } - if (!AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_completion_tokens") - && options.SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") == true) + if (HasValue(options.Patch, "$.max_completion_tokens"u8)) { - options.SerializedAdditionalRawData.Remove("max_completion_tokens"); + options.Patch.Remove("$.max_completion_tokens"u8); } } } diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs index 5218994e901e..9956da431718 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs @@ -1,8 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.AI.OpenAI.Internal; +using System.ClientModel; +using System.ClientModel.Primitives; using System.Diagnostics.CodeAnalysis; +using System.Text; +using System.Text.Json; +using System.Text.Json.Nodes; +using Azure.AI.OpenAI.Internal; #pragma warning disable AZC0112 @@ -14,26 +19,40 @@ public static partial class AzureChatExtensions [Experimental("AOAI001")] public static void AddDataSource(this ChatCompletionOptions options, ChatDataSource dataSource) { - options.SerializedAdditionalRawData ??= new Dictionary(); - - IList existingSources = - AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfChatDataSource( - options.SerializedAdditionalRawData, - "data_sources") - ?? new ChangeTrackingList(); - existingSources.Add(dataSource); - AdditionalPropertyHelpers.SetAdditionalProperty( - options.SerializedAdditionalRawData, - "data_sources", - existingSources); + JsonArray doc; + if (options.Patch.Contains("$.data_sources"u8) && options.Patch.TryGetJson("$.data_sources"u8, out ReadOnlyMemory jsonBytes)) + { + using var stream = new MemoryStream(); + stream.Write(jsonBytes.ToArray(), 0, jsonBytes.Length); + string json = Encoding.UTF8.GetString(stream.ToArray()); + doc = JsonObject.Parse(json).AsArray(); + } + else + { + doc = new(); + } + using var objectStream = new MemoryStream(); + using BinaryContent contentBytes = BinaryContent.Create(dataSource, ModelSerializationExtensions.WireOptions); + contentBytes.WriteTo(objectStream); + string newJson = Encoding.UTF8.GetString(objectStream.ToArray()); + doc.Add(JsonObject.Parse(newJson)); + options.Patch.Set("$.data_sources"u8, BinaryData.FromString(doc.ToJsonString())); } [Experimental("AOAI001")] public static IReadOnlyList GetDataSources(this ChatCompletionOptions options) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfChatDataSource( - options.SerializedAdditionalRawData, - "data_sources") as IReadOnlyList; + if (options.Patch.Contains("$.data_sources"u8) && options.Patch.TryGetJson("$.data_sources"u8, out ReadOnlyMemory mem)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + List chats = []; + foreach (JsonElement dataSource in doc.RootElement.EnumerateArray()) + { + chats.Add(ChatDataSource.DeserializeChatDataSource(dataSource, ModelSerializationExtensions.WireOptions)); + } + return chats; + } + return null; } [Experimental("AOAI001")] @@ -42,16 +61,13 @@ public static void SetNewMaxCompletionTokensPropertyEnabled(this ChatCompletionO if (newPropertyEnabled) { // Blocking serialization of max_tokens via dictionary acts as a signal to skip pre-serialization fixup - options.SerializedAdditionalRawData ??= new Dictionary(); - AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens"); + AdditionalPropertyHelpers.SetEmptySentinelValue(patch: ref options.Patch, path: "$.max_tokens"u8); } else { - // In the absence of a dictionary serialization block to max_tokens, the newer property name will - // automatically be blocked and the older property name will be used via dictionary override - if (options?.SerializedAdditionalRawData?.ContainsKey("max_tokens") == true) + if (options.Patch.Contains("$.max_tokens"u8) && !options.Patch.IsRemoved("$.max_tokens"u8)) { - options?.SerializedAdditionalRawData?.Remove("max_tokens"); + options.Patch.Remove("$.max_tokens"u8); } } } @@ -59,35 +75,45 @@ public static void SetNewMaxCompletionTokensPropertyEnabled(this ChatCompletionO [Experimental("AOAI001")] public static RequestContentFilterResult GetRequestContentFilterResult(this ChatCompletion chatCompletion) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfRequestContentFilterResult( - chatCompletion.SerializedAdditionalRawData, - "prompt_filter_results")?[0]; + if (chatCompletion.Patch.Contains("$.prompt_filter_results"u8) && chatCompletion.Patch.TryGetJson("$.prompt_filter_results"u8, out ReadOnlyMemory mem)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return RequestContentFilterResult.DeserializeRequestContentFilterResult(doc.RootElement.EnumerateArray().First(), ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static ResponseContentFilterResult GetResponseContentFilterResult(this ChatCompletion chatCompletion) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsResponseContentFilterResult( - chatCompletion.Choices?[0]?.SerializedAdditionalRawData, - "content_filter_results"); + if ((chatCompletion.Choices?[0]?.Patch.Contains("$.content_filter_results"u8) ?? false) && + (chatCompletion.Choices?[0]?.Patch.TryGetJson("$.content_filter_results"u8, out ReadOnlyMemory mem) ?? false)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return ResponseContentFilterResult.DeserializeResponseContentFilterResult(doc.RootElement, ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static ChatMessageContext GetMessageContext(this ChatCompletion chatCompletion) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsChatMessageContext( - chatCompletion.Choices?[0]?.Message?.SerializedAdditionalRawData, - "context"); + if ((chatCompletion.Choices?[0]?.Message?.Patch.Contains("$.context"u8) ?? false) && + (chatCompletion.Choices?[0]?.Message?.Patch.TryGetJson("$.context"u8, out ReadOnlyMemory mem) ?? false)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return ChatMessageContext.DeserializeChatMessageContext(doc.RootElement, ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static ChatMessageContext GetMessageContext(this StreamingChatCompletionUpdate chatUpdate) { - if (chatUpdate.Choices?.Count > 0) + if (chatUpdate.Choices?.Count > 0 && chatUpdate.Choices[0].Delta.Patch.Contains("$.context"u8) && chatUpdate.Choices[0].Delta.Patch.TryGetJson("$.context"u8, out ReadOnlyMemory mem)) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsChatMessageContext( - chatUpdate.Choices[0].Delta?.SerializedAdditionalRawData, - "context"); + using JsonDocument doc = JsonDocument.Parse(mem); + return ChatMessageContext.DeserializeChatMessageContext(doc.RootElement, ModelSerializationExtensions.WireOptions); } return null; } @@ -95,46 +121,54 @@ public static ChatMessageContext GetMessageContext(this StreamingChatCompletionU [Experimental("AOAI001")] public static RequestContentFilterResult GetRequestContentFilterResult(this StreamingChatCompletionUpdate chatUpdate) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfRequestContentFilterResult( - chatUpdate.SerializedAdditionalRawData, - "prompt_filter_results")?[0]; + if (chatUpdate.Patch.Contains("$.prompt_filter_results"u8) && chatUpdate.Patch.TryGetJson("$.prompt_filter_results"u8, out ReadOnlyMemory mem)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return RequestContentFilterResult.DeserializeRequestContentFilterResult(doc.RootElement.EnumerateArray().First(), ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static ResponseContentFilterResult GetResponseContentFilterResult(this StreamingChatCompletionUpdate chatUpdate) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsResponseContentFilterResult( - chatUpdate?.Choices?.ElementAtOrDefault(0)?.SerializedAdditionalRawData, - "content_filter_results"); + if ((chatUpdate?.Choices?.ElementAtOrDefault(0)?.Patch.Contains("$.content_filter_results"u8) ?? false) && (chatUpdate?.Choices?.ElementAtOrDefault(0)?.Patch.TryGetJson("$.content_filter_results"u8, out ReadOnlyMemory mem) ?? false)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return ResponseContentFilterResult.DeserializeResponseContentFilterResult(doc.RootElement, ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static void SetUserSecurityContext(this ChatCompletionOptions options, UserSecurityContext userSecurityContext) { - options.SerializedAdditionalRawData ??= new Dictionary(); - - AdditionalPropertyHelpers.SetAdditionalProperty( - options.SerializedAdditionalRawData, - "user_security_context", - userSecurityContext); + using BinaryContent contentBytes = BinaryContent.Create(userSecurityContext, ModelSerializationExtensions.WireOptions); + using var stream = new MemoryStream(); + contentBytes.WriteTo(stream); + BinaryData bin = new(stream.ToArray()); + options.Patch.Set("$.user_security_context"u8, bin); } [Experimental("AOAI001")] public static UserSecurityContext GetUserSecurityContext(this ChatCompletionOptions options) { - return AdditionalPropertyHelpers.GetAdditionalPropertyAsUserSecurityContext( - options.SerializedAdditionalRawData, - "user_security_context"); + if (options.Patch.Contains("$.user_security_context"u8) && options.Patch.TryGetJson("$.user_security_context"u8, out ReadOnlyMemory mem)) + { + using JsonDocument doc = JsonDocument.Parse(mem); + return UserSecurityContext.DeserializeUserSecurityContext(doc.RootElement, ModelSerializationExtensions.WireOptions); + } + return null; } [Experimental("AOAI001")] public static string GetMessageReasoningContent(this ChatCompletion chatCompletion) { - if (chatCompletion?.Choices?.FirstOrDefault()?.Message?.SerializedAdditionalRawData?.TryGetValue("reasoning_content", out BinaryData reasoningContentData) == true - && reasoningContentData?.ToString() is string retrievedReasoningContent) + if ((chatCompletion?.Choices?.FirstOrDefault()?.Message?.Patch.Contains("$.reasoning_content"u8) ?? false) && + (chatCompletion?.Choices?.FirstOrDefault()?.Message?.Patch.TryGetValue("$.reasoning_content"u8, out string retrievedReasoningContent) ?? false)) { return retrievedReasoningContent; } return null; } -} \ No newline at end of file +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs index b724d26f2a84..19a1cce2a20d 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs @@ -1,13 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.AI.OpenAI.Chat; +using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.AI.OpenAI.Chat; namespace Azure.AI.OpenAI.Internal; #pragma warning disable AOAI001 +#pragma warning disable SCME0001 + internal static class AdditionalPropertyHelpers { private static string SARD_EMPTY_SENTINEL = "__EMPTY__"; @@ -101,6 +104,20 @@ internal static void SetEmptySentinelValue(IDictionary addit additionalProperties[key] = BinaryData.FromBytes(stream.ToArray()); } + internal static void SetEmptySentinelValue(ref JsonPatch patch, ReadOnlySpan path) + { + patch.Set(path, SARD_EMPTY_SENTINEL); + } + + internal static bool GetIsEmptySentinelValue(JsonPatch patch, ReadOnlySpan path) + { + if (patch.Contains(path) && patch.TryGetValue(path, out string val)) + { + return string.Equals(val, SARD_EMPTY_SENTINEL); + } + return false; + } + internal static bool GetIsEmptySentinelValue(IDictionary additionalProperties, string key) { return additionalProperties is not null @@ -108,4 +125,4 @@ internal static bool GetIsEmptySentinelValue(IDictionary add && StringComparer.OrdinalIgnoreCase.Equals(existingValue.ToString(), $@"""{SARD_EMPTY_SENTINEL}"""); } } -#pragma warning restore AOAI001 \ No newline at end of file +#pragma warning restore AOAI001 diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs new file mode 100644 index 000000000000..ffa8ba0e1213 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Diagnostics; +using System.Text.Json; + +#nullable enable + +namespace Azure.AI.OpenAI.VectorStores; + +internal class VectorStoreCollectionPageToken : ContinuationToken +{ + protected VectorStoreCollectionPageToken(int? limit, string? order, string? after, string? before) + { + Limit = limit; + Order = order; + After = after; + Before = before; + } + + public int? Limit { get; } + + public string? Order { get; } + + public string? After { get; } + + public string? Before { get; } + + public override BinaryData ToBytes() + { + using MemoryStream stream = new(); + using Utf8JsonWriter writer = new(stream); + + writer.WriteStartObject(); + + if (Limit.HasValue) + { + writer.WriteNumber("limit", Limit.Value); + } + + if (Order is not null) + { + writer.WriteString("order", Order); + } + + if (After is not null) + { + writer.WriteString("after", After); + } + + if (Before is not null) + { + writer.WriteString("before", Before); + } + + writer.WriteEndObject(); + + writer.Flush(); + stream.Position = 0; + + return BinaryData.FromStream(stream); + } + + public static VectorStoreCollectionPageToken FromToken(ContinuationToken pageToken) + { + if (pageToken is VectorStoreCollectionPageToken token) + { + return token; + } + + BinaryData data = pageToken.ToBytes(); + + if (data.ToMemory().Length == 0) + { + throw new ArgumentException("Failed to create VectorStoresPageToken from provided pageToken.", nameof(pageToken)); + } + + Utf8JsonReader reader = new(data); + + int? limit = null; + string? order = null; + string? after = null; + string? before = null; + + reader.Read(); + + Debug.Assert(reader.TokenType == JsonTokenType.StartObject); + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + break; + } + + Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); + + string propertyName = reader.GetString()!; + + switch (propertyName) + { + case "limit": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.Number); + limit = reader.GetInt32(); + break; + case "order": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + order = reader.GetString(); + break; + case "after": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + after = reader.GetString(); + break; + case "before": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + before = reader.GetString(); + break; + default: + throw new JsonException($"Unrecognized property '{propertyName}'."); + } + } + + return new(limit, order, after, before); + } + + public static VectorStoreCollectionPageToken FromOptions(int? limit, string? order, string? after, string? before) + => new(limit, order, after, before); + + public static VectorStoreCollectionPageToken? FromResponse(ClientResult result, int? limit, string? order, string? before) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument doc = JsonDocument.Parse(response.Content); + string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; + bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean(); + + if (!hasMore || lastId is null) + { + return null; + } + + return new(limit, order, lastId, before); + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs new file mode 100644 index 000000000000..9b99510954e0 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +#nullable enable + +namespace Azure.AI.OpenAI.VectorStores; + +internal class VectorStoreCollectionResult : CollectionResult +{ + private readonly VectorStoreClient _vectorStoreClient; + private readonly ClientPipeline _pipeline; + private readonly RequestOptions? _options; + + // Initial values + private readonly int? _limit; + private readonly string? _order; + private readonly string? _after; + private readonly string? _before; + + public VectorStoreCollectionResult(VectorStoreClient vectorStoreClient, + ClientPipeline pipeline, RequestOptions? options, + int? limit, string? order, string? after, string? before) + { + _vectorStoreClient = vectorStoreClient; + _pipeline = pipeline; + _options = options; + + _limit = limit; + _order = order; + _after = after; + _before = before; + } + + public override IEnumerable GetRawPages() + { + ClientResult page = GetFirstPage(); + yield return page; + + while (HasNextPage(page)) + { + page = GetNextPage(page); + yield return page; + } + } + + protected override IEnumerable GetValuesFromPage(ClientResult page) + { + Argument.AssertNotNull(page, nameof(page)); + + PipelineResponse response = page.GetRawResponse(); + InternalListVectorStoresResponse list = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, OpenAIContext.Default)!; + return list.Data; + } + + public override ContinuationToken? GetContinuationToken(ClientResult page) + { + Argument.AssertNotNull(page, nameof(page)); + + return VectorStoreCollectionPageToken.FromResponse(page, _limit, _order, _before); + } + + public ClientResult GetFirstPage() + => GetVectorStores(_limit, _order, _after, _before, _options); + + public ClientResult GetNextPage(ClientResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + PipelineResponse response = result.GetRawResponse(); + + using JsonDocument doc = JsonDocument.Parse(response.Content); + string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; + + return GetVectorStores(_limit, _order, lastId, _before, _options); + } + + public static bool HasNextPage(ClientResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + PipelineResponse response = result.GetRawResponse(); + + using JsonDocument doc = JsonDocument.Parse(response.Content); + bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean(); + + return hasMore; + } + + internal virtual ClientResult GetVectorStores(int? limit, string? order, string? after, string? before, RequestOptions? options) + { + using PipelineMessage message = _vectorStoreClient.CreateGetVectorStoresRequest(limit, order, after, before, options); + return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options)); + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs new file mode 100644 index 000000000000..8a92c1a135b5 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Diagnostics; +using System.Text.Json; + +#nullable enable + +namespace Azure.AI.OpenAI.VectorStores; + +internal class VectorStoreFileCollectionPageToken : ContinuationToken +{ + protected VectorStoreFileCollectionPageToken(string vectorStoreId, int? limit, string? order, string? after, string? before, string? filter) + { + VectorStoreId = vectorStoreId; + + Limit = limit; + Order = order; + After = after; + Before = before; + Filter = filter; + } + + public string VectorStoreId { get; } + + public int? Limit { get; } + + public string? Order { get; } + + public string? After { get; } + + public string? Before { get; } + + public string? Filter { get; } + + public override BinaryData ToBytes() + { + using MemoryStream stream = new(); + using Utf8JsonWriter writer = new(stream); + + writer.WriteStartObject(); + writer.WriteString("vectorStoreId", VectorStoreId); + + if (Limit.HasValue) + { + writer.WriteNumber("limit", Limit.Value); + } + + if (Order is not null) + { + writer.WriteString("order", Order); + } + + if (After is not null) + { + writer.WriteString("after", After); + } + + if (Before is not null) + { + writer.WriteString("before", Before); + } + + if (Filter is not null) + { + writer.WriteString("filter", Filter); + } + + writer.WriteEndObject(); + + writer.Flush(); + stream.Position = 0; + + return BinaryData.FromStream(stream); + } + + public static VectorStoreFileCollectionPageToken FromToken(ContinuationToken pageToken) + { + if (pageToken is VectorStoreFileCollectionPageToken token) + { + return token; + } + + BinaryData data = pageToken.ToBytes(); + + if (data.ToMemory().Length == 0) + { + throw new ArgumentException("Failed to create VectorStoreFilesPageToken from provided pageToken.", nameof(pageToken)); + } + + Utf8JsonReader reader = new(data); + + string vectorStoreId = null!; + int? limit = null; + string? order = null; + string? after = null; + string? before = null; + string? filter = null; + + reader.Read(); + + Debug.Assert(reader.TokenType == JsonTokenType.StartObject); + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + break; + } + + Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); + + string propertyName = reader.GetString()!; + + switch (propertyName) + { + case "vectorStoreId": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + vectorStoreId = reader.GetString()!; + break; + case "limit": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.Number); + limit = reader.GetInt32(); + break; + case "order": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + order = reader.GetString(); + break; + case "after": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + after = reader.GetString(); + break; + case "before": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + before = reader.GetString(); + break; + case "filter": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + filter = reader.GetString(); + break; + default: + throw new JsonException($"Unrecognized property '{propertyName}'."); + } + } + + if (vectorStoreId is null) + { + throw new ArgumentException("Failed to create VectorStoreFilesPageToken from provided pageToken.", nameof(pageToken)); + } + + return new(vectorStoreId, limit, order, after, before, filter); + } + + public static VectorStoreFileCollectionPageToken FromOptions(string vectorStoreId, int? limit, string? order, string? after, string? before, string? filter) + => new(vectorStoreId, limit, order, after, before, filter); + + public static VectorStoreFileCollectionPageToken? FromResponse(ClientResult result, string vectorStoreId, int? limit, string? order, string? before, string? filter) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument doc = JsonDocument.Parse(response.Content); + string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!; + bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean(); + + if (!hasMore || lastId is null) + { + return null; + } + + return new(vectorStoreId, limit, order, lastId, before, filter); + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs index 2dbab7685fb1..6a81525d4393 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs @@ -41,7 +41,7 @@ internal override PipelineMessage CreateGetResponseRequest(string responseId, IE .WithOptions(options) .Build(); - internal override PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options) => new AzureOpenAIPipelineMessageBuilder(Pipeline, _aoaiEndpoint, _apiVersion, string.Empty) .WithPath("responses", responseId, "input_items") .WithMethod("GET") @@ -74,4 +74,4 @@ private static string GetIncludeQueryStringValue(IEnumerable } } -#endif \ No newline at end of file +#endif diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs index a881aef45ce6..bdee746839af 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs @@ -5,7 +5,6 @@ using System.ClientModel; using System.ClientModel.Primitives; -using System.Threading; using Azure.AI.OpenAI.Utility; namespace Azure.AI.OpenAI.VectorStores; diff --git a/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs b/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs index 721f46e23aa2..ac509b627d5d 100644 --- a/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs +++ b/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs @@ -20,7 +20,8 @@ using OpenAI.TestFramework.Utils; namespace Azure.AI.OpenAI.Tests; - +#pragma warning disable AOAI001 +#pragma warning disable SCME0001 public partial class ChatTests : AoaiTestBase { public ChatTests(bool isAsync) : base(isAsync) @@ -168,10 +169,18 @@ bool GetSerializedOptionsContains(string value) BinaryData serialized = ModelReaderWriter.Write(options); return serialized.ToString().Contains(value); } - async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMaxCompletionTokens) + async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMaxCompletionTokens, bool isSentilel=false) { _ = await client.CompleteChatAsync(["Just mocking, no call here"], options); - Assert.That(GetSerializedOptionsContains("max_tokens"), Is.EqualTo(hasOldMaxTokens)); + if (isSentilel) + { + Assert.True(GetSerializedOptionsContains("max_tokens")); + Assert.True(GetSerializedOptionsContains("__EMPTY__")); + } + else + { + Assert.That(GetSerializedOptionsContains("max_tokens"), Is.EqualTo(hasOldMaxTokens)); + } Assert.That(GetSerializedOptionsContains("max_completion_tokens"), Is.EqualTo(hasNewMaxCompletionTokens)); } @@ -187,12 +196,12 @@ async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMax await AssertExpectedSerializationAsync(true, false); options.SetNewMaxCompletionTokensPropertyEnabled(); - await AssertExpectedSerializationAsync(false, true); - await AssertExpectedSerializationAsync(false, true); + await AssertExpectedSerializationAsync(false, true, true); + await AssertExpectedSerializationAsync(false, true, true); options.MaxOutputTokenCount = null; - await AssertExpectedSerializationAsync(false, false); + await AssertExpectedSerializationAsync(false, false, true); options.MaxOutputTokenCount = 42; - await AssertExpectedSerializationAsync(false, true); + await AssertExpectedSerializationAsync(false, true, true); options.SetNewMaxCompletionTokensPropertyEnabled(false); await AssertExpectedSerializationAsync(true, false); @@ -560,7 +569,6 @@ public async Task MaxOutputTokensWorksAcrossModels(string testConfigName, bool u { options.SetNewMaxCompletionTokensPropertyEnabled(); } - ChatCompletion completion = await client.CompleteChatAsync( ["Hello, world! Please write a funny haiku to greet me."], options); @@ -568,15 +576,16 @@ public async Task MaxOutputTokensWorksAcrossModels(string testConfigName, bool u string serializedOptionsAfterUse = ModelReaderWriter.Write(options).ToString(); + Assert.That(serializedOptionsAfterUse, Does.Contain("max_tokens")); if (useNewProperty) { Assert.That(serializedOptionsAfterUse, Does.Contain("max_completion_tokens")); - Assert.That(serializedOptionsAfterUse, Does.Not.Contain("max_tokens")); + Assert.That(serializedOptionsAfterUse, Does.Contain("__EMPTY__")); } else { Assert.That(serializedOptionsAfterUse, Does.Not.Contain("max_completion_tokens")); - Assert.That(serializedOptionsAfterUse, Does.Contain("max_tokens")); + Assert.That(serializedOptionsAfterUse, Does.Not.Contain("__EMPTY__")); } } #endregion diff --git a/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs b/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs index dd63f92235e9..b516defed193 100644 --- a/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs +++ b/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs @@ -83,10 +83,12 @@ public async Task FileSearch(string deploymentName) Assert.That(citationAnnotation?.FileId, Is.EqualTo(testFile.Id)); Assert.That(citationAnnotation?.Index, Is.GreaterThan(0)); - await foreach (ResponseItem inputItem in client.GetResponseInputItemsAsync(response?.Id)) - { - Console.WriteLine(ModelReaderWriter.Write(inputItem).ToString()); - } + // The AzureOpenAI endpoint does not serve the path for + // https://{Azure OpenAI endpoint}/responses/{response.Id}/input_items + //await foreach (ResponseItem inputItem in client.GetResponseInputItemsAsync(response?.Id)) + //{ + // Console.WriteLine(ModelReaderWriter.Write(inputItem).ToString()); + //} } [RecordedTest] @@ -516,32 +518,33 @@ public async Task AllInstructionMethodsWork(ResponsesTestInstructionMethod instr { Assert.That(retrievedResponse?.Instructions, Is.EqualTo(instructions)); } - - List listedItems = []; - await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response?.Id)) - { - listedItems.Add(item); - } - - if (instructionMethod == ResponsesTestInstructionMethod.InstructionsProperty) - { - Assert.That(listedItems, Has.Count.EqualTo(1)); - Assert.That((listedItems[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage)); - } - else - { - Assert.That(listedItems, Has.Count.EqualTo(2)); - MessageResponseItem? systemOrDeveloperMessage = listedItems?[1] as MessageResponseItem; - Assert.That(systemOrDeveloperMessage, Is.Not.Null); - Assert.That(systemOrDeveloperMessage?.Role, Is.EqualTo(instructionMethod switch - { - ResponsesTestInstructionMethod.DeveloperMessage => MessageRole.Developer, - ResponsesTestInstructionMethod.SystemMessage => MessageRole.System, - _ => throw new ArgumentException() - })); - Assert.That(systemOrDeveloperMessage?.Content?.FirstOrDefault()?.Text, Is.EqualTo(instructions)); - Assert.That((listedItems?[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage)); - } + // The AzureOpenAI endpoint does not serve the path for + // https://{Azure OpenAI endpoint}/responses/{response.Id}/input_items + //List listedItems = []; + //await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response?.Id)) + //{ + // listedItems.Add(item); + //} + + //if (instructionMethod == ResponsesTestInstructionMethod.InstructionsProperty) + //{ + // Assert.That(listedItems, Has.Count.EqualTo(1)); + // Assert.That((listedItems[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage)); + //} + //else + //{ + // Assert.That(listedItems, Has.Count.EqualTo(2)); + // MessageResponseItem? systemOrDeveloperMessage = listedItems?[1] as MessageResponseItem; + // Assert.That(systemOrDeveloperMessage, Is.Not.Null); + // Assert.That(systemOrDeveloperMessage?.Role, Is.EqualTo(instructionMethod switch + // { + // ResponsesTestInstructionMethod.DeveloperMessage => MessageRole.Developer, + // ResponsesTestInstructionMethod.SystemMessage => MessageRole.System, + // _ => throw new ArgumentException() + // })); + // Assert.That(systemOrDeveloperMessage?.Content?.FirstOrDefault()?.Text, Is.EqualTo(instructions)); + // Assert.That((listedItems?[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage)); + //} } [RecordedTest] @@ -783,7 +786,7 @@ public void ItemSerialization() } AssertSerializationRoundTrip( - @"{""type"":""message"",""potato_details"":{""cultivar"":""russet""},""role"":""potato""}", + @"{""type"":""message"",""role"":""potato"",""potato_details"":{""cultivar"":""russet""}}", potatoMessage => { Assert.That(potatoMessage.Role, Is.EqualTo(MessageRole.Unknown)); diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs b/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs index 6a31103f41bf..304b5fc54a6d 100644 --- a/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs +++ b/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs @@ -53,7 +53,15 @@ public class AoaiTestBase : RecordedClientTestBase where TClient : clas public AzureTestEnvironment TestEnvironment { get; } - protected AoaiTestBase(bool isAsync) : this(isAsync, null, null) + private static RecordedTestMode? GetRecordedTestMode() => Environment.GetEnvironmentVariable("AZURE_TEST_MODE") switch + { + "Playback" => RecordedTestMode.Playback, + "Live" => RecordedTestMode.Live, + "Record" => RecordedTestMode.Record, + _ => null + }; + + protected AoaiTestBase(bool isAsync) : this(isAsync: isAsync, mode: GetRecordedTestMode(), automaticRecord: null) { } protected AoaiTestBase(bool isAsync, RecordedTestMode? mode = null, bool? automaticRecord = null) diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/ArmPineconeVectorDBModelFactory.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/ArmPineconeVectorDBModelFactory.cs index 9e803cb85cb0..0d34045c189e 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/ArmPineconeVectorDBModelFactory.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/ArmPineconeVectorDBModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.PineconeVectorDB; diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Extensions/MockablePineconeVectorDBResourceGroupResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Extensions/MockablePineconeVectorDBResourceGroupResource.cs index 59f2416e638c..9a11e5d148ab 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Extensions/MockablePineconeVectorDBResourceGroupResource.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Extensions/MockablePineconeVectorDBResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual PineconeVectorDBOrganizationCollection GetPineconeVectorDBOrganiz return GetCachedClient(client => new PineconeVectorDBOrganizationCollection(client, Id)); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-10-22-preview. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetPin return await GetPineconeVectorDBOrganizations().GetAsync(organizationname, cancellationToken).ConfigureAwait(false); } - /// Get a OrganizationResource. + /// + /// Get a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Get. + /// + /// + /// Default Api Version. + /// 2024-10-22-preview. + /// + /// + /// /// Name of the Organization resource. /// The cancellation token to use. /// is null. diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/AzureResourceManagerPineconeVectorDBContext.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/AzureResourceManagerPineconeVectorDBContext.cs index 129b8f99095e..cff2f0dbace5 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/AzureResourceManagerPineconeVectorDBContext.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/AzureResourceManagerPineconeVectorDBContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.PineconeVectorDB.Models; @@ -26,6 +27,7 @@ namespace Azure.ResourceManager.PineconeVectorDB [ModelReaderWriterBuildable(typeof(PineconeVectorDBPartnerProperties))] [ModelReaderWriterBuildable(typeof(PineconeVectorDBSingleSignOnPropertiesV2))] [ModelReaderWriterBuildable(typeof(PineconeVectorDBUserDetails))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerPineconeVectorDBContext : ModelReaderWriterContext diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/PineconeVectorDBOrganizationPatch.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/PineconeVectorDBOrganizationPatch.Serialization.cs index 9cca91294969..e96b1d2feb5d 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/PineconeVectorDBOrganizationPatch.Serialization.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/Models/PineconeVectorDBOrganizationPatch.Serialization.cs @@ -183,15 +183,15 @@ protected virtual PineconeVectorDBOrganizationPatch PersistableModelCreateCore(B /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(PineconeVectorDBOrganizationPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(PineconeVectorDBOrganizationPatch pineconeVectorDBOrganizationPatch) { - if (patch == null) + if (pineconeVectorDBOrganizationPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(pineconeVectorDBOrganizationPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationCollection.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationCollection.cs index 14db192e748b..fd39929fe55f 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationCollection.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> Cr /// /// /// Operation Id. - /// CreateOrUpdate. + /// Organizations_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string organizationname, C /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string organizationname, CancellationToken /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.cs index eadf232107af..0bd1c7f02ab4 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// Organizations_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationTo } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-10-22-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> Update } } - /// Update a OrganizationResource. + /// + /// Update a OrganizationResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Pinecone.VectorDb/organizations/{organizationname}. + /// + /// + /// Operation Id. + /// Organizations_Update. + /// + /// + /// Default Api Version. + /// 2024-10-22-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(PineconeVec /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Organizations_Delete. /// /// /// Default Api Version. diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs index 8b69806809f6..78f25695dfda 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/ArmPlanetaryComputerModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.PlanetaryComputer; diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs index 92afb165bbe5..77bcbe3944c7 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Extensions/MockablePlanetaryComputerResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual PlanetaryComputerGeoCatalogCollection GetPlanetaryComputerGeoCata return GetCachedClient(client => new PlanetaryComputerGeoCatalogCollection(client, Id)); } - /// Get a GeoCatalog. + /// + /// Get a GeoCatalog + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName}. + /// + /// + /// Operation Id. + /// GeoCatalogs_Get. + /// + /// + /// Default Api Version. + /// 2025-02-11-preview. + /// + /// + /// /// The name of the catalog. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetPlan return await GetPlanetaryComputerGeoCatalogs().GetAsync(catalogName, cancellationToken).ConfigureAwait(false); } - /// Get a GeoCatalog. + /// + /// Get a GeoCatalog + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName}. + /// + /// + /// Operation Id. + /// GeoCatalogs_Get. + /// + /// + /// Default Api Version. + /// 2025-02-11-preview. + /// + /// + /// /// The name of the catalog. /// The cancellation token to use. /// is null. diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs index 82f7577cc9be..2fb68b1e704b 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/AzureResourceManagerPlanetaryComputerContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.PlanetaryComputer.Models; @@ -21,6 +22,7 @@ namespace Azure.ResourceManager.PlanetaryComputer [ModelReaderWriterBuildable(typeof(PlanetaryComputerGeoCatalogPatch))] [ModelReaderWriterBuildable(typeof(PlanetaryComputerGeoCatalogProperties))] [ModelReaderWriterBuildable(typeof(PlanetaryComputerGeoCatalogResource))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerPlanetaryComputerContext : ModelReaderWriterContext diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/PlanetaryComputerGeoCatalogPatch.Serialization.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/PlanetaryComputerGeoCatalogPatch.Serialization.cs index 9396356bcbfe..a72608e1cfeb 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/PlanetaryComputerGeoCatalogPatch.Serialization.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/Models/PlanetaryComputerGeoCatalogPatch.Serialization.cs @@ -183,15 +183,15 @@ protected virtual PlanetaryComputerGeoCatalogPatch PersistableModelCreateCore(Bi /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(PlanetaryComputerGeoCatalogPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(PlanetaryComputerGeoCatalogPatch planetaryComputerGeoCatalogPatch) { - if (patch == null) + if (planetaryComputerGeoCatalogPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(planetaryComputerGeoCatalogPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogCollection.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogCollection.cs index 2f8a809d0407..833bebb9004d 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogCollection.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// GeoCatalogs_Create. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> Cre /// /// /// Operation Id. - /// Create. + /// GeoCatalogs_Create. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsyn /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string catalogName, Cancel /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string catalogName, CancellationToken cance /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. diff --git a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogResource.cs b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogResource.cs index 79c4df3219f7..ed9160017da5 100644 --- a/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogResource.cs +++ b/sdk/planetarycomputer/Azure.ResourceManager.PlanetaryComputer/src/Generated/PlanetaryComputerGeoCatalogResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsyn /// /// /// Operation Id. - /// Get. + /// GeoCatalogs_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationTok } } - /// Update a GeoCatalog. + /// + /// Update a GeoCatalog + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName}. + /// + /// + /// Operation Id. + /// GeoCatalogs_Update. + /// + /// + /// Default Api Version. + /// 2025-02-11-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> Upd } } - /// Update a GeoCatalog. + /// + /// Update a GeoCatalog + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/geoCatalogs/{catalogName}. + /// + /// + /// Operation Id. + /// GeoCatalogs_Update. + /// + /// + /// Default Api Version. + /// 2025-02-11-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Operation Id. - /// Delete. + /// GeoCatalogs_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// GeoCatalogs_Delete. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/ArmPlaywrightModelFactory.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/ArmPlaywrightModelFactory.cs index a8fd639fc0d7..e2bdb3e3bb31 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/ArmPlaywrightModelFactory.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/ArmPlaywrightModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Playwright; diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightResourceGroupResource.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightResourceGroupResource.cs index 3a9dadcead64..2f24ccb99982 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightResourceGroupResource.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual PlaywrightWorkspaceCollection GetPlaywrightWorkspaces() return GetCachedClient(client => new PlaywrightWorkspaceCollection(client, Id)); } - /// Get a PlaywrightWorkspace. + /// + /// Get a PlaywrightWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/playwrightWorkspaces/{playwrightWorkspaceName}. + /// + /// + /// Operation Id. + /// PlaywrightWorkspaces_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The name of the PlaywrightWorkspace. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetPlaywrightWo return await GetPlaywrightWorkspaces().GetAsync(playwrightWorkspaceName, cancellationToken).ConfigureAwait(false); } - /// Get a PlaywrightWorkspace. + /// + /// Get a PlaywrightWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/playwrightWorkspaces/{playwrightWorkspaceName}. + /// + /// + /// Operation Id. + /// PlaywrightWorkspaces_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The name of the PlaywrightWorkspace. /// The cancellation token to use. /// is null. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightSubscriptionResource.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightSubscriptionResource.cs index 4b9cb692cf1d..a03f6327b978 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightSubscriptionResource.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Extensions/MockablePlaywrightSubscriptionResource.cs @@ -48,7 +48,23 @@ public virtual PlaywrightQuotaCollection GetAllPlaywrightQuota(AzureLocation loc return GetCachedClient(client => new PlaywrightQuotaCollection(client, Id, location)); } - /// Gets a subscription-level location-based Playwright quota resource by name. + /// + /// Gets a subscription-level location-based Playwright quota resource by name. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The location for the resource. /// The name of the PlaywrightQuota. /// The cancellation token to use. @@ -58,7 +74,23 @@ public virtual async Task> GetPlaywrightQuotaA return await GetAllPlaywrightQuota(location).GetAsync(playwrightQuotaName, cancellationToken).ConfigureAwait(false); } - /// Gets a subscription-level location-based Playwright quota resource by name. + /// + /// Gets a subscription-level location-based Playwright quota resource by name. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.LoadTestService/locations/{location}/playwrightQuotas/{playwrightQuotaName}. + /// + /// + /// Operation Id. + /// PlaywrightQuotas_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The location for the resource. /// The name of the PlaywrightQuota. /// The cancellation token to use. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/AzureResourceManagerPlaywrightContext.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/AzureResourceManagerPlaywrightContext.cs index fc832934da8f..5e7c4ddcc4f0 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/AzureResourceManagerPlaywrightContext.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/AzureResourceManagerPlaywrightContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.Playwright.Models; @@ -33,6 +34,7 @@ namespace Azure.ResourceManager.Playwright [ModelReaderWriterBuildable(typeof(PlaywrightWorkspaceQuotaResource))] [ModelReaderWriterBuildable(typeof(PlaywrightWorkspaceResource))] [ModelReaderWriterBuildable(typeof(PlaywrightWorkspaceUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] public partial class AzureResourceManagerPlaywrightContext : ModelReaderWriterContext { diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/PlaywrightWorkspacePatch.Serialization.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/PlaywrightWorkspacePatch.Serialization.cs index 88083a6f7969..9db45ee15eac 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/PlaywrightWorkspacePatch.Serialization.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/Models/PlaywrightWorkspacePatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual PlaywrightWorkspacePatch PersistableModelCreateCore(BinaryData /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(PlaywrightWorkspacePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(PlaywrightWorkspacePatch playwrightWorkspacePatch) { - if (patch == null) + if (playwrightWorkspacePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(playwrightWorkspacePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaCollection.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaCollection.cs index ebdabb2f4573..ed5cc9fde9c7 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaCollection.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -114,7 +114,7 @@ public virtual async Task> GetAsync(Playwright /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -183,7 +183,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -236,7 +236,7 @@ public virtual async Task> ExistsAsync(PlaywrightQuotaName playwr /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -289,7 +289,7 @@ public virtual Response Exists(PlaywrightQuotaName playwrightQuotaName, Ca /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -346,7 +346,7 @@ public virtual async Task> GetIfExists /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaResource.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaResource.cs index a3d1f392a94b..832dc7e336c8 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaResource.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightQuotaResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. @@ -149,7 +149,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Operation Id. - /// Get. + /// PlaywrightQuotas_Get. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceCollection.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceCollection.cs index e170c46c71e5..470f213dbc42 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceCollection.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// PlaywrightWorkspaces_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpd /// /// /// Operation Id. - /// CreateOrUpdate. + /// PlaywrightWorkspaces_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string playwrightWorkspace /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string playwrightWorkspaceName, Cancellatio /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIfEx /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaCollection.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaCollection.cs index f56ddd02e77e..92c8c66929f1 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaCollection.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(P /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -178,7 +178,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -231,7 +231,7 @@ public virtual async Task> ExistsAsync(PlaywrightQuotaName quotaN /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -284,7 +284,7 @@ public virtual Response Exists(PlaywrightQuotaName quotaName, Cancellation /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -341,7 +341,7 @@ public virtual async Task> Ge /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaResource.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaResource.cs index 8dcf758c04dc..ba6925996fb7 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaResource.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceQuotaResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. @@ -149,7 +149,7 @@ public virtual async Task> GetAsync(C /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaceQuotas_Get. /// /// /// Default Api Version. diff --git a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceResource.cs b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceResource.cs index 15fc482d53f1..bc6a1df14a61 100644 --- a/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceResource.cs +++ b/sdk/playwright/Azure.ResourceManager.Playwright/src/Generated/PlaywrightWorkspaceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Operation Id. - /// Get. + /// PlaywrightWorkspaces_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cance } } - /// Updates a Playwright workspace resource synchronously. + /// + /// Updates a Playwright workspace resource synchronously. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/playwrightWorkspaces/{playwrightWorkspaceName}. + /// + /// + /// Operation Id. + /// PlaywrightWorkspaces_Update. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsync(Pla } } - /// Updates a Playwright workspace resource synchronously. + /// + /// Updates a Playwright workspace resource synchronously. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/playwrightWorkspaces/{playwrightWorkspaceName}. + /// + /// + /// Operation Id. + /// PlaywrightWorkspaces_Update. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(PlaywrightWorkspaceP /// /// /// Operation Id. - /// Delete. + /// PlaywrightWorkspaces_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// PlaywrightWorkspaces_Delete. /// /// /// Default Api Version. diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/ArmPortalServicesCopilotModelFactory.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/ArmPortalServicesCopilotModelFactory.cs index 6b3b83b984b5..38e6f24941aa 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/ArmPortalServicesCopilotModelFactory.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/ArmPortalServicesCopilotModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.PortalServicesCopilot; diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Extensions/MockablePortalServicesCopilotTenantResource.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Extensions/MockablePortalServicesCopilotTenantResource.cs index a26f827c44bc..62feec30ac65 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Extensions/MockablePortalServicesCopilotTenantResource.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Extensions/MockablePortalServicesCopilotTenantResource.cs @@ -27,7 +27,27 @@ internal MockablePortalServicesCopilotTenantResource(ArmClient client, ResourceI { } - /// Gets an object representing a along with the instance operations that can be performed on it in the . + /// + /// Get a CopilotSettingsResource + /// + /// + /// Request Path. + /// /providers/Microsoft.PortalServices/copilotSettings/default. + /// + /// + /// Operation Id. + /// CopilotSettings_Get. + /// + /// + /// Default Api Version. + /// 2024-04-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// Returns a object. public virtual PortalServicesCopilotSettingResource GetPortalServicesCopilotSetting() { diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/AzureResourceManagerPortalServicesCopilotContext.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/AzureResourceManagerPortalServicesCopilotContext.cs index 33e75d9db4de..fbd587e9258f 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/AzureResourceManagerPortalServicesCopilotContext.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/AzureResourceManagerPortalServicesCopilotContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.PortalServicesCopilot.Models; @@ -20,6 +21,7 @@ namespace Azure.ResourceManager.PortalServicesCopilot [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingPatch))] [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingResource))] [ModelReaderWriterBuildable(typeof(PortalServicesCopilotSettingsProperties))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] public partial class AzureResourceManagerPortalServicesCopilotContext : ModelReaderWriterContext { diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/PortalServicesCopilotSettingPatch.Serialization.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/PortalServicesCopilotSettingPatch.Serialization.cs index 9f7cfd39e40d..0c8045f6c077 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/PortalServicesCopilotSettingPatch.Serialization.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/Models/PortalServicesCopilotSettingPatch.Serialization.cs @@ -143,15 +143,15 @@ protected virtual PortalServicesCopilotSettingPatch PersistableModelCreateCore(B /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(PortalServicesCopilotSettingPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(PortalServicesCopilotSettingPatch portalServicesCopilotSettingPatch) { - if (patch == null) + if (portalServicesCopilotSettingPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(portalServicesCopilotSettingPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.cs index 9ec1df5e6252..e679b212df16 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.cs @@ -98,7 +98,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// CopilotSettings_Get. /// /// /// Default Api Version. @@ -146,7 +146,7 @@ public virtual async Task> GetAsy /// /// /// Operation Id. - /// Get. + /// CopilotSettings_Get. /// /// /// Default Api Version. @@ -194,7 +194,7 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id. - /// CreateOrUpdate. + /// CopilotSettings_CreateOrUpdate. /// /// /// Default Api Version. @@ -250,7 +250,7 @@ public virtual async Task> Cr /// /// /// Operation Id. - /// CreateOrUpdate. + /// CopilotSettings_CreateOrUpdate. /// /// /// Default Api Version. @@ -297,7 +297,27 @@ public virtual ArmOperation CreateOrUpdate } } - /// Update a CopilotSettingsResource. + /// + /// Update a CopilotSettingsResource + /// + /// + /// Request Path. + /// /providers/Microsoft.PortalServices/copilotSettings/default. + /// + /// + /// Operation Id. + /// CopilotSettings_Update. + /// + /// + /// Default Api Version. + /// 2024-04-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -329,7 +349,27 @@ public virtual async Task> Update } } - /// Update a CopilotSettingsResource. + /// + /// Update a CopilotSettingsResource + /// + /// + /// Request Path. + /// /providers/Microsoft.PortalServices/copilotSettings/default. + /// + /// + /// Operation Id. + /// CopilotSettings_Update. + /// + /// + /// Default Api Version. + /// 2024-04-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -370,7 +410,7 @@ public virtual Response Update(PortalServi /// /// /// Operation Id. - /// Delete. + /// CopilotSettings_Delete. /// /// /// Default Api Version. @@ -421,7 +461,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// CopilotSettings_Delete. /// /// /// Default Api Version. diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj index e9ba6fbf183b..df435c4f0bf8 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Azure.Provisioning.AppContainers.csproj b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Azure.Provisioning.AppContainers.csproj index 6b8e28c09bb8..488a988fb43e 100644 --- a/sdk/provisioning/Azure.Provisioning.AppContainers/src/Azure.Provisioning.AppContainers.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppContainers/src/Azure.Provisioning.AppContainers.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj index 82bacb624fe6..e2b7c9cc67c6 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj @@ -10,7 +10,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj index 038d5c597f1b..36e792cd5d22 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj index a24d2ab8660a..bfd3fa4ab7e1 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj @@ -10,7 +10,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Communication/src/Azure.Provisioning.Communication.csproj b/sdk/provisioning/Azure.Provisioning.Communication/src/Azure.Provisioning.Communication.csproj index 35450031be0b..cf20f7a84f89 100644 --- a/sdk/provisioning/Azure.Provisioning.Communication/src/Azure.Provisioning.Communication.csproj +++ b/sdk/provisioning/Azure.Provisioning.Communication/src/Azure.Provisioning.Communication.csproj @@ -8,7 +8,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Azure.Provisioning.ContainerRegistry.csproj b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Azure.Provisioning.ContainerRegistry.csproj index f2dad5a39bfc..894179e3b3d3 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Azure.Provisioning.ContainerRegistry.csproj +++ b/sdk/provisioning/Azure.Provisioning.ContainerRegistry/src/Azure.Provisioning.ContainerRegistry.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj index a610a9b33797..52b058d8914e 100644 --- a/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj +++ b/sdk/provisioning/Azure.Provisioning.ContainerService/src/Azure.Provisioning.ContainerService.csproj @@ -8,7 +8,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj index 2b9a1a774701..6dced32867c8 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj @@ -10,7 +10,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Azure.Provisioning.EventGrid.csproj b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Azure.Provisioning.EventGrid.csproj index 481327566d68..3c0a64dc8c21 100644 --- a/sdk/provisioning/Azure.Provisioning.EventGrid/src/Azure.Provisioning.EventGrid.csproj +++ b/sdk/provisioning/Azure.Provisioning.EventGrid/src/Azure.Provisioning.EventGrid.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Azure.Provisioning.EventHubs.csproj b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Azure.Provisioning.EventHubs.csproj index 1be51d9e7449..d092f44e703e 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/src/Azure.Provisioning.EventHubs.csproj +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/src/Azure.Provisioning.EventHubs.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Azure.Provisioning.KeyVault.csproj b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Azure.Provisioning.KeyVault.csproj index d6e695433ff3..399e33eadc4f 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/src/Azure.Provisioning.KeyVault.csproj +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/src/Azure.Provisioning.KeyVault.csproj @@ -10,7 +10,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Azure.Provisioning.Kubernetes.csproj b/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Azure.Provisioning.Kubernetes.csproj index 5cba5e33be2f..8c658c57d57c 100644 --- a/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Azure.Provisioning.Kubernetes.csproj +++ b/sdk/provisioning/Azure.Provisioning.Kubernetes/src/Azure.Provisioning.Kubernetes.csproj @@ -8,7 +8,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj index 5693418df2f4..5556e24be0a8 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj @@ -8,7 +8,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Kusto/src/Azure.Provisioning.Kusto.csproj b/sdk/provisioning/Azure.Provisioning.Kusto/src/Azure.Provisioning.Kusto.csproj index 1afc87507e19..0317b7d1b3e0 100644 --- a/sdk/provisioning/Azure.Provisioning.Kusto/src/Azure.Provisioning.Kusto.csproj +++ b/sdk/provisioning/Azure.Provisioning.Kusto/src/Azure.Provisioning.Kusto.csproj @@ -8,9 +8,7 @@ CS1591 - true - diff --git a/sdk/provisioning/Azure.Provisioning.Network/src/Azure.Provisioning.Network.csproj b/sdk/provisioning/Azure.Provisioning.Network/src/Azure.Provisioning.Network.csproj index ed6f823af843..8ba59bca2374 100644 --- a/sdk/provisioning/Azure.Provisioning.Network/src/Azure.Provisioning.Network.csproj +++ b/sdk/provisioning/Azure.Provisioning.Network/src/Azure.Provisioning.Network.csproj @@ -8,7 +8,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj index 6131775ff0ff..5f84e153fde7 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj index 0dbfba877ecf..2a3987ccd2cd 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj @@ -10,9 +10,7 @@ CS1591 - true - diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj b/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj index 05c14d8d94ac..5fa4acd74457 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.RedisEnterprise/src/Azure.Provisioning.RedisEnterprise.csproj b/sdk/provisioning/Azure.Provisioning.RedisEnterprise/src/Azure.Provisioning.RedisEnterprise.csproj index ea3968b5de3f..26ca9f22d852 100644 --- a/sdk/provisioning/Azure.Provisioning.RedisEnterprise/src/Azure.Provisioning.RedisEnterprise.csproj +++ b/sdk/provisioning/Azure.Provisioning.RedisEnterprise/src/Azure.Provisioning.RedisEnterprise.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj b/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj index 6cb253362854..4007aea534cf 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Azure.Provisioning.ServiceBus.csproj b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Azure.Provisioning.ServiceBus.csproj index 1d3b4e96e99d..c66e647fe3a5 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Azure.Provisioning.ServiceBus.csproj +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/src/Azure.Provisioning.ServiceBus.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/src/Azure.Provisioning.SignalR.csproj b/sdk/provisioning/Azure.Provisioning.SignalR/src/Azure.Provisioning.SignalR.csproj index 04801e9420b5..45f7506f0805 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/src/Azure.Provisioning.SignalR.csproj +++ b/sdk/provisioning/Azure.Provisioning.SignalR/src/Azure.Provisioning.SignalR.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj b/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj index 925d156e03f8..87710a481def 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj index f28c0f3c9adf..21ea02dc90d5 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj @@ -10,7 +10,6 @@ $(NoWarn);CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj index 5d41e6cc9888..83912586cfb1 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj @@ -10,7 +10,6 @@ CS1591 - true diff --git a/sdk/provisioning/Azure.Provisioning/src/Azure.Provisioning.csproj b/sdk/provisioning/Azure.Provisioning/src/Azure.Provisioning.csproj index 59a8cf0277a0..a8d9cc790942 100644 --- a/sdk/provisioning/Azure.Provisioning/src/Azure.Provisioning.csproj +++ b/sdk/provisioning/Azure.Provisioning/src/Azure.Provisioning.csproj @@ -13,6 +13,5 @@ CS1591;AZC0012;IDE0130;$(NoWarn) - true diff --git a/sdk/provisioning/cspell.yaml b/sdk/provisioning/cspell.yaml index 9e5b6b551308..9004db87769a 100644 --- a/sdk/provisioning/cspell.yaml +++ b/sdk/provisioning/cspell.yaml @@ -1,7 +1,29 @@ import: - ../../.vscode/cspell.json overrides: - - filename: '**/sdk/provisioning/**/*.cs' + - filename: '**/sdk/provisioning/Azure.Provisioning.Kusto/**/*.cs' + words: + - apacheavro + - openai + - scsv + - sohsv + - tbps + - tsve + - filename: '**/sdk/provisioning/Azure.Provisioning.PostgreSql/**/*.cs' words: - awsec - postgre + - filename: '**/sdk/provisioning/Azure.Provisioning.Sql/**/*.cs' + words: + - freemium + - filename: '**/sdk/provisioning/Azure.Provisioning.Storage/**/*.cs' + words: + - mibps + - filename: '**/sdk/provisioning/Azure.Provisioning.Network/**/*.cs' + words: + - dscp + - fqdns + - ipam + - snat + - vnets + - vxlan \ No newline at end of file diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/CHANGELOG.md b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/CHANGELOG.md index 0380e35dc80c..ddadbe896667 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/CHANGELOG.md +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/CHANGELOG.md @@ -1,14 +1,13 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0 (2025-11-10) ### Features Added +- Updated api-version to `2025-07-01`. ### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added a new required property: PublicNetworkAccess for Cluster. +- Updated the default value of AccessKeysAuthentication property for Database to 'Disabled'. ## 1.2.1 (2025-07-25) diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.net8.0.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.net8.0.cs index 20dbdb66d525..5690dd52532c 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.net8.0.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.net8.0.cs @@ -83,6 +83,7 @@ public RedisEnterpriseClusterData(Azure.Core.AzureLocation location, Azure.Resou public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string RedisVersion { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? RedundancyMode { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? ResourceState { get { throw null; } } @@ -116,6 +117,8 @@ protected RedisEnterpriseClusterResource() { } public virtual Azure.Response GetRedisEnterprisePrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetRedisEnterprisePrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionCollection GetRedisEnterprisePrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetSkusForScaling(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSkusForScalingAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -178,8 +181,8 @@ protected RedisEnterpriseDatabaseResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Export(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ExportRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ExportRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Flush(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task FlushAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Flush(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FlushAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ForceLinkToReplicationGroup(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceLinkContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ForceLinkToReplicationGroupAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceLinkContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ForceUnlink(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceUnlinkRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -320,8 +323,12 @@ public static partial class ArmRedisEnterpriseModelFactory public static Azure.ResourceManager.RedisEnterprise.AccessPolicyAssignmentData AccessPolicyAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), string accessPolicyName = null, System.Guid? userObjectId = default(System.Guid?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDataAccessKeys RedisEnterpriseDataAccessKeys(string primaryKey = null, string secondaryKey = null) { throw null; } @@ -336,6 +343,8 @@ public static partial class ArmRedisEnterpriseModelFactory public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseOperationStatus RedisEnterpriseOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string status = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionData RedisEnterprisePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails RedisEnterpriseSkuDetails(string name = null, float? sizeInGB = default(float?)) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList RedisEnterpriseSkuDetailsList(System.Collections.Generic.IEnumerable skus = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DeferUpgradeSetting : System.IEquatable @@ -489,6 +498,7 @@ public enum RedisEnterpriseAccessKeyType private readonly int _dummyPrimitive; public RedisEnterpriseClusteringPolicy(string value) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy EnterpriseCluster { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy NoCluster { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy OssCluster { get { throw null; } } public bool Equals(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -510,6 +520,7 @@ public RedisEnterpriseClusterPatch() { } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string RedisVersion { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? RedundancyMode { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? ResourceState { get { throw null; } } @@ -851,6 +862,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedisEnterprisePublicNetworkAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedisEnterprisePublicNetworkAccess(string value) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess left, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess left, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisEnterpriseRedundancyMode : System.IEquatable { private readonly object _dummy; @@ -892,6 +921,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RedisEnterpriseSkuDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RedisEnterpriseSkuDetails() { } + public string Name { get { throw null; } } + public float? SizeInGB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RedisEnterpriseSkuDetailsList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RedisEnterpriseSkuDetailsList() { } + public System.Collections.Generic.IReadOnlyList Skus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisEnterpriseSkuName : System.IEquatable { diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs index 20dbdb66d525..5690dd52532c 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/api/Azure.ResourceManager.RedisEnterprise.netstandard2.0.cs @@ -83,6 +83,7 @@ public RedisEnterpriseClusterData(Azure.Core.AzureLocation location, Azure.Resou public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string RedisVersion { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? RedundancyMode { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? ResourceState { get { throw null; } } @@ -116,6 +117,8 @@ protected RedisEnterpriseClusterResource() { } public virtual Azure.Response GetRedisEnterprisePrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetRedisEnterprisePrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionCollection GetRedisEnterprisePrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetSkusForScaling(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSkusForScalingAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -178,8 +181,8 @@ protected RedisEnterpriseDatabaseResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Export(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ExportRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ExportRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Flush(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task FlushAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Flush(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FlushAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.FlushRedisEnterpriseDatabaseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ForceLinkToReplicationGroup(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceLinkContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ForceLinkToReplicationGroupAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceLinkContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ForceUnlink(Azure.WaitUntil waitUntil, Azure.ResourceManager.RedisEnterprise.Models.ForceUnlinkRedisEnterpriseDatabaseContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -320,8 +323,12 @@ public static partial class ArmRedisEnterpriseModelFactory public static Azure.ResourceManager.RedisEnterprise.AccessPolicyAssignmentData AccessPolicyAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), string accessPolicyName = null, System.Guid? userObjectId = default(System.Guid?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } - public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.RedisEnterpriseClusterData RedisEnterpriseClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind? kind = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseKind?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability? highAvailability = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseHighAvailability?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? redundancyMode = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode?), Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState?), string redisVersion = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? minimumTlsVersion, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? provisioningState, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? resourceState, string redisVersion, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseDataAccessKeys RedisEnterpriseDataAccessKeys(string primaryKey = null, string secondaryKey = null) { throw null; } @@ -336,6 +343,8 @@ public static partial class ArmRedisEnterpriseModelFactory public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseOperationStatus RedisEnterpriseOperationStatus(Azure.Core.ResourceIdentifier id = null, string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string status = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.RedisEnterprise.RedisEnterprisePrivateEndpointConnectionData RedisEnterprisePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails RedisEnterpriseSkuDetails(string name = null, float? sizeInGB = default(float?)) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList RedisEnterpriseSkuDetailsList(System.Collections.Generic.IEnumerable skus = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DeferUpgradeSetting : System.IEquatable @@ -489,6 +498,7 @@ public enum RedisEnterpriseAccessKeyType private readonly int _dummyPrimitive; public RedisEnterpriseClusteringPolicy(string value) { throw null; } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy EnterpriseCluster { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy NoCluster { get { throw null; } } public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy OssCluster { get { throw null; } } public bool Equals(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusteringPolicy other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -510,6 +520,7 @@ public RedisEnterpriseClusterPatch() { } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseProvisioningStatus? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string RedisVersion { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseRedundancyMode? RedundancyMode { get { throw null; } } public Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseClusterResourceState? ResourceState { get { throw null; } } @@ -851,6 +862,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RedisEnterprisePublicNetworkAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RedisEnterprisePublicNetworkAccess(string value) { throw null; } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess left, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess left, Azure.ResourceManager.RedisEnterprise.Models.RedisEnterprisePublicNetworkAccess right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisEnterpriseRedundancyMode : System.IEquatable { private readonly object _dummy; @@ -892,6 +921,29 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RedisEnterpriseSkuDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RedisEnterpriseSkuDetails() { } + public string Name { get { throw null; } } + public float? SizeInGB { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RedisEnterpriseSkuDetailsList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RedisEnterpriseSkuDetailsList() { } + public System.Collections.Generic.IReadOnlyList Skus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RedisEnterprise.Models.RedisEnterpriseSkuDetailsList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedisEnterpriseSkuName : System.IEquatable { diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/assets.json b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/assets.json index 4928eddc6f55..e7cf49b28135 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/assets.json +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/redisenterprise/Azure.ResourceManager.RedisEnterprise", - "Tag": "net/redisenterprise/Azure.ResourceManager.RedisEnterprise_547c0f920f" + "Tag": "net/redisenterprise/Azure.ResourceManager.RedisEnterprise_64f22547d3" } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Azure.ResourceManager.RedisEnterprise.csproj b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Azure.ResourceManager.RedisEnterprise.csproj index 8d346b291d16..da5337665dd1 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Azure.ResourceManager.RedisEnterprise.csproj +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Azure.ResourceManager.RedisEnterprise.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0 1.2.1 Azure.ResourceManager.RedisEnterprise diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentCollection.cs index 6f2a1ba37349..5180f9a31e9e 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string accessPolicyA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string accessPolicyAssignm /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string accessPolicyAssignmentName, Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.cs index 23d2ff5084fb..f852a44d11cb 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs index 016b4f1a1675..3ff0a43ece84 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/ArmRedisEnterpriseModelFactory.cs @@ -57,8 +57,9 @@ public static RedisEnterpriseOperationStatus RedisEnterpriseOperationStatus(Reso /// Current resource status of the cluster. /// Version of redis the cluster supports, e.g. '6'. /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. /// A new instance for mocking. - public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RedisEnterpriseKind? kind = null, RedisEnterpriseSku sku = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisEnterpriseHighAvailability? highAvailability = null, RedisEnterpriseTlsVersion? minimumTlsVersion = null, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, RedisEnterpriseProvisioningStatus? provisioningState = null, RedisEnterpriseRedundancyMode? redundancyMode = null, RedisEnterpriseClusterResourceState? resourceState = null, string redisVersion = null, IEnumerable privateEndpointConnections = null) + public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RedisEnterpriseKind? kind = null, RedisEnterpriseSku sku = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisEnterpriseHighAvailability? highAvailability = null, RedisEnterpriseTlsVersion? minimumTlsVersion = null, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, RedisEnterpriseProvisioningStatus? provisioningState = null, RedisEnterpriseRedundancyMode? redundancyMode = null, RedisEnterpriseClusterResourceState? resourceState = null, string redisVersion = null, IEnumerable privateEndpointConnections = null, RedisEnterprisePublicNetworkAccess? publicNetworkAccess = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -84,6 +85,7 @@ public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIden resourceState, redisVersion, privateEndpointConnections?.ToList(), + publicNetworkAccess, serializedAdditionalRawData: null); } @@ -122,8 +124,9 @@ public static RedisEnterprisePrivateEndpointConnectionData RedisEnterprisePrivat /// Current resource status of the cluster. /// Version of redis the cluster supports, e.g. '6'. /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. /// A new instance for mocking. - public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnterpriseSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, RedisEnterpriseHighAvailability? highAvailability = null, RedisEnterpriseTlsVersion? minimumTlsVersion = null, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, RedisEnterpriseProvisioningStatus? provisioningState = null, RedisEnterpriseRedundancyMode? redundancyMode = null, RedisEnterpriseClusterResourceState? resourceState = null, string redisVersion = null, IEnumerable privateEndpointConnections = null) + public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnterpriseSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, RedisEnterpriseHighAvailability? highAvailability = null, RedisEnterpriseTlsVersion? minimumTlsVersion = null, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption = null, string hostName = null, RedisEnterpriseProvisioningStatus? provisioningState = null, RedisEnterpriseRedundancyMode? redundancyMode = null, RedisEnterpriseClusterResourceState? resourceState = null, string redisVersion = null, IEnumerable privateEndpointConnections = null, RedisEnterprisePublicNetworkAccess? publicNetworkAccess = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -141,6 +144,7 @@ public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnter resourceState, redisVersion, privateEndpointConnections?.ToList(), + publicNetworkAccess, serializedAdditionalRawData: null); } @@ -153,7 +157,7 @@ public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnter /// TCP port of the database endpoint. Specified at create time. Defaults to an available port. /// Current provisioning status of the database. /// Current resource status of the database. - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. /// Redis eviction policy - default is VolatileLRU. /// Persistence settings. /// Optional set of redis modules to enable in this database - modules can only be added at creation time. @@ -210,7 +214,7 @@ public static RedisEnterpriseLinkedDatabase RedisEnterpriseLinkedDatabase(Resour /// TCP port of the database endpoint. Specified at create time. Defaults to an available port. /// Current provisioning status of the database. /// Current resource status of the database. - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. /// Redis eviction policy - default is VolatileLRU. /// Persistence settings. /// Optional set of redis modules to enable in this database - modules can only be added at creation time. @@ -270,6 +274,25 @@ public static AccessPolicyAssignmentData AccessPolicyAssignmentData(ResourceIden serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// List of SKUS available to scale up or scale down. + /// A new instance for mocking. + public static RedisEnterpriseSkuDetailsList RedisEnterpriseSkuDetailsList(IEnumerable skus = null) + { + skus ??= new List(); + + return new RedisEnterpriseSkuDetailsList(skus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The cache size in GB. + /// A new instance for mocking. + public static RedisEnterpriseSkuDetails RedisEnterpriseSkuDetails(string name = null, float? sizeInGB = null) + { + return new RedisEnterpriseSkuDetails(name, sizeInGB, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -295,6 +318,53 @@ public static RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResou serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Distinguishes the kind of cluster. Read-only. + /// The SKU to create, which affects price, performance, and features. + /// The Availability Zones where this cluster will be deployed. + /// The identity of the resource. + /// Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss. + /// The minimum TLS version for the cluster to support, e.g. '1.2'. Newer versions can be added in the future. Note that TLS 1.0 and TLS 1.1 are now completely obsolete -- you cannot use them. They are mentioned only for the sake of consistency with old API versions. + /// Encryption-at-rest configuration for the cluster. + /// DNS name of the cluster endpoint. + /// Current provisioning status of the cluster. + /// Explains the current redundancy strategy of the cluster, which affects the expected SLA. + /// Current resource status of the cluster. + /// Version of redis the cluster supports, e.g. '6'. + /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RedisEnterpriseKind? kind, RedisEnterpriseSku sku, IEnumerable zones, ManagedServiceIdentity identity, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IEnumerable privateEndpointConnections) + { + return RedisEnterpriseClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: kind, sku: sku, zones: zones, identity: identity, highAvailability: highAvailability, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: redundancyMode, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: default); + } + + /// Initializes a new instance of . + /// The SKU to create, which affects price, performance, and features. + /// The identity of the resource. + /// Resource tags. + /// Enabled by default. If highAvailability is disabled, the data set is not replicated. This affects the availability SLA, and increases the risk of data loss. + /// The minimum TLS version for the cluster to support, e.g. '1.2'. Newer versions can be added in the future. Note that TLS 1.0 and TLS 1.1 are now completely obsolete -- you cannot use them. They are mentioned only for the sake of consistency with old API versions. + /// Encryption-at-rest configuration for the cluster. + /// DNS name of the cluster endpoint. + /// Current provisioning status of the cluster. + /// Explains the current redundancy strategy of the cluster, which affects the expected SLA. + /// Current resource status of the cluster. + /// Version of redis the cluster supports, e.g. '6'. + /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnterpriseSku sku, ManagedServiceIdentity identity, IDictionary tags, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IEnumerable privateEndpointConnections) + { + return RedisEnterpriseClusterPatch(sku: sku, identity: identity, tags: tags, highAvailability: highAvailability, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: redundancyMode, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: default); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -316,7 +386,7 @@ public static RedisEnterprisePrivateLinkResource RedisEnterprisePrivateLinkResou [EditorBrowsable(EditorBrowsableState.Never)] public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RedisEnterpriseSku sku, IEnumerable zones, ManagedServiceIdentity identity, RedisEnterpriseTlsVersion? minimumTlsVersion, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IEnumerable privateEndpointConnections) { - return RedisEnterpriseClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: default, sku: sku, zones: zones, identity: identity, highAvailability: default, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: default, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections); + return RedisEnterpriseClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: default, sku: sku, zones: zones, identity: identity, highAvailability: default, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: default, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: default); } /// Initializes a new instance of . @@ -334,7 +404,7 @@ public static RedisEnterpriseClusterData RedisEnterpriseClusterData(ResourceIden [EditorBrowsable(EditorBrowsableState.Never)] public static RedisEnterpriseClusterPatch RedisEnterpriseClusterPatch(RedisEnterpriseSku sku, ManagedServiceIdentity identity, IDictionary tags, RedisEnterpriseTlsVersion? minimumTlsVersion, RedisEnterpriseCustomerManagedKeyEncryption customerManagedKeyEncryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IEnumerable privateEndpointConnections) { - return RedisEnterpriseClusterPatch(sku: sku, identity: identity, tags: tags, highAvailability: default, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: default, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections); + return RedisEnterpriseClusterPatch(sku: sku, identity: identity, tags: tags, highAvailability: default, minimumTlsVersion: minimumTlsVersion, customerManagedKeyEncryption: customerManagedKeyEncryption, hostName: hostName, provisioningState: provisioningState, redundancyMode: default, resourceState: resourceState, redisVersion: redisVersion, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: default); } /// Initializes a new instance of . diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseResourceGroupResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseResourceGroupResource.cs index f332922cb030..017090d7a08d 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseResourceGroupResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual RedisEnterpriseClusterCollection GetRedisEnterpriseClusters() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetRedisEnte /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseSubscriptionResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseSubscriptionResource.cs index 02317cf61da6..2f5b99f17b89 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseSubscriptionResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/MockableRedisEnterpriseSubscriptionResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -99,7 +99,7 @@ public virtual async Task> GetRedisEnte /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -139,7 +139,7 @@ public virtual Response GetRedisEnterpriseOperat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual AsyncPageable GetRedisEnterpriseC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs index 02dea78390a6..ccf8d8f95e18 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Extensions/RedisEnterpriseExtensions.cs @@ -139,7 +139,7 @@ public static RedisEnterpriseClusterCollection GetRedisEnterpriseClusters(this R /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -177,7 +177,7 @@ public static async Task> GetRedisEnter /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -215,7 +215,7 @@ public static Response GetRedisEnterpriseCluster /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -249,7 +249,7 @@ public static async Task> GetRedisEnter /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -283,7 +283,7 @@ public static Response GetRedisEnterpriseOperati /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -319,7 +319,7 @@ public static AsyncPageable GetRedisEnterpriseCl /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/AzureResourceManagerRedisEnterpriseContext.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/AzureResourceManagerRedisEnterpriseContext.cs index efe48af6c658..b2bbb7a5a322 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/AzureResourceManagerRedisEnterpriseContext.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/AzureResourceManagerRedisEnterpriseContext.cs @@ -52,6 +52,8 @@ namespace Azure.ResourceManager.RedisEnterprise [ModelReaderWriterBuildable(typeof(RedisEnterprisePrivateLinkServiceConnectionState))] [ModelReaderWriterBuildable(typeof(RedisEnterpriseRegenerateKeyContent))] [ModelReaderWriterBuildable(typeof(RedisEnterpriseSku))] + [ModelReaderWriterBuildable(typeof(RedisEnterpriseSkuDetails))] + [ModelReaderWriterBuildable(typeof(RedisEnterpriseSkuDetailsList))] [ModelReaderWriterBuildable(typeof(RedisPersistenceSettings))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SubResource))] diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.Serialization.cs index 2fc51b4b956b..5b90e01b3cc2 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.Serialization.cs @@ -109,6 +109,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + if (PublicNetworkAccess != null) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } + else + { + writer.WriteNull("publicNetworkAccess"); + } + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -159,6 +171,7 @@ internal static RedisEnterpriseClusterPatch DeserializeRedisEnterpriseClusterPat RedisEnterpriseClusterResourceState? resourceState = default; string redisVersion = default; IReadOnlyList privateEndpointConnections = default; + RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -282,6 +295,16 @@ internal static RedisEnterpriseClusterPatch DeserializeRedisEnterpriseClusterPat privateEndpointConnections = array; continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + publicNetworkAccess = null; + continue; + } + publicNetworkAccess = new RedisEnterprisePublicNetworkAccess(property0.Value.GetString()); + continue; + } } continue; } @@ -304,6 +327,7 @@ internal static RedisEnterpriseClusterPatch DeserializeRedisEnterpriseClusterPat resourceState, redisVersion, privateEndpointConnections ?? new ChangeTrackingList(), + publicNetworkAccess, serializedAdditionalRawData); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.cs index 93b6c439dfd7..6118deae2aab 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusterPatch.cs @@ -66,8 +66,9 @@ public RedisEnterpriseClusterPatch() /// Current resource status of the cluster. /// Version of redis the cluster supports, e.g. '6'. /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. /// Keeps track of any properties unknown to the library. - internal RedisEnterpriseClusterPatch(RedisEnterpriseSku sku, ManagedServiceIdentity identity, IDictionary tags, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, ClusterPropertiesEncryption encryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) + internal RedisEnterpriseClusterPatch(RedisEnterpriseSku sku, ManagedServiceIdentity identity, IDictionary tags, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, ClusterPropertiesEncryption encryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IReadOnlyList privateEndpointConnections, RedisEnterprisePublicNetworkAccess? publicNetworkAccess, IDictionary serializedAdditionalRawData) { Sku = sku; Identity = identity; @@ -81,6 +82,7 @@ internal RedisEnterpriseClusterPatch(RedisEnterpriseSku sku, ManagedServiceIdent ResourceState = resourceState; RedisVersion = redisVersion; PrivateEndpointConnections = privateEndpointConnections; + PublicNetworkAccess = publicNetworkAccess; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -132,5 +134,8 @@ public RedisEnterpriseCustomerManagedKeyEncryption CustomerManagedKeyEncryption /// List of private endpoint connections associated with the specified Redis Enterprise cluster. [WirePath("properties.privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. + [WirePath("properties.publicNetworkAccess")] + public RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get; set; } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusteringPolicy.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusteringPolicy.cs index 744e243fdb81..9fe95ec1ccca 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusteringPolicy.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseClusteringPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RedisEnterprise.Models { - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. public readonly partial struct RedisEnterpriseClusteringPolicy : IEquatable { private readonly string _value; @@ -24,11 +24,14 @@ public RedisEnterpriseClusteringPolicy(string value) private const string EnterpriseClusterValue = "EnterpriseCluster"; private const string OssClusterValue = "OSSCluster"; + private const string NoClusterValue = "NoCluster"; /// Enterprise clustering policy uses only the classic redis protocol, which does not support redis cluster commands. public static RedisEnterpriseClusteringPolicy EnterpriseCluster { get; } = new RedisEnterpriseClusteringPolicy(EnterpriseClusterValue); /// OSS clustering policy follows the redis cluster specification, and requires all clients to support redis clustering. public static RedisEnterpriseClusteringPolicy OssCluster { get; } = new RedisEnterpriseClusteringPolicy(OssClusterValue); + /// The NoCluster policy is used for non-clustered Redis instances that do not require clustering features. + public static RedisEnterpriseClusteringPolicy NoCluster { get; } = new RedisEnterpriseClusteringPolicy(NoClusterValue); /// Determines if two values are the same. public static bool operator ==(RedisEnterpriseClusteringPolicy left, RedisEnterpriseClusteringPolicy right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseDatabasePatch.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseDatabasePatch.cs index de783d270bcd..18fa99c67820 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseDatabasePatch.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseDatabasePatch.cs @@ -56,7 +56,7 @@ public RedisEnterpriseDatabasePatch() /// TCP port of the database endpoint. Specified at create time. Defaults to an available port. /// Current provisioning status of the database. /// Current resource status of the database. - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. /// Redis eviction policy - default is VolatileLRU. /// Persistence settings. /// Optional set of redis modules to enable in this database - modules can only be added at creation time. @@ -94,7 +94,7 @@ internal RedisEnterpriseDatabasePatch(RedisEnterpriseClientProtocol? clientProto /// Current resource status of the database. [WirePath("properties.resourceState")] public RedisEnterpriseClusterResourceState? ResourceState { get; } - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. [WirePath("properties.clusteringPolicy")] public RedisEnterpriseClusteringPolicy? ClusteringPolicy { get; set; } /// Redis eviction policy - default is VolatileLRU. diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterprisePublicNetworkAccess.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterprisePublicNetworkAccess.cs new file mode 100644 index 000000000000..8e5afec9bd56 --- /dev/null +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterprisePublicNetworkAccess.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RedisEnterprise.Models +{ + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. + public readonly partial struct RedisEnterprisePublicNetworkAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedisEnterprisePublicNetworkAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static RedisEnterprisePublicNetworkAccess Enabled { get; } = new RedisEnterprisePublicNetworkAccess(EnabledValue); + /// Disabled. + public static RedisEnterprisePublicNetworkAccess Disabled { get; } = new RedisEnterprisePublicNetworkAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(RedisEnterprisePublicNetworkAccess left, RedisEnterprisePublicNetworkAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedisEnterprisePublicNetworkAccess left, RedisEnterprisePublicNetworkAccess right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedisEnterprisePublicNetworkAccess(string value) => new RedisEnterprisePublicNetworkAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedisEnterprisePublicNetworkAccess other && Equals(other); + /// + public bool Equals(RedisEnterprisePublicNetworkAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.Serialization.cs new file mode 100644 index 000000000000..4efe44bb8aac --- /dev/null +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RedisEnterprise.Models +{ + public partial class RedisEnterpriseSkuDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(SizeInGB)) + { + writer.WritePropertyName("sizeInGB"u8); + writer.WriteNumberValue(SizeInGB.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RedisEnterpriseSkuDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRedisEnterpriseSkuDetails(document.RootElement, options); + } + + internal static RedisEnterpriseSkuDetails DeserializeRedisEnterpriseSkuDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + float? sizeInGB = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("sizeInGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeInGB = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RedisEnterpriseSkuDetails(name, sizeInGB, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SizeInGB), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sizeInGB: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SizeInGB)) + { + builder.Append(" sizeInGB: "); + builder.AppendLine($"'{SizeInGB.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerRedisEnterpriseContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetails)} does not support writing '{options.Format}' format."); + } + } + + RedisEnterpriseSkuDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRedisEnterpriseSkuDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.cs similarity index 62% rename from sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs rename to sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.cs index 54b375d2db91..ee9f6057c297 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Generated/Models/MySqlFlexibleServersPrivateLinkResourceListResult.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetails.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.ResourceManager.MySql.FlexibleServers.Models +namespace Azure.ResourceManager.RedisEnterprise.Models { - /// A list of private link resources. - internal partial class MySqlFlexibleServersPrivateLinkResourceListResult + /// Details of a Redis Enterprise cluster SKU. + public partial class RedisEnterpriseSkuDetails { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,27 @@ internal partial class MySqlFlexibleServersPrivateLinkResourceListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal MySqlFlexibleServersPrivateLinkResourceListResult() + /// Initializes a new instance of . + internal RedisEnterpriseSkuDetails() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// Array of private link resources. + /// Initializes a new instance of . + /// The name of the SKU. + /// The cache size in GB. /// Keeps track of any properties unknown to the library. - internal MySqlFlexibleServersPrivateLinkResourceListResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal RedisEnterpriseSkuDetails(string name, float? sizeInGB, IDictionary serializedAdditionalRawData) { - Value = value; + Name = name; + SizeInGB = sizeInGB; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of private link resources. - public IReadOnlyList Value { get; } + /// The name of the SKU. + [WirePath("name")] + public string Name { get; } + /// The cache size in GB. + [WirePath("sizeInGB")] + public float? SizeInGB { get; } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.Serialization.cs new file mode 100644 index 000000000000..0f476d27821b --- /dev/null +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RedisEnterprise.Models +{ + public partial class RedisEnterpriseSkuDetailsList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetailsList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Skus)) + { + writer.WritePropertyName("skus"u8); + writer.WriteStartArray(); + foreach (var item in Skus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RedisEnterpriseSkuDetailsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetailsList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRedisEnterpriseSkuDetailsList(document.RootElement, options); + } + + internal static RedisEnterpriseSkuDetailsList DeserializeRedisEnterpriseSkuDetailsList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList skus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("skus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RedisEnterpriseSkuDetails.DeserializeRedisEnterpriseSkuDetails(item, options)); + } + skus = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RedisEnterpriseSkuDetailsList(skus ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Skus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" skus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Skus)) + { + if (Skus.Any()) + { + builder.Append(" skus: "); + builder.AppendLine("["); + foreach (var item in Skus) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " skus: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerRedisEnterpriseContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetailsList)} does not support writing '{options.Format}' format."); + } + } + + RedisEnterpriseSkuDetailsList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRedisEnterpriseSkuDetailsList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RedisEnterpriseSkuDetailsList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.cs similarity index 63% rename from sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs rename to sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.cs index 3346103fedc2..8b677d0f0652 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/Models/RetentionPolicyProperties.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/Models/RedisEnterpriseSkuDetailsList.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.ResourceManager.DurableTask.Models +namespace Azure.ResourceManager.RedisEnterprise.Models { - /// The retention policy settings for the resource. - public partial class RetentionPolicyProperties + /// The response of a listSkusForScaling operation. + public partial class RedisEnterpriseSkuDetailsList { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,23 @@ public partial class RetentionPolicyProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public RetentionPolicyProperties() + /// Initializes a new instance of . + internal RedisEnterpriseSkuDetailsList() { - RetentionPolicies = new ChangeTrackingList(); + Skus = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// The status of the last operation. - /// The orchestration retention policies. + /// Initializes a new instance of . + /// List of SKUS available to scale up or scale down. /// Keeps track of any properties unknown to the library. - internal RetentionPolicyProperties(ProvisioningState? provisioningState, IList retentionPolicies, IDictionary serializedAdditionalRawData) + internal RedisEnterpriseSkuDetailsList(IReadOnlyList skus, IDictionary serializedAdditionalRawData) { - ProvisioningState = provisioningState; - RetentionPolicies = retentionPolicies; + Skus = skus; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The status of the last operation. - public ProvisioningState? ProvisioningState { get; } - /// The orchestration retention policies. - public IList RetentionPolicies { get; } + /// List of SKUS available to scale up or scale down. + [WirePath("skus")] + public IReadOnlyList Skus { get; } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterCollection.cs index 102654a06cde..adcab0c36359 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string clusterName, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.Serialization.cs index 8a9454f229bb..30ef52fc15fe 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.Serialization.cs @@ -113,6 +113,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + if (PublicNetworkAccess != null) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } + else + { + writer.WriteNull("publicNetworkAccess"); + } + } writer.WriteEndObject(); } @@ -155,6 +167,7 @@ internal static RedisEnterpriseClusterData DeserializeRedisEnterpriseClusterData RedisEnterpriseClusterResourceState? resourceState = default; string redisVersion = default; IReadOnlyList privateEndpointConnections = default; + RedisEnterprisePublicNetworkAccess? publicNetworkAccess = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -326,6 +339,16 @@ internal static RedisEnterpriseClusterData DeserializeRedisEnterpriseClusterData privateEndpointConnections = array; continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + publicNetworkAccess = null; + continue; + } + publicNetworkAccess = new RedisEnterprisePublicNetworkAccess(property0.Value.GetString()); + continue; + } } continue; } @@ -355,6 +378,7 @@ internal static RedisEnterpriseClusterData DeserializeRedisEnterpriseClusterData resourceState, redisVersion, privateEndpointConnections ?? new ChangeTrackingList(), + publicNetworkAccess, serializedAdditionalRawData); } @@ -718,6 +742,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.cs index 80fb1be4218f..e6e7de77e74e 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterData.cs @@ -84,8 +84,9 @@ public RedisEnterpriseClusterData(AzureLocation location, RedisEnterpriseSku sku /// Current resource status of the cluster. /// Version of redis the cluster supports, e.g. '6'. /// List of private endpoint connections associated with the specified Redis Enterprise cluster. + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. /// Keeps track of any properties unknown to the library. - internal RedisEnterpriseClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RedisEnterpriseKind? kind, RedisEnterpriseSku sku, IList zones, ManagedServiceIdentity identity, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, ClusterPropertiesEncryption encryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal RedisEnterpriseClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RedisEnterpriseKind? kind, RedisEnterpriseSku sku, IList zones, ManagedServiceIdentity identity, RedisEnterpriseHighAvailability? highAvailability, RedisEnterpriseTlsVersion? minimumTlsVersion, ClusterPropertiesEncryption encryption, string hostName, RedisEnterpriseProvisioningStatus? provisioningState, RedisEnterpriseRedundancyMode? redundancyMode, RedisEnterpriseClusterResourceState? resourceState, string redisVersion, IReadOnlyList privateEndpointConnections, RedisEnterprisePublicNetworkAccess? publicNetworkAccess, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; Sku = sku; @@ -100,6 +101,7 @@ internal RedisEnterpriseClusterData(ResourceIdentifier id, string name, Resource ResourceState = resourceState; RedisVersion = redisVersion; PrivateEndpointConnections = privateEndpointConnections; + PublicNetworkAccess = publicNetworkAccess; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -159,5 +161,8 @@ public RedisEnterpriseCustomerManagedKeyEncryption CustomerManagedKeyEncryption /// List of private endpoint connections associated with the specified Redis Enterprise cluster. [WirePath("properties.privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } + /// Whether or not public network traffic can access the Redis cluster. Only 'Enabled' or 'Disabled' can be set. null is returned only for clusters created using an old API version which do not have this property and cannot be set. + [WirePath("properties.publicNetworkAccess")] + public RedisEnterprisePublicNetworkAccess? PublicNetworkAccess { get; set; } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.cs index 8514678e75ee..da7f409975e9 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.cs @@ -115,7 +115,7 @@ public virtual RedisEnterpriseDatabaseCollection GetRedisEnterpriseDatabases() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetRedisEnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual RedisEnterprisePrivateEndpointConnectionCollection GetRedisEnterp /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetRed /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -489,6 +489,82 @@ public virtual ArmOperation Update(WaitUntil wai } } + /// + /// Lists the available SKUs for scaling the Redis Enterprise cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/listSkusForScaling + /// + /// + /// Operation Id + /// RedisEnterprise_ListSkusForScaling + /// + /// + /// Default Api Version + /// 2025-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSkusForScalingAsync(CancellationToken cancellationToken = default) + { + using var scope = _redisEnterpriseClusterRedisEnterpriseClientDiagnostics.CreateScope("RedisEnterpriseClusterResource.GetSkusForScaling"); + scope.Start(); + try + { + var response = await _redisEnterpriseClusterRedisEnterpriseRestClient.ListSkusForScalingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the available SKUs for scaling the Redis Enterprise cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/listSkusForScaling + /// + /// + /// Operation Id + /// RedisEnterprise_ListSkusForScaling + /// + /// + /// Default Api Version + /// 2025-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSkusForScaling(CancellationToken cancellationToken = default) + { + using var scope = _redisEnterpriseClusterRedisEnterpriseClientDiagnostics.CreateScope("RedisEnterpriseClusterResource.GetSkusForScaling"); + scope.Start(); + try + { + var response = _redisEnterpriseClusterRedisEnterpriseRestClient.ListSkusForScaling(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets the private link resources that need to be created for a Redis Enterprise cluster. /// @@ -502,7 +578,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -527,7 +603,7 @@ public virtual AsyncPageable GetPrivateLinkR /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// @@ -552,7 +628,7 @@ public virtual Pageable GetPrivateLinkResour /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -614,7 +690,7 @@ public virtual async Task> AddTagAsync( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -676,7 +752,7 @@ public virtual Response AddTag(string key, strin /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -733,7 +809,7 @@ public virtual async Task> SetTagsAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -790,7 +866,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -850,7 +926,7 @@ public virtual async Task> RemoveTagAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseCollection.cs index c0916e53136a..1b452c727e1c 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string databaseName /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string databaseName, CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseData.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseData.cs index b19f9eb8690e..bbcbbd44785e 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseData.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseData.cs @@ -66,7 +66,7 @@ public RedisEnterpriseDatabaseData() /// TCP port of the database endpoint. Specified at create time. Defaults to an available port. /// Current provisioning status of the database. /// Current resource status of the database. - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. /// Redis eviction policy - default is VolatileLRU. /// Persistence settings. /// Optional set of redis modules to enable in this database - modules can only be added at creation time. @@ -104,7 +104,7 @@ internal RedisEnterpriseDatabaseData(ResourceIdentifier id, string name, Resourc /// Current resource status of the database. [WirePath("properties.resourceState")] public RedisEnterpriseClusterResourceState? ResourceState { get; } - /// Clustering policy - default is OSSCluster. This property must be chosen at create time, and cannot be changed without deleting the database. + /// Clustering policy - default is OSSCluster. This property can be updated only if the current value is NoCluster. If the value is OSSCluster or EnterpriseCluster, it cannot be updated without deleting the database. [WirePath("properties.clusteringPolicy")] public RedisEnterpriseClusteringPolicy? ClusteringPolicy { get; set; } /// Redis eviction policy - default is VolatileLRU. diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.cs index cc09dd40f979..67122384b027 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.cs @@ -109,7 +109,7 @@ public virtual AccessPolicyAssignmentCollection GetAccessPolicyAssignments() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAccessPol /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetAccessPolicyAssignmen /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> GetKeysAsync( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -503,7 +503,7 @@ public virtual Response GetKeys(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -549,7 +549,7 @@ public virtual async Task> Regenerat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -595,7 +595,7 @@ public virtual ArmOperation RegenerateKey(WaitUnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -641,7 +641,7 @@ public virtual async Task ImportAsync(WaitUntil waitUntil, ImportR /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -687,7 +687,7 @@ public virtual ArmOperation Import(WaitUntil waitUntil, ImportRedisEnterpriseDat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task ExportAsync(WaitUntil waitUntil, ExportR /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -779,7 +779,7 @@ public virtual ArmOperation Export(WaitUntil waitUntil, ExportRedisEnterpriseDat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -825,7 +825,7 @@ public virtual async Task ForceUnlinkAsync(WaitUntil waitUntil, Fo /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -871,7 +871,7 @@ public virtual ArmOperation ForceUnlink(WaitUntil waitUntil, ForceUnlinkRedisEnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -917,7 +917,7 @@ public virtual async Task ForceLinkToReplicationGroupAsync(WaitUnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -963,7 +963,7 @@ public virtual ArmOperation ForceLinkToReplicationGroup(WaitUntil waitUntil, For /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -974,11 +974,8 @@ public virtual ArmOperation ForceLinkToReplicationGroup(WaitUntil waitUntil, For /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Information identifying the databases to be flushed. /// The cancellation token to use. - /// is null. - public virtual async Task FlushAsync(WaitUntil waitUntil, FlushRedisEnterpriseDatabaseContent content, CancellationToken cancellationToken = default) + public virtual async Task FlushAsync(WaitUntil waitUntil, FlushRedisEnterpriseDatabaseContent content = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - using var scope = _redisEnterpriseDatabaseDatabasesClientDiagnostics.CreateScope("RedisEnterpriseDatabaseResource.Flush"); scope.Start(); try @@ -1009,7 +1006,7 @@ public virtual async Task FlushAsync(WaitUntil waitUntil, FlushRed /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -1020,11 +1017,8 @@ public virtual async Task FlushAsync(WaitUntil waitUntil, FlushRed /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Information identifying the databases to be flushed. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Flush(WaitUntil waitUntil, FlushRedisEnterpriseDatabaseContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Flush(WaitUntil waitUntil, FlushRedisEnterpriseDatabaseContent content = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - using var scope = _redisEnterpriseDatabaseDatabasesClientDiagnostics.CreateScope("RedisEnterpriseDatabaseResource.Flush"); scope.Start(); try @@ -1055,7 +1049,7 @@ public virtual ArmOperation Flush(WaitUntil waitUntil, FlushRedisEnterpriseDatab /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -1097,7 +1091,7 @@ public virtual async Task UpgradeDBRedisVersionAsync(WaitUntil wai /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionCollection.cs index 715822635c24..b71d7453808d 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs index 1c8fd5e92bef..3163c2ddab5f 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-07-01 /// /// /// Resource diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs index 87244f8fc560..170065e5aa10 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs @@ -32,7 +32,7 @@ public AccessPolicyAssignmentRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs index 360beda27574..bb6e9dad58f6 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -32,7 +32,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1174,10 +1174,13 @@ internal HttpMessage CreateFlushRequest(string subscriptionId, string resourceGr uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } _userAgent.Apply(message); return message; } @@ -1189,15 +1192,14 @@ internal HttpMessage CreateFlushRequest(string subscriptionId, string resourceGr /// The name of the Redis Enterprise database. /// Information identifying the databases to be flushed. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task FlushAsync(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, FlushRedisEnterpriseDatabaseContent content, CancellationToken cancellationToken = default) + public async Task FlushAsync(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, FlushRedisEnterpriseDatabaseContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(content, nameof(content)); using var message = CreateFlushRequest(subscriptionId, resourceGroupName, clusterName, databaseName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -1218,15 +1220,14 @@ public async Task FlushAsync(string subscriptionId, string resourceGro /// The name of the Redis Enterprise database. /// Information identifying the databases to be flushed. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Flush(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, FlushRedisEnterpriseDatabaseContent content, CancellationToken cancellationToken = default) + public Response Flush(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, FlushRedisEnterpriseDatabaseContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - Argument.AssertNotNull(content, nameof(content)); using var message = CreateFlushRequest(subscriptionId, resourceGroupName, clusterName, databaseName, content); _pipeline.Send(message, cancellationToken); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs index 205b0198e155..49c320b14113 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/OperationsStatusRestOperations.cs @@ -32,7 +32,7 @@ public OperationsStatusRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index caffc0d5399d..b95096772f70 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index cb9ebf696ef5..c9ba4bb533ef 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs index bff34e7a0d90..09678f748887 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RestOperations/RedisEnterpriseRestOperations.cs @@ -32,7 +32,7 @@ public RedisEnterpriseRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -566,6 +566,100 @@ public Response List(string subscriptionId, Cancella } } + internal RequestUriBuilder CreateListSkusForScalingRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cache/redisEnterprise/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/listSkusForScaling", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSkusForScalingRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cache/redisEnterprise/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/listSkusForScaling", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the available SKUs for scaling the Redis Enterprise cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Redis Enterprise cluster. Name must be 1-60 characters long. Allowed characters(A-Z, a-z, 0-9) and hyphen(-). There can be no leading nor trailing nor consecutive hyphens. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSkusForScalingAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListSkusForScalingRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RedisEnterpriseSkuDetailsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RedisEnterpriseSkuDetailsList.DeserializeRedisEnterpriseSkuDetailsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the available SKUs for scaling the Redis Enterprise cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Redis Enterprise cluster. Name must be 1-60 characters long. Allowed characters(A-Z, a-z, 0-9) and hyphen(-). There can be no leading nor trailing nor consecutive hyphens. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSkusForScaling(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListSkusForScalingRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RedisEnterpriseSkuDetailsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RedisEnterpriseSkuDetailsList.DeserializeRedisEnterpriseSkuDetailsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md index 8a87c0c5e768..479287759ab0 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: RedisEnterprise namespace: Azure.ResourceManager.RedisEnterprise -require: https://github.com/Azure/azure-rest-api-specs/blob/e22d3642ca152418d8658c2547ce2179d15317b6/specification/redisenterprise/resource-manager/readme.md -tag: package-2025-04-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/4c5ec9b4e0b961799cc11f6051f240d18f093c38/specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/readme.md +tag: package-2025-07-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -68,6 +68,7 @@ rename-mapping: Protocol.Plaintext: PlainText Protocol: RedisEnterpriseClientProtocol ProvisioningState: RedisEnterpriseProvisioningStatus + PublicNetworkAccess: RedisEnterprisePublicNetworkAccess RdbFrequency.12h: TwelveHours RdbFrequency.1h: OneHour RdbFrequency.6h: SixHours diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentCollection.cs index 565b84f9c237..e4133db3a5f4 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_AccessPolicyAssignmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisEnterpriseAccessPolicyAssignmentCreateUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json // this example is just showing the usage of "AccessPolicyAssignment_CreateUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_RedisEnterpriseAccessPolicyAssignmentCreateUpda [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_RedisEnterpriseAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisEnterpriseAccessPolicyAssignmentList() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentsList.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentsList.json // this example is just showing the usage of "AccessPolicyAssignment_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetAll_RedisEnterpriseAccessPolicyAssignmentList() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisEnterpriseAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_RedisEnterpriseAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisEnterpriseAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentResource.cs index d95fef6a4568..673cbf9915e8 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_AccessPolicyAssignmentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AccessPolicyAssignmentResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseAccessPolicyAssignmentGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentGet.json // this example is just showing the usage of "AccessPolicyAssignment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisEnterpriseAccessPolicyAssignmentGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisEnterpriseAccessPolicyAssignmentDelete() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentDelete.json // this example is just showing the usage of "AccessPolicyAssignment_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Delete_RedisEnterpriseAccessPolicyAssignmentDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisEnterpriseAccessPolicyAssignmentCreateUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseAccessPolicyAssignmentCreateUpdate.json // this example is just showing the usage of "AccessPolicyAssignment_CreateUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs index 5768e7674527..28d3e010778b 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_RedisEnterpriseClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisEnterpriseCreate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseCreate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseCreate.json // this example is just showing the usage of "RedisEnterprise_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,6 +65,7 @@ public async Task CreateOrUpdate_RedisEnterpriseCreate() }, KeyEncryptionKeyUri = new Uri("https://your-kv.vault.azure.net/keys/your-key/your-key-version"), }, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Disabled, Tags = { ["tag1"] = "value1" @@ -84,7 +85,7 @@ public async Task CreateOrUpdate_RedisEnterpriseCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +118,7 @@ public async Task Get_RedisEnterpriseGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisEnterpriseListByResourceGroup() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseListByResourceGroup.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseListByResourceGroup.json // this example is just showing the usage of "RedisEnterprise_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +153,7 @@ public async Task GetAll_RedisEnterpriseListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +182,7 @@ public async Task Exists_RedisEnterpriseGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs index 54809e9439f1..1629036d3ba8 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseClusterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisEnterpriseClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGet.json // this example is just showing the usage of "RedisEnterprise_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RedisEnterpriseGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisEnterpriseDelete() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDelete.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDelete.json // this example is just showing the usage of "RedisEnterprise_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_RedisEnterpriseDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisEnterpriseUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseUpdate.json // this example is just showing the usage of "RedisEnterprise_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,6 +104,7 @@ public async Task Update_RedisEnterpriseUpdate() ["tag1"] = "value1" }, MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled, }; ArmOperation lro = await redisEnterpriseCluster.UpdateAsync(WaitUntil.Completed, patch); RedisEnterpriseClusterResource result = lro.Value; @@ -115,11 +116,37 @@ public async Task Update_RedisEnterpriseUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSkusForScaling_RedisEnterpriseListSkusForScaling() + { + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseListSkusForScaling.json + // this example is just showing the usage of "RedisEnterprise_ListSkusForScaling" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RedisEnterpriseClusterResource created on azure + // for more information of creating RedisEnterpriseClusterResource, please refer to the document of RedisEnterpriseClusterResource + string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; + string resourceGroupName = "rg1"; + string clusterName = "cache1"; + ResourceIdentifier redisEnterpriseClusterResourceId = RedisEnterpriseClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + RedisEnterpriseClusterResource redisEnterpriseCluster = client.GetRedisEnterpriseClusterResource(redisEnterpriseClusterResourceId); + + // invoke the operation + RedisEnterpriseSkuDetailsList result = await redisEnterpriseCluster.GetSkusForScalingAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetPrivateLinkResourcesByCluster_RedisEnterpriseListPrivateLinkResources() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseListPrivateLinkResources.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseListPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs index 5db66117c3d3..ace48466d2fb 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisEnterpriseDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesCreate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesCreate.json // this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,11 +72,53 @@ public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreateNoClusterCache() + { + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesNoClusterCacheCreate.json + // this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RedisEnterpriseClusterResource created on azure + // for more information of creating RedisEnterpriseClusterResource, please refer to the document of RedisEnterpriseClusterResource + string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; + string resourceGroupName = "rg1"; + string clusterName = "cache1"; + ResourceIdentifier redisEnterpriseClusterResourceId = RedisEnterpriseClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName); + RedisEnterpriseClusterResource redisEnterpriseCluster = client.GetRedisEnterpriseClusterResource(redisEnterpriseClusterResourceId); + + // get the collection of this RedisEnterpriseDatabaseResource + RedisEnterpriseDatabaseCollection collection = redisEnterpriseCluster.GetRedisEnterpriseDatabases(); + + // invoke the operation + string databaseName = "default"; + RedisEnterpriseDatabaseData data = new RedisEnterpriseDatabaseData + { + ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, + Port = 10000, + ClusteringPolicy = RedisEnterpriseClusteringPolicy.NoCluster, + EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data); + RedisEnterpriseDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RedisEnterpriseDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreateWithActiveGeoReplication() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json // this example is just showing the usage of "Databases_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +172,7 @@ public async Task CreateOrUpdate_RedisEnterpriseDatabasesCreateWithActiveGeoRepl [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +206,7 @@ public async Task Get_RedisEnterpriseDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisEnterpriseDatabasesListByCluster() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesListByCluster.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesListByCluster.json // this example is just showing the usage of "Databases_ListByCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -200,7 +242,7 @@ public async Task GetAll_RedisEnterpriseDatabasesListByCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -230,7 +272,7 @@ public async Task Exists_RedisEnterpriseDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs index 7d558aa6a4f5..077bc3510b0e 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterpriseDatabaseResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisEnterpriseDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseDatabasesGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisEnterpriseDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisEnterpriseDatabasesDelete() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesDelete.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesDelete.json // this example is just showing the usage of "Databases_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_RedisEnterpriseDatabasesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RedisEnterpriseDatabasesUpdate() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesUpdate.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesUpdate.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,11 +117,50 @@ public async Task Update_RedisEnterpriseDatabasesUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_RedisEnterpriseDatabasesUpdateClusteringOnNoClusterCache() + { + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesNoClusterCacheUpdateClustering.json + // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RedisEnterpriseDatabaseResource created on azure + // for more information of creating RedisEnterpriseDatabaseResource, please refer to the document of RedisEnterpriseDatabaseResource + string subscriptionId = "e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f"; + string resourceGroupName = "rg1"; + string clusterName = "cache1"; + string databaseName = "default"; + ResourceIdentifier redisEnterpriseDatabaseResourceId = RedisEnterpriseDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, databaseName); + RedisEnterpriseDatabaseResource redisEnterpriseDatabase = client.GetRedisEnterpriseDatabaseResource(redisEnterpriseDatabaseResourceId); + + // invoke the operation + RedisEnterpriseDatabasePatch patch = new RedisEnterpriseDatabasePatch + { + ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, + Port = 10000, + ClusteringPolicy = RedisEnterpriseClusteringPolicy.EnterpriseCluster, + EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, + }; + ArmOperation lro = await redisEnterpriseDatabase.UpdateAsync(WaitUntil.Completed, patch); + RedisEnterpriseDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RedisEnterpriseDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetKeys_RedisEnterpriseDatabasesListKeys() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesListKeys.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesListKeys.json // this example is just showing the usage of "Databases_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +187,7 @@ public async Task GetKeys_RedisEnterpriseDatabasesListKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_RedisEnterpriseDatabasesRegenerateKey() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesRegenerateKey.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesRegenerateKey.json // this example is just showing the usage of "Databases_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +216,7 @@ public async Task RegenerateKey_RedisEnterpriseDatabasesRegenerateKey() [Ignore("Only validating compilation of examples")] public async Task Import_RedisEnterpriseDatabasesImport() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesImport.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesImport.json // this example is just showing the usage of "Databases_Import" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +244,7 @@ public async Task Import_RedisEnterpriseDatabasesImport() [Ignore("Only validating compilation of examples")] public async Task Export_RedisEnterpriseDatabasesExport() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesExport.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesExport.json // this example is just showing the usage of "Databases_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +272,7 @@ public async Task Export_RedisEnterpriseDatabasesExport() [Ignore("Only validating compilation of examples")] public async Task ForceUnlink_HowToUnlinkADatabaseDuringARegionalOutage() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesForceUnlink.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesForceUnlink.json // this example is just showing the usage of "Databases_ForceUnlink" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +300,7 @@ public async Task ForceUnlink_HowToUnlinkADatabaseDuringARegionalOutage() [Ignore("Only validating compilation of examples")] public async Task ForceLinkToReplicationGroup_HowToRelinkADatabaseAfterARegionalOutage() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesForceLink.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesForceLink.json // this example is just showing the usage of "Databases_ForceLinkToReplicationGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -299,7 +338,7 @@ public async Task ForceLinkToReplicationGroup_HowToRelinkADatabaseAfterARegional [Ignore("Only validating compilation of examples")] public async Task Flush_HowToFlushAllTheKeysInTheDatabase() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesFlush.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesFlush.json // this example is just showing the usage of "Databases_Flush" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +360,7 @@ public async Task Flush_HowToFlushAllTheKeysInTheDatabase() { Ids = { new ResourceIdentifier("/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default") }, }; - await redisEnterpriseDatabase.FlushAsync(WaitUntil.Completed, content); + await redisEnterpriseDatabase.FlushAsync(WaitUntil.Completed, content: content); Console.WriteLine("Succeeded"); } @@ -330,7 +369,7 @@ public async Task Flush_HowToFlushAllTheKeysInTheDatabase() [Ignore("Only validating compilation of examples")] public async Task UpgradeDBRedisVersion_HowToUpgradeYourDatabaseRedisVersion() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDatabasesUpgradeDBRedisVersion.json // this example is just showing the usage of "Databases_UpgradeDBRedisVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs index 0f6beb1355ce..a8903f3d4b71 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisEnterprisePrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RedisEnterprisePutPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterprisePutPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterprisePutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_RedisEnterprisePutPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_RedisEnterpriseListPrivateEndpointConnections() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseListPrivateEndpointConnections.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseListPrivateEndpointConnections.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_RedisEnterpriseListPrivateEndpointConnections() [Ignore("Only validating compilation of examples")] public async Task Exists_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_RedisEnterpriseGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs index 53682cdfebcc..427d810ffd3f 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_RedisEnterprisePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RedisEnterprisePrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RedisEnterpriseGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_RedisEnterpriseDeletePrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_RedisEnterpriseDeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_RedisEnterprisePutPrivateEndpointConnection() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterprisePutPrivateEndpointConnection.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterprisePutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 778dabf079b3..2bf4b29f81ae 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetRedisEnterpriseOperationsStatus_OperationsStatusGet() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/OperationsStatusGet.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/OperationsStatusGet.json // this example is just showing the usage of "OperationsStatus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetRedisEnterpriseOperationsStatus_OperationsStatusGet() [Ignore("Only validating compilation of examples")] public async Task GetRedisEnterpriseClusters_RedisEnterpriseList() { - // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2025-04-01/examples/RedisEnterpriseList.json + // Generated from example definition: specification/redisenterprise/resource-manager/Microsoft.Cache/RedisEnterprise/stable/2025-07-01/examples/RedisEnterpriseList.json // this example is just showing the usage of "RedisEnterprise_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ActiveGeoReplicationFunctionalTests.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ActiveGeoReplicationFunctionalTests.cs index 102dc1be2758..1d2495149716 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ActiveGeoReplicationFunctionalTests.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ActiveGeoReplicationFunctionalTests.cs @@ -46,7 +46,8 @@ public async Task CreateUpdateDeleteTest() Capacity = 2 }) { - MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2 + MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled }; var clusterResponse1 = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName1, data)).Value; @@ -64,7 +65,8 @@ public async Task CreateUpdateDeleteTest() Capacity = 2 }) { - MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2 + MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled }; var clusterResponse2 = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName2, data)).Value; diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/AuthenticationFuntionalTests.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/AuthenticationFuntionalTests.cs index 609d9bbc2de3..c0f4d48c5eea 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/AuthenticationFuntionalTests.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/AuthenticationFuntionalTests.cs @@ -41,6 +41,7 @@ public async Task AuthenticationTestAccessPolicyAssingment() }) { MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled }; var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; @@ -129,6 +130,7 @@ public async Task AuthenticationTestAuthenticationKeyAccess() }) { MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled }; var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/CreateUpdateDeleteFunctionalTests.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/CreateUpdateDeleteFunctionalTests.cs index 390b68dfe2b1..faf89720daaf 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/CreateUpdateDeleteFunctionalTests.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/CreateUpdateDeleteFunctionalTests.cs @@ -41,6 +41,8 @@ public async Task CreateUpdateDeleteTest() }) { MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + HighAvailability = RedisEnterpriseHighAvailability.Enabled, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled, Zones = { "1", "2", "3" } }; @@ -122,7 +124,8 @@ public async Task CreateUpdateDeleteTest2() }) { MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, - HighAvailability = RedisEnterpriseHighAvailability.Disabled + HighAvailability = RedisEnterpriseHighAvailability.Disabled, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled }; var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; @@ -144,11 +147,6 @@ public async Task CreateUpdateDeleteTest2() ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, ClusteringPolicy = RedisEnterpriseClusteringPolicy.OssCluster, EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, - Persistence = new RedisPersistenceSettings() - { - IsAofEnabled = true, - AofFrequency = PersistenceSettingAofFrequency.OneSecond - }, }; var databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; @@ -187,82 +185,82 @@ public async Task CreateUpdateDeleteTest2() Assert.IsFalse(falseResult); } - // This test is commented out because the scenario that this test is testing for is introduced in preview version, the stable version does not support it - //[Test] - //public async Task CreateUpdateTestWithNoClusterPolicy() - //{ - // await SetCollectionsAsync(); - - // string redisEnterpriseCacheName = Recording.GenerateAssetName("RedisEnterpriseBegin"); - // var data = new RedisEnterpriseClusterData( - // DefaultLocation, - // new RedisEnterpriseSku(RedisEnterpriseSkuName.BalancedB1)) - // { - // MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, - // HighAvailability = RedisEnterpriseHighAvailability.Disabled - // }; - - // var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; - // Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); - // Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseSkuName.BalancedB1, clusterResponse.Data.Sku.Name); - // Assert.AreEqual(RedisEnterpriseHighAvailability.Disabled, clusterResponse.Data.HighAvailability); - - // clusterResponse = await Collection.GetAsync(redisEnterpriseCacheName); - // Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); - // Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseSkuName.BalancedB1, clusterResponse.Data.Sku.Name); - // Assert.AreEqual(RedisEnterpriseHighAvailability.Disabled, clusterResponse.Data.HighAvailability); - - // var databaseCollection = clusterResponse.GetRedisEnterpriseDatabases(); - // string databaseName = "default"; - // var databaseData = new RedisEnterpriseDatabaseData() - // { - // ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, - // ClusteringPolicy = RedisEnterpriseClusteringPolicy.NoCluster, - // EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, - // Persistence = new RedisPersistenceSettings() - // { - // IsAofEnabled = true, - // AofFrequency = PersistenceSettingAofFrequency.OneSecond - // }, - // }; - - // var databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.NoCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // databaseResponse = await databaseCollection.GetAsync(databaseName); - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.NoCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // // Updating Cluster policy - // databaseData.ClusteringPolicy = RedisEnterpriseClusteringPolicy.EnterpriseCluster; - - // databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.EnterpriseCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // databaseResponse = await databaseCollection.GetAsync(databaseName); - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.EnterpriseCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // // Delete database and cluster - // await databaseResponse.DeleteAsync(WaitUntil.Completed); - // var falseResult = (await databaseCollection.ExistsAsync(databaseName)).Value; - // Assert.IsFalse(falseResult); - - // await clusterResponse.DeleteAsync(WaitUntil.Completed); - // falseResult = (await Collection.ExistsAsync(redisEnterpriseCacheName)).Value; - // Assert.IsFalse(falseResult); - //} + [Test] + public async Task CreateUpdateTestWithNoClusterPolicy() + { + await SetCollectionsAsync(); + + string redisEnterpriseCacheName = Recording.GenerateAssetName("RedisEnterpriseBegin"); + var data = new RedisEnterpriseClusterData( + DefaultLocation, + new RedisEnterpriseSku(RedisEnterpriseSkuName.BalancedB1)) + { + MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + HighAvailability = RedisEnterpriseHighAvailability.Enabled, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled + }; + + var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; + Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); + Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseSkuName.BalancedB1, clusterResponse.Data.Sku.Name); + Assert.AreEqual(RedisEnterpriseHighAvailability.Enabled, clusterResponse.Data.HighAvailability); + + clusterResponse = await Collection.GetAsync(redisEnterpriseCacheName); + Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); + Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseSkuName.BalancedB1, clusterResponse.Data.Sku.Name); + Assert.AreEqual(RedisEnterpriseHighAvailability.Enabled, clusterResponse.Data.HighAvailability); + + var databaseCollection = clusterResponse.GetRedisEnterpriseDatabases(); + string databaseName = "default"; + var databaseData = new RedisEnterpriseDatabaseData() + { + ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, + ClusteringPolicy = RedisEnterpriseClusteringPolicy.NoCluster, + EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, + Persistence = new RedisPersistenceSettings() + { + IsAofEnabled = true, + AofFrequency = PersistenceSettingAofFrequency.OneSecond + }, + }; + + var databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.NoCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + databaseResponse = await databaseCollection.GetAsync(databaseName); + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.NoCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + // Updating Cluster policy + databaseData.ClusteringPolicy = RedisEnterpriseClusteringPolicy.EnterpriseCluster; + + databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.EnterpriseCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + databaseResponse = await databaseCollection.GetAsync(databaseName); + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.EnterpriseCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + // Delete database and cluster + await databaseResponse.DeleteAsync(WaitUntil.Completed); + var falseResult = (await databaseCollection.ExistsAsync(databaseName)).Value; + Assert.IsFalse(falseResult); + + await clusterResponse.DeleteAsync(WaitUntil.Completed); + falseResult = (await Collection.ExistsAsync(redisEnterpriseCacheName)).Value; + Assert.IsFalse(falseResult); + } } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ListSkusForScalingFunctionalTests.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ListSkusForScalingFunctionalTests.cs index b74da03488d1..c456695b55c5 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ListSkusForScalingFunctionalTests.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/tests/ScenarioTests/ListSkusForScalingFunctionalTests.cs @@ -29,76 +29,76 @@ private async Task SetCollectionsAsync() Collection = ResourceGroup.GetRedisEnterpriseClusters(); } - // This test is commented out because the scenario that this test is testing for is introduced in preview version, the stable version does not support it - // [Test] - //public async Task ListSkusForScalingTest() - //{ - // await SetCollectionsAsync(); - - // string redisEnterpriseCacheName = Recording.GenerateAssetName("RedisEnterpriseBegin"); - // var data = new RedisEnterpriseClusterData( - // DefaultLocation, - // new RedisEnterpriseSku(RedisEnterpriseSkuName.BalancedB100) - // { - // }) - // { - // MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, - // }; - - // var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; - // Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); - // Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseSkuName.BalancedB100, clusterResponse.Data.Sku.Name); - - // clusterResponse = await Collection.GetAsync(redisEnterpriseCacheName); - // Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); - // Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseSkuName.BalancedB100, clusterResponse.Data.Sku.Name); - - // var databaseCollection = clusterResponse.GetRedisEnterpriseDatabases(); - // string databaseName = "default"; - // var databaseData = new RedisEnterpriseDatabaseData() - // { - // ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, - // ClusteringPolicy = RedisEnterpriseClusteringPolicy.OssCluster, - // EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, - // Persistence = new RedisPersistenceSettings() - // { - // IsAofEnabled = true, - // AofFrequency = PersistenceSettingAofFrequency.OneSecond - // }, - // }; - - // var databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.OssCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // databaseResponse = await databaseCollection.GetAsync(databaseName); - // Assert.AreEqual(databaseName, databaseResponse.Data.Name); - // Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); - // Assert.AreEqual(RedisEnterpriseClusteringPolicy.OssCluster, databaseResponse.Data.ClusteringPolicy); - // Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); - - // // List Skus for scaling - // var skusResponse = await clusterResponse.GetSkusForScalingAsync(); - // Assert.IsNotNull(skusResponse); - - // // Assert that the response contains specific SKUs - // var skus = skusResponse.Value.Skus; - // Assert.IsTrue(skus.Any(s => s.Name == RedisEnterpriseSkuName.BalancedB20)); - // Assert.IsTrue(skus.Any(s => s.Name == RedisEnterpriseSkuName.BalancedB50)); - // Assert.IsTrue(skus.Any(s => s.SizeInGB == 24.0)); - - // // Delete database and cluster - // await databaseResponse.DeleteAsync(WaitUntil.Completed); - // var falseResult = (await databaseCollection.ExistsAsync(databaseName)).Value; - // Assert.IsFalse(falseResult); - - // await clusterResponse.DeleteAsync(WaitUntil.Completed); - // falseResult = (await Collection.ExistsAsync(redisEnterpriseCacheName)).Value; - // Assert.IsFalse(falseResult); - //} + [Test] + public async Task ListSkusForScalingTest() + { + await SetCollectionsAsync(); + + string redisEnterpriseCacheName = Recording.GenerateAssetName("RedisEnterpriseBegin"); + var data = new RedisEnterpriseClusterData( + DefaultLocation, + new RedisEnterpriseSku(RedisEnterpriseSkuName.BalancedB100) + { + }) + { + MinimumTlsVersion = RedisEnterpriseTlsVersion.Tls1_2, + PublicNetworkAccess = RedisEnterprisePublicNetworkAccess.Enabled, + }; + + var clusterResponse = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisEnterpriseCacheName, data)).Value; + Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); + Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseSkuName.BalancedB100, clusterResponse.Data.Sku.Name); + + clusterResponse = await Collection.GetAsync(redisEnterpriseCacheName); + Assert.AreEqual(DefaultLocation, clusterResponse.Data.Location); + Assert.AreEqual(redisEnterpriseCacheName, clusterResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseSkuName.BalancedB100, clusterResponse.Data.Sku.Name); + + var databaseCollection = clusterResponse.GetRedisEnterpriseDatabases(); + string databaseName = "default"; + var databaseData = new RedisEnterpriseDatabaseData() + { + ClientProtocol = RedisEnterpriseClientProtocol.Encrypted, + ClusteringPolicy = RedisEnterpriseClusteringPolicy.OssCluster, + EvictionPolicy = RedisEnterpriseEvictionPolicy.NoEviction, + Persistence = new RedisPersistenceSettings() + { + IsAofEnabled = true, + AofFrequency = PersistenceSettingAofFrequency.OneSecond + }, + }; + + var databaseResponse = (await databaseCollection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, databaseData)).Value; + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.OssCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + databaseResponse = await databaseCollection.GetAsync(databaseName); + Assert.AreEqual(databaseName, databaseResponse.Data.Name); + Assert.AreEqual(RedisEnterpriseClientProtocol.Encrypted, databaseResponse.Data.ClientProtocol); + Assert.AreEqual(RedisEnterpriseClusteringPolicy.OssCluster, databaseResponse.Data.ClusteringPolicy); + Assert.AreEqual(RedisEnterpriseEvictionPolicy.NoEviction, databaseResponse.Data.EvictionPolicy); + + // List Skus for scaling + var skusResponse = await clusterResponse.GetSkusForScalingAsync(); + Assert.IsNotNull(skusResponse); + + // Assert that the response contains specific SKUs + var skus = skusResponse.Value.Skus; + Assert.IsTrue(skus.Any(s => s.Name == RedisEnterpriseSkuName.BalancedB20)); + Assert.IsTrue(skus.Any(s => s.Name == RedisEnterpriseSkuName.BalancedB50)); + Assert.IsTrue(skus.Any(s => s.SizeInGB == 24.0)); + + // Delete database and cluster + await databaseResponse.DeleteAsync(WaitUntil.Completed); + var falseResult = (await databaseCollection.ExistsAsync(databaseName)).Value; + Assert.IsFalse(falseResult); + + await clusterResponse.DeleteAsync(WaitUntil.Completed); + falseResult = (await Collection.ExistsAsync(redisEnterpriseCacheName)).Value; + Assert.IsFalse(falseResult); + } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj index 1f37b5a2cff5..3f2a2fa30a62 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj +++ b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/CodeGenSerializationAttribute.cs index 7b3a72060417..2bbd69c27e36 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/AzureDataSchemaRegistryContext.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/AzureDataSchemaRegistryContext.cs index 755f550ac609..87d0d83f20cc 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/AzureDataSchemaRegistryContext.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/AzureDataSchemaRegistryContext.cs @@ -15,9 +15,9 @@ namespace Azure.Data.SchemaRegistry /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information /// - [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SchemaGroups))] [ModelReaderWriterBuildable(typeof(SchemaVersions))] + [ModelReaderWriterBuildable(typeof(ResponseError))] public partial class AzureDataSchemaRegistryContext : ModelReaderWriterContext { } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs index aded0395373b..8f0db9c96015 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs @@ -166,7 +166,7 @@ protected virtual SchemaGroups PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSchemaGroups(document.RootElement, options); } @@ -181,7 +181,7 @@ protected virtual SchemaGroups PersistableModelCreateCore(BinaryData data, Model /// The to deserialize the from. public static explicit operator SchemaGroups(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSchemaGroups(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs index 070987404882..61d235164ffb 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs @@ -154,7 +154,7 @@ protected virtual SchemaVersions PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSchemaVersions(document.RootElement, options); } @@ -169,7 +169,7 @@ protected virtual SchemaVersions PersistableModelCreateCore(BinaryData data, Mod /// The to deserialize the from. public static explicit operator SchemaVersions(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSchemaVersions(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs index 80fea06c5f58..72f59f5b1b7a 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.net8.0.cs @@ -75,8 +75,8 @@ protected StorageTaskResource() { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch storageTaskPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch storageTaskPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.StorageActions.Mocking diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs index 80fea06c5f58..72f59f5b1b7a 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/api/Azure.ResourceManager.StorageActions.netstandard2.0.cs @@ -75,8 +75,8 @@ protected StorageTaskResource() { } Azure.ResourceManager.StorageActions.StorageTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch storageTaskPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.StorageActions.Models.StorageTaskPatch storageTaskPatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.StorageActions.Mocking diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs index 477e7d870a44..0fc82e2896a6 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/ArmStorageActionsModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs index 5c3ed6ca2ab5..0b75e54112ed 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Extensions/MockableStorageActionsResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual StorageTaskCollection GetStorageTasks() return GetCachedClient(client => new StorageTaskCollection(client, Id)); } - /// Get the storage task properties. + /// + /// Get the storage task properties + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}. + /// + /// + /// Operation Id. + /// StorageTasks_Get. + /// + /// + /// Default Api Version. + /// 2023-01-01. + /// + /// + /// /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetStorageTaskAsync(str return await GetStorageTasks().GetAsync(storageTaskName, cancellationToken).ConfigureAwait(false); } - /// Get the storage task properties. + /// + /// Get the storage task properties + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}. + /// + /// + /// Operation Id. + /// StorageTasks_Get. + /// + /// + /// Default Api Version. + /// 2023-01-01. + /// + /// + /// /// The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only. /// The cancellation token to use. /// is null. diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/AzureResourceManagerStorageActionsContext.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/AzureResourceManagerStorageActionsContext.cs index 5de5bb3df64f..0acc884609fd 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/AzureResourceManagerStorageActionsContext.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/AzureResourceManagerStorageActionsContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.StorageActions.Models; @@ -17,6 +18,7 @@ namespace Azure.ResourceManager.StorageActions /// For more information /// [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(StorageTaskAction))] [ModelReaderWriterBuildable(typeof(StorageTaskAssignmentsListResult))] [ModelReaderWriterBuildable(typeof(StorageTaskData))] diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs index 16d1d3633173..f50061e0fa77 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/Models/StorageTaskPatch.Serialization.cs @@ -198,15 +198,15 @@ protected virtual StorageTaskPatch PersistableModelCreateCore(BinaryData data, M /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(StorageTaskPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(StorageTaskPatch storageTaskPatch) { - if (patch == null) + if (storageTaskPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(storageTaskPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs index 4a200e7f79b5..ce2b85dc7361 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskCollection.cs @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// StorageTasks_Create. /// /// /// Default Api Version. @@ -130,7 +130,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Operation Id. - /// Create. + /// StorageTasks_Create. /// /// /// Default Api Version. @@ -188,7 +188,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -237,7 +237,7 @@ public virtual async Task> GetAsync(string storage /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string storageTaskName, Ca /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -424,7 +424,7 @@ public virtual Response Exists(string storageTaskName, CancellationToken c /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -485,7 +485,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs index fdf615089f54..b269b0a1c406 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -159,7 +159,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Operation Id. - /// Get. + /// StorageTasks_Get. /// /// /// Default Api Version. @@ -198,14 +198,34 @@ public virtual Response Get(CancellationToken cancellationT } } - /// Update storage task properties. + /// + /// Update storage task properties + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}. + /// + /// + /// Operation Id. + /// StorageTasks_Update. + /// + /// + /// Default Api Version. + /// 2023-01-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide to update the storage task resource. + /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, StorageTaskPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StorageTaskPatch storageTaskPatch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(storageTaskPatch, nameof(storageTaskPatch)); using DiagnosticScope scope = _storageTasksClientDiagnostics.CreateScope("StorageTaskResource.Update"); scope.Start(); @@ -215,7 +235,7 @@ public virtual async Task> UpdateAsync(WaitUnt { CancellationToken = cancellationToken }; - HttpMessage message = _storageTasksRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, StorageTaskPatch.ToRequestContent(patch), context); + HttpMessage message = _storageTasksRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, StorageTaskPatch.ToRequestContent(storageTaskPatch), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); StorageActionsArmOperation operation = new StorageActionsArmOperation( new StorageTaskOperationSource(Client), @@ -237,14 +257,34 @@ public virtual async Task> UpdateAsync(WaitUnt } } - /// Update storage task properties. + /// + /// Update storage task properties + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}. + /// + /// + /// Operation Id. + /// StorageTasks_Update. + /// + /// + /// Default Api Version. + /// 2023-01-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters to provide to update the storage task resource. + /// The parameters to provide to update the storage task resource. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, StorageTaskPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StorageTaskPatch storageTaskPatch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(storageTaskPatch, nameof(storageTaskPatch)); using DiagnosticScope scope = _storageTasksClientDiagnostics.CreateScope("StorageTaskResource.Update"); scope.Start(); @@ -254,7 +294,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sto { CancellationToken = cancellationToken }; - HttpMessage message = _storageTasksRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, StorageTaskPatch.ToRequestContent(patch), context); + HttpMessage message = _storageTasksRestClient.CreateUpdateRequest(Guid.Parse(Id.SubscriptionId), Id.ResourceGroupName, Id.Name, StorageTaskPatch.ToRequestContent(storageTaskPatch), context); Response response = Pipeline.ProcessMessage(message, context); StorageActionsArmOperation operation = new StorageActionsArmOperation( new StorageTaskOperationSource(Client), @@ -285,7 +325,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sto /// /// /// Operation Id. - /// Delete. + /// StorageTasks_Delete. /// /// /// Default Api Version. @@ -334,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// StorageTasks_Delete. /// /// /// Default Api Version. diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/ArmStorageDiscoveryModelFactory.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/ArmStorageDiscoveryModelFactory.cs index 47926a881ba7..370c5efb1f05 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/ArmStorageDiscoveryModelFactory.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/ArmStorageDiscoveryModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.StorageDiscovery; diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Extensions/MockableStorageDiscoveryResourceGroupResource.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Extensions/MockableStorageDiscoveryResourceGroupResource.cs index 694cfb02d203..ba208f9232c9 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Extensions/MockableStorageDiscoveryResourceGroupResource.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Extensions/MockableStorageDiscoveryResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual StorageDiscoveryWorkspaceCollection GetStorageDiscoveryWorkspaces return GetCachedClient(client => new StorageDiscoveryWorkspaceCollection(client, Id)); } - /// Get a StorageDiscoveryWorkspace. + /// + /// Get a StorageDiscoveryWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}. + /// + /// + /// Operation Id. + /// StorageDiscoveryWorkspaces_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The name of the StorageDiscoveryWorkspace. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetStorag return await GetStorageDiscoveryWorkspaces().GetAsync(storageDiscoveryWorkspaceName, cancellationToken).ConfigureAwait(false); } - /// Get a StorageDiscoveryWorkspace. + /// + /// Get a StorageDiscoveryWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}. + /// + /// + /// Operation Id. + /// StorageDiscoveryWorkspaces_Get. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// /// The name of the StorageDiscoveryWorkspace. /// The cancellation token to use. /// is null. diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/AzureResourceManagerStorageDiscoveryContext.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/AzureResourceManagerStorageDiscoveryContext.cs index 7a0868592a57..14b4528932c4 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/AzureResourceManagerStorageDiscoveryContext.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/AzureResourceManagerStorageDiscoveryContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.StorageDiscovery.Models; @@ -15,6 +16,7 @@ namespace Azure.ResourceManager.StorageDiscovery /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information /// + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(StorageDiscoveryScope))] [ModelReaderWriterBuildable(typeof(StorageDiscoveryWorkspaceData))] [ModelReaderWriterBuildable(typeof(StorageDiscoveryWorkspaceListResult))] diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/StorageDiscoveryWorkspacePatch.Serialization.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/StorageDiscoveryWorkspacePatch.Serialization.cs index 274a39824c55..155d29f10165 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/StorageDiscoveryWorkspacePatch.Serialization.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/Models/StorageDiscoveryWorkspacePatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual StorageDiscoveryWorkspacePatch PersistableModelCreateCore(Bina /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(StorageDiscoveryWorkspacePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(StorageDiscoveryWorkspacePatch storageDiscoveryWorkspacePatch) { - if (patch == null) + if (storageDiscoveryWorkspacePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(storageDiscoveryWorkspacePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceCollection.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceCollection.cs index 142b06f43252..d967c680786d 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceCollection.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// StorageDiscoveryWorkspaces_CreateOrUpdate. /// /// /// Default Api Version. @@ -119,7 +119,7 @@ public virtual async Task> Creat /// /// /// Operation Id. - /// CreateOrUpdate. + /// StorageDiscoveryWorkspaces_CreateOrUpdate. /// /// /// Default Api Version. @@ -174,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -223,7 +223,7 @@ public virtual async Task> GetAsync( /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -296,7 +296,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string storageDiscoveryWor /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -410,7 +410,7 @@ public virtual Response Exists(string storageDiscoveryWorkspaceName, Cance /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -471,7 +471,7 @@ public virtual async Task> G /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. diff --git a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceResource.cs b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceResource.cs index 116c833fcddc..3e0fc8d4531f 100644 --- a/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceResource.cs +++ b/sdk/storagediscovery/Azure.ResourceManager.StorageDiscovery/src/Generated/StorageDiscoveryWorkspaceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync( /// /// /// Operation Id. - /// Get. + /// StorageDiscoveryWorkspaces_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken } } - /// Update a StorageDiscoveryWorkspace. + /// + /// Update a StorageDiscoveryWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}. + /// + /// + /// Operation Id. + /// StorageDiscoveryWorkspaces_Update. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsy } } - /// Update a StorageDiscoveryWorkspace. + /// + /// Update a StorageDiscoveryWorkspace + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageDiscovery/storageDiscoveryWorkspaces/{storageDiscoveryWorkspaceName}. + /// + /// + /// Operation Id. + /// StorageDiscoveryWorkspaces_Update. + /// + /// + /// Default Api Version. + /// 2025-09-01. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(StorageDiscove /// /// /// Operation Id. - /// Delete. + /// StorageDiscoveryWorkspaces_Delete. /// /// /// Default Api Version. @@ -313,7 +353,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// StorageDiscoveryWorkspaces_Delete. /// /// /// Default Api Version. diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/ArmTrustedSigningModelFactory.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/ArmTrustedSigningModelFactory.cs index 5190b4134faf..05243a81a6b2 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/ArmTrustedSigningModelFactory.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/ArmTrustedSigningModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.TrustedSigning; diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Extensions/MockableTrustedSigningResourceGroupResource.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Extensions/MockableTrustedSigningResourceGroupResource.cs index 3d9ed12ecdc9..b60f5c033050 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Extensions/MockableTrustedSigningResourceGroupResource.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Extensions/MockableTrustedSigningResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual TrustedSigningAccountCollection GetTrustedSigningAccounts() return GetCachedClient(client => new TrustedSigningAccountCollection(client, Id)); } - /// Get a trusted Signing Account. + /// + /// Get a trusted Signing Account. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}. + /// + /// + /// Operation Id. + /// CodeSigningAccounts_Get. + /// + /// + /// Default Api Version. + /// 2025-10-13. + /// + /// + /// /// Trusted Signing account name. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetTrustedSig return await GetTrustedSigningAccounts().GetAsync(accountName, cancellationToken).ConfigureAwait(false); } - /// Get a trusted Signing Account. + /// + /// Get a trusted Signing Account. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}. + /// + /// + /// Operation Id. + /// CodeSigningAccounts_Get. + /// + /// + /// Default Api Version. + /// 2025-10-13. + /// + /// + /// /// Trusted Signing account name. /// The cancellation token to use. /// is null. diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/AzureResourceManagerTrustedSigningContext.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/AzureResourceManagerTrustedSigningContext.cs index d9ae1377ba76..d1009b74b375 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/AzureResourceManagerTrustedSigningContext.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/AzureResourceManagerTrustedSigningContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.TrustedSigning.Models; @@ -21,6 +22,7 @@ namespace Azure.ResourceManager.TrustedSigning [ModelReaderWriterBuildable(typeof(CodeSigningAccountListResult))] [ModelReaderWriterBuildable(typeof(CodeSigningAccountPatchProperties))] [ModelReaderWriterBuildable(typeof(CodeSigningAccountProperties))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(Revocation))] [ModelReaderWriterBuildable(typeof(RevokeCertificateContent))] [ModelReaderWriterBuildable(typeof(SystemData))] diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountPatch.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountPatch.Serialization.cs index 0a958515b23c..5b77890bf2fa 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountPatch.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/Models/TrustedSigningAccountPatch.Serialization.cs @@ -181,15 +181,15 @@ protected virtual TrustedSigningAccountPatch PersistableModelCreateCore(BinaryDa /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(TrustedSigningAccountPatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(TrustedSigningAccountPatch trustedSigningAccountPatch) { - if (patch == null) + if (trustedSigningAccountPatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(trustedSigningAccountPatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountCollection.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountCollection.cs index 9c46bc1dd4b4..550707fd1913 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountCollection.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// CodeSigningAccounts_Create. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> CreateOrU /// /// /// Operation Id. - /// Create. + /// CodeSigningAccounts_Create. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(stri /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string accountName, Cancel /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string accountName, CancellationToken cance /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> GetIf /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.cs index e5969447a28d..8708436f3aa4 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Operation Id. - /// Get. + /// CodeSigningAccounts_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken can } } - /// Update a trusted signing account. + /// + /// Update a trusted signing account. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}. + /// + /// + /// Operation Id. + /// CodeSigningAccounts_Update. + /// + /// + /// Default Api Version. + /// 2025-10-13. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Parameters supplied to update the trusted signing account. /// The cancellation token to use. @@ -228,7 +248,27 @@ public virtual async Task> UpdateAsy } } - /// Update a trusted signing account. + /// + /// Update a trusted signing account. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}. + /// + /// + /// Operation Id. + /// CodeSigningAccounts_Update. + /// + /// + /// Default Api Version. + /// 2025-10-13. + /// + /// + /// Resource. + /// . + /// + /// + /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Parameters supplied to update the trusted signing account. /// The cancellation token to use. @@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Operation Id. - /// Delete. + /// CodeSigningAccounts_Delete. /// /// /// Default Api Version. @@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// CodeSigningAccounts_Delete. /// /// /// Default Api Version. diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileCollection.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileCollection.cs index a3d96070f35b..3bd0057fbb21 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileCollection.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Create. + /// CertificateProfiles_Create. /// /// /// Default Api Version. @@ -121,7 +121,7 @@ public virtual async Task /// /// /// Operation Id. - /// Create. + /// CertificateProfiles_Create. /// /// /// Default Api Version. @@ -179,7 +179,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -228,7 +228,7 @@ public virtual async Task> Ge /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string profileName, Cancel /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -415,7 +415,7 @@ public virtual Response Exists(string profileName, CancellationToken cance /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -476,7 +476,7 @@ public virtual async Task /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.cs index 8a8cd4954d6d..759a6ef90db1 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -149,7 +149,7 @@ public virtual async Task> Ge /// /// /// Operation Id. - /// Get. + /// CertificateProfiles_Get. /// /// /// Default Api Version. @@ -197,7 +197,7 @@ public virtual Response Get(Cancellati /// /// /// Operation Id. - /// Delete. + /// CertificateProfiles_Delete. /// /// /// Default Api Version. @@ -246,7 +246,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// CertificateProfiles_Delete. /// /// /// Default Api Version. @@ -295,7 +295,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id. - /// RevokeCertificate. + /// CertificateProfiles_RevokeCertificate. /// /// /// Default Api Version. @@ -342,7 +342,7 @@ public virtual async Task RevokeCertificateAsync(RevokeCertificateCont /// /// /// Operation Id. - /// RevokeCertificate. + /// CertificateProfiles_RevokeCertificate. /// /// /// Default Api Version. @@ -389,7 +389,7 @@ public virtual Response RevokeCertificate(RevokeCertificateContent content, Canc /// /// /// Operation Id. - /// Create. + /// CertificateProfiles_Create. /// /// /// Default Api Version. @@ -448,7 +448,7 @@ public virtual async Task /// /// /// Operation Id. - /// Create. + /// CertificateProfiles_Create. /// /// /// Default Api Version. diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CaptionResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CaptionResult.Serialization.cs index e883172d149c..b37569507991 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CaptionResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CaptionResult.Serialization.cs @@ -135,7 +135,7 @@ protected virtual CaptionResult PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCaptionResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CropRegion.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CropRegion.Serialization.cs index f9fb583e0d2d..1c629b809e83 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CropRegion.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/CropRegion.Serialization.cs @@ -138,7 +138,7 @@ protected virtual CropRegion PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeCropRegion(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaption.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaption.Serialization.cs index c9904a177798..d8204030e77e 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaption.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaption.Serialization.cs @@ -143,7 +143,7 @@ protected virtual DenseCaption PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDenseCaption(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaptionsResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaptionsResult.Serialization.cs index 188862ee7d3e..6e3e047d5c1c 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaptionsResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DenseCaptionsResult.Serialization.cs @@ -140,7 +140,7 @@ protected virtual DenseCaptionsResult PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDenseCaptionsResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedObject.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedObject.Serialization.cs index eea304fd962c..889acc5baa47 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedObject.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedObject.Serialization.cs @@ -145,7 +145,7 @@ protected virtual DetectedObject PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedObject(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedPerson.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedPerson.Serialization.cs index 084104d29446..b18c2c737182 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedPerson.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedPerson.Serialization.cs @@ -136,7 +136,7 @@ protected virtual DetectedPerson PersistableModelCreateCore(BinaryData data, Mod switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedPerson(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTag.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTag.Serialization.cs index 55f175aaac8d..6ab6d55f6e1e 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTag.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTag.Serialization.cs @@ -138,7 +138,7 @@ protected virtual DetectedTag PersistableModelCreateCore(BinaryData data, ModelR switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedTag(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextBlock.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextBlock.Serialization.cs index 450f5930e689..558850f59488 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextBlock.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextBlock.Serialization.cs @@ -137,7 +137,7 @@ protected virtual DetectedTextBlock PersistableModelCreateCore(BinaryData data, switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedTextBlock(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextLine.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextLine.Serialization.cs index 64144ae89e36..905fe7f747f0 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextLine.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextLine.Serialization.cs @@ -163,7 +163,7 @@ protected virtual DetectedTextLine PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedTextLine(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextWord.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextWord.Serialization.cs index e6420c1ea1fb..abfc6079c9b9 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextWord.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/DetectedTextWord.Serialization.cs @@ -156,7 +156,7 @@ protected virtual DetectedTextWord PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeDetectedTextWord(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageAnalysisResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageAnalysisResult.Serialization.cs index b3c1b3f6bf3a..1b09cd3568c3 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageAnalysisResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageAnalysisResult.Serialization.cs @@ -251,7 +251,7 @@ protected virtual ImageAnalysisResult PersistableModelCreateCore(BinaryData data switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeImageAnalysisResult(document.RootElement, options); } @@ -266,7 +266,7 @@ protected virtual ImageAnalysisResult PersistableModelCreateCore(BinaryData data /// The to deserialize the from. public static explicit operator ImageAnalysisResult(Response response) { - using JsonDocument document = JsonDocument.Parse(response.Content); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeImageAnalysisResult(document.RootElement, ModelSerializationExtensions.WireOptions); } } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageBoundingBox.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageBoundingBox.Serialization.cs index 3c6a87306974..0f2fa6085be8 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageBoundingBox.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageBoundingBox.Serialization.cs @@ -151,7 +151,7 @@ protected virtual ImageBoundingBox PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeImageBoundingBox(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageMetadata.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageMetadata.Serialization.cs index 7e6468b5abbc..ddeafcbf7cac 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageMetadata.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageMetadata.Serialization.cs @@ -135,7 +135,7 @@ protected virtual ImageMetadata PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeImageMetadata(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImagePoint.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImagePoint.Serialization.cs index 3f4b1dc0a943..a20e8782d559 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImagePoint.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImagePoint.Serialization.cs @@ -135,7 +135,7 @@ protected virtual ImagePoint PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeImagePoint(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageUrl.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageUrl.Serialization.cs index a8f17ca555c8..4d981ddb6e63 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageUrl.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ImageUrl.Serialization.cs @@ -128,7 +128,7 @@ protected virtual ImageUrl PersistableModelCreateCore(BinaryData data, ModelRead switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeImageUrl(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Internal/CodeGenSerializationAttribute.cs index 8b0a9a863986..56b0bca60fa2 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Internal/CodeGenSerializationAttribute.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -19,18 +19,18 @@ public CodeGenSerializationAttribute(string propertyName) } /// The property name which these hooks apply to. - /// The serialization name of the property. - public CodeGenSerializationAttribute(string propertyName, string propertySerializationName) + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) { PropertyName = propertyName; - PropertySerializationName = propertySerializationName; + SerializationName = serializationName; } /// Gets or sets the property name which these hooks should apply to. public string PropertyName { get; } /// Gets or sets the serialization name of the property. - public string PropertySerializationName { get; set; } + public string SerializationName { get; set; } /// /// Gets or sets the method name to use when serializing the property value (property name excluded). diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Models/AzureAIVisionImageAnalysisContext.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Models/AzureAIVisionImageAnalysisContext.cs index d5d8f7e19425..2e88e6aa9415 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Models/AzureAIVisionImageAnalysisContext.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/Models/AzureAIVisionImageAnalysisContext.cs @@ -32,9 +32,9 @@ namespace Azure.AI.Vision.ImageAnalysis [ModelReaderWriterBuildable(typeof(ObjectsResult))] [ModelReaderWriterBuildable(typeof(PeopleResult))] [ModelReaderWriterBuildable(typeof(ReadResult))] - [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SmartCropsResult))] [ModelReaderWriterBuildable(typeof(TagsResult))] + [ModelReaderWriterBuildable(typeof(ResponseError))] public partial class AzureAIVisionImageAnalysisContext : ModelReaderWriterContext { } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ObjectsResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ObjectsResult.Serialization.cs index be1718f08fe4..5b860ae402a4 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ObjectsResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ObjectsResult.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ObjectsResult PersistableModelCreateCore(BinaryData data, Mode switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeObjectsResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/PeopleResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/PeopleResult.Serialization.cs index ddd25b9b0082..09416db4e207 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/PeopleResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/PeopleResult.Serialization.cs @@ -137,7 +137,7 @@ protected virtual PeopleResult PersistableModelCreateCore(BinaryData data, Model switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializePeopleResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ReadResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ReadResult.Serialization.cs index ec70e464cd5e..9504a630eb0c 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ReadResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/ReadResult.Serialization.cs @@ -137,7 +137,7 @@ protected virtual ReadResult PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeReadResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/SmartCropsResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/SmartCropsResult.Serialization.cs index 9ec189c0433e..ab26066b395b 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/SmartCropsResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/SmartCropsResult.Serialization.cs @@ -140,7 +140,7 @@ protected virtual SmartCropsResult PersistableModelCreateCore(BinaryData data, M switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeSmartCropsResult(document.RootElement, options); } diff --git a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/TagsResult.Serialization.cs b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/TagsResult.Serialization.cs index 9858dcb8bf5a..1888ac986f0c 100644 --- a/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/TagsResult.Serialization.cs +++ b/sdk/vision/Azure.AI.Vision.ImageAnalysis/src/Generated/TagsResult.Serialization.cs @@ -140,7 +140,7 @@ protected virtual TagsResult PersistableModelCreateCore(BinaryData data, ModelRe switch (format) { case "J": - using (JsonDocument document = JsonDocument.Parse(data)) + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { return DeserializeTagsResult(document.RootElement, options); } diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs index d48eb0bc1b1b..944c7e1e06d0 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/ArmWeightsAndBiasesModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.WeightsAndBiases; diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs index 6dfeaa9188f3..39bb0da3ebb7 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Extensions/MockableWeightsAndBiasesResourceGroupResource.cs @@ -38,7 +38,23 @@ public virtual WeightsAndBiasesInstanceCollection GetWeightsAndBiasesInstances() return GetCachedClient(client => new WeightsAndBiasesInstanceCollection(client, Id)); } - /// Get a InstanceResource. + /// + /// Get a InstanceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}. + /// + /// + /// Operation Id. + /// Instances_Get. + /// + /// + /// Default Api Version. + /// 2024-09-18. + /// + /// + /// /// Name of the Instance resource. /// The cancellation token to use. /// is null. @@ -51,7 +67,23 @@ public virtual async Task> GetWeights return await GetWeightsAndBiasesInstances().GetAsync(instancename, cancellationToken).ConfigureAwait(false); } - /// Get a InstanceResource. + /// + /// Get a InstanceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}. + /// + /// + /// Operation Id. + /// Instances_Get. + /// + /// + /// Default Api Version. + /// 2024-09-18. + /// + /// + /// /// Name of the Instance resource. /// The cancellation token to use. /// is null. diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/AzureResourceManagerWeightsAndBiasesContext.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/AzureResourceManagerWeightsAndBiasesContext.cs index f6498ad86934..e3a8de7c24f4 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/AzureResourceManagerWeightsAndBiasesContext.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/AzureResourceManagerWeightsAndBiasesContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.WeightsAndBiases.Models; @@ -17,6 +18,7 @@ namespace Azure.ResourceManager.WeightsAndBiases /// [ModelReaderWriterBuildable(typeof(InstanceResourceListResult))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] [ModelReaderWriterBuildable(typeof(WeightsAndBiasesInstanceData))] diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs index 2cf880f9f933..925e5cd35237 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/Models/WeightsAndBiasesInstancePatch.Serialization.cs @@ -183,15 +183,15 @@ protected virtual WeightsAndBiasesInstancePatch PersistableModelCreateCore(Binar /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - /// The to serialize into . - internal static RequestContent ToRequestContent(WeightsAndBiasesInstancePatch patch) + /// The to serialize into . + internal static RequestContent ToRequestContent(WeightsAndBiasesInstancePatch weightsAndBiasesInstancePatch) { - if (patch == null) + if (weightsAndBiasesInstancePatch == null) { return null; } Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(weightsAndBiasesInstancePatch, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs index b7d8de6165a5..634324fa5fff 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// CreateOrUpdate. + /// Instances_CreateOrUpdate. /// /// /// Default Api Version. @@ -122,7 +122,7 @@ public virtual async Task> Create /// /// /// Operation Id. - /// CreateOrUpdate. + /// Instances_CreateOrUpdate. /// /// /// Default Api Version. @@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -229,7 +229,7 @@ public virtual async Task> GetAsync(s /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string instancename, Cance /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -416,7 +416,7 @@ public virtual Response Exists(string instancename, CancellationToken canc /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -477,7 +477,7 @@ public virtual async Task> Ge /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs index a3d982aa8c27..2c1d2b2ef988 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -150,7 +150,7 @@ public virtual async Task> GetAsync(C /// /// /// Operation Id. - /// Get. + /// Instances_Get. /// /// /// Default Api Version. @@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken } } - /// Update a InstanceResource. + /// + /// Update a InstanceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}. + /// + /// + /// Operation Id. + /// Instances_Update. + /// + /// + /// Default Api Version. + /// 2024-09-18. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -221,7 +241,27 @@ public virtual async Task> UpdateAsyn } } - /// Update a InstanceResource. + /// + /// Update a InstanceResource + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}. + /// + /// + /// Operation Id. + /// Instances_Update. + /// + /// + /// Default Api Version. + /// 2024-09-18. + /// + /// + /// Resource. + /// . + /// + /// + /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. @@ -262,7 +302,7 @@ public virtual Response Update(WeightsAndBiase /// /// /// Operation Id. - /// Delete. + /// Instances_Delete. /// /// /// Default Api Version. @@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id. - /// Delete. + /// Instances_Delete. /// /// /// Default Api Version.